Skip to content

Instantly share code, notes, and snippets.

@gaiar
Created February 2, 2020 11:03
Show Gist options
  • Save gaiar/0db055deca9f390a3d8d5e4c44746413 to your computer and use it in GitHub Desktop.
Save gaiar/0db055deca9f390a3d8d5e4c44746413 to your computer and use it in GitHub Desktop.
#!/bin/bash
HOST='<IP ADDRESS>'
USER='<USER>'
PASS='<PASSWORD>'
TARGETFOLDER='/media/external/record'
SOURCEFOLDER='/tmp/sd/record'
lftp -f "
set ftp:passive-mode on
set ftp:ssl-allow yes
set ssl:verify-certificate no
open -u $USER,$PASS $HOST
cd $SOURCEFOLDER
mirror --continue --scan-all-first --use-cache --only-missing --verbose $SOURCEFOLDER $TARGETFOLDER
bye
"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment