Page 1 of 1

Backup to FTP, only syncing new files

Posted: 22 May 2019 21:26
by p50kombi
Hi, I did a quick search but could only find a very old entry from 2014 re this.
I want to backup my photos to my FTP, but I only want to sync new files, not the files that are already on the ftp.
I've found when I use copy files to ftp, it uploads all the pictures of that folder, including the ones already on the FTP and overwrites those, hence using up bandwidth that's not needed.

Is there a way to have automagic copy files to an ftp, but skipping the ones that are already on the ftp?

Thanks for your help all.....

Re: Backup to FTP, only syncing new files

Posted: 23 May 2019 00:08
by anuraag
You can use Init Variable File List with option Include changes only enabled. It will give you list of new files since last execution of action. Then set Local files at action FTP Upload Files to {files,listformat,comma}.

Alternatively you can run init on both device and FTP folder using Init Variable File List and FTP Init Variable File List. Then using removeAllElementValues you can get list of files not uploaded to FTP.

Re: Backup to FTP, only syncing new files

Posted: 23 May 2019 10:02
by p50kombi
Thanks, that's really helpfull.

One final question, how do I stop the script when there are no new files?

I've made a global variable called global_pictures_changed
I only want the script to continue when there is something set to this, I tried the condition: global_pictures_changed != [] true, to continue to the upload but that doesn't seem to work

Re: Backup to FTP, only syncing new files

Posted: 23 May 2019 10:47
by p50kombi
nevermind..I figured it out..
I added an isempty expression to the flow ;)

Re: Backup to FTP, only syncing new files

Posted: 10 Nov 2019 12:07
by palibrzuch
Could you share the whole flow?
Thanks