Hacker News new | past | comments | ask | show | jobs | submit login

If you accidentally delete some files (even all the files!), won't Syncthing delete all the "backups"?

I don't use Syncthing, I use an rsync script I wrote over 10 years ago, using the --link-dest option to keep incremental backups for around 2 years.

This relies on Zsh's fancy globbing, but the gist of it is:

    date=$(date +%Y%m%d-%H%M)

    [for loop over users]

    older=( $backups/$user/*(N/om) )

    rsync --archive --recursive \
        --fuzzy --partial --partial-dir=$backups/$user/.rsync-partial \
        --log-file=$tempfile --link-dest=${^older[1,20]} \
        --files-from=$configdir/I-$user \
        --exclude-from=$configdir/X-$user \
        $user@$from:/ $backups/$user/$date/



Syncthing has options to store versions of files so that scenario is easily avoided: https://docs.syncthing.net/users/versioning.html


Unfortunately, in my experience, Syncthing's versioning mechanisms leave much to be desired compared to what I'm used to from Dropbox. AFAIK all of Syncthing's versioning schemes only keep versions of files that have been changed _on other devices_, and not those that have changed on the device itself, whereas what I'm looking for is an option to keep a synchronized version history for all files on all devices, and the ability to more intuitively roll back and roll forward the state of any file to any revision without having to mess with manually moving and replacing files and reading timestamps (better yet would be the ability to do so for entire directories, but I realize this would probably be very difficult to accomplish across devices in a decentralized manner).


I used a similar script for a long time but I'm using now rnsapshot.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: