server/master data not backed up before deletion
local data is backed up before deletion when pulling from master, but master data is not backed up when pushing from local.
This problem arises since I use my master/server to also crunch numbers. If a sync is initiated in the middle of a long process that periodically spits out benchmark data, bitpocket gets confused and will delete data on master during a subsequent sync.
The best solution is probably to put master on a server that isn't used to crunch numbers, but just a word of warning to anyone out there that data on master can be lost and not backed up in some scenarios. I'm not sure how hard it will be to implement backups on master. I notice there is no rsync dry run on the push from local...
Yes, this is indeed an issue. Not sure what would be the best way to handle this. Right now I'm keen to just add a note to the readme file, saying that files on master should not be touched.
As an update, the current master branch has some changes to the syncing technique:
- First, backups of deleted and changed files are supported on the remote host (ie. the "master") if the
REMOTE_BACKUPSoption is set in the config file. - Secondly, files deleted remotely are now only those which have been detected to have been deleted locally. The detection occurs before the sync starts. So, for very long running syncs, files created in parallel with the sync will not be removed.
- This also applies to local files -- only those files which were detected to be removed remotely before the sync started are removed locally.