Backup to FTP, only syncing new files

Post your questions and help other users.

Moderator: Martin

Post Reply
p50kombi
Posts: 9
Joined: 05 Feb 2016 23:23

Backup to FTP, only syncing new files

Post by p50kombi » 22 May 2019 21:26

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.....

anuraag
Posts: 279
Joined: 24 Jan 2015 02:06

Re: Backup to FTP, only syncing new files

Post by anuraag » 23 May 2019 00:08

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.

p50kombi
Posts: 9
Joined: 05 Feb 2016 23:23

Re: Backup to FTP, only syncing new files

Post by p50kombi » 23 May 2019 10:02

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

p50kombi
Posts: 9
Joined: 05 Feb 2016 23:23

Re: Backup to FTP, only syncing new files

Post by p50kombi » 23 May 2019 10:47

nevermind..I figured it out..
I added an isempty expression to the flow ;)

palibrzuch
Posts: 1
Joined: 06 May 2013 22:46

Re: Backup to FTP, only syncing new files

Post by palibrzuch » 10 Nov 2019 12:07

Could you share the whole flow?
Thanks

Post Reply