best way to deal with moved local files

So I have backup server and main. A job runs via a control panel which backs up a users file every night and places into the ‘current’ directory (there is no way to specify the target directory name as date) a cron job then runs at 0300 to move the contents of ‘current’ into the folder named date i.e 010117.

Now i’m assuming syncthing will sync the backup twice i.e once when it’s in the ‘current’ folder and again when it’s moved to the dated one?

Is there a workaround for this?

It depends.

Is the current folder in a different share to the dated folder? If it is and you can cause the dated folder to be scanned before the current one, the dated folder will be rebuilt from local blocks before current is deleted.

If the current folder is in the same share there is a good chance ST will handle the move gracefully and there is nothing else you need to do.

If you are using versioning on the remote device, a nice workaround mentioned in the forum about a year ago was to add the .stversion directory as a folder in syncthing but not share it with anyone. That way the blocks are indexed and available to reconstruct in other shares even if the delete happens first.

A move is just a move - Syncthing sees the hash is the same and just does a rename on the destination as well.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.