if I accidentally delete the ~/Documents directory on my Linux desktop, and then rclone rsync to backup, the result is an empty ~/Documents directory in my backup.
Can rclone restore the ~/Documents directory from a previous version of the directory?
Which cloud provider did you use? rclone puts deleted stuff in the trash normally so hopefully you’ll find it in there. b2 makes versions…
@ncw am currently considering rsync.net or hubiC (via SFTP), but am open to suggestions for other providers.
(I was testing Backblaze b2 when I noticed the potential short coming)
Can rclone with any SFTP rsync provider restore a directory from a previous version of a directory?
What other features of a provider would indicate rsync could restore a directory from a previous version?
I misread your question, I thought you had deleted your documents…
If you are wondering how to set up a sync with rclone to help with this, then you want to use the –backup-dir option. You can then keep the files you delete for a while.
Does that help?
Thank you ncw, that is exactly what I needed.
I will put this in my script:
rclone sync /path/to/local remote:current --backup-dir remote:old
and run it hourly from cron.
That way hourly snapshots are saved, and I can restore a directory from old.
The --backup-dir option requires a remote that supports server side move or copy.
Remotes with move or copy are listed in https://rclone.org/overview/#optional-features