Skip to content

Instantly share code, notes, and snippets.

@gaiar
Created February 2, 2020 11:03
Show Gist options
  • Select an option

  • Save gaiar/0db055deca9f390a3d8d5e4c44746413 to your computer and use it in GitHub Desktop.

Select an option

Save gaiar/0db055deca9f390a3d8d5e4c44746413 to your computer and use it in GitHub Desktop.

Revisions

  1. gaiar created this gist Feb 2, 2020.
    16 changes: 16 additions & 0 deletions upload.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    #!/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
    "