News for hackers. Stuff that matters.
Re:Syncthing – a continuous file synchronization program by raek on Thursday October 14, 2021 @04:58AM (#28861936)
Regarding backups... Syncthing is great for propagating changes to all devices, but does not offer much in terms of backups and previous versions of files. (And I'm fine with that. I consider that to be out of scope for Syncthing.)

I've been thinking about solving the backup part by letting one of the devices perform btrfs snapshots on its storage. Does anyone know about any write-up that describes or compares such solutions?

Setting up a cron job / timer unit that commits the synced folder to a git repo is also an alternative, but has some disadvantages: stores contents twice (once in the sync folder, once in the git object database), and pruning older versions is difficult (git is mainly built to keep all history).

Re:Syncthing – a continuous file synchronization program by MikusR on Thursday October 14, 2021 @09:04AM (#28863699)
Syncthing has many options for versioning. Ability to keep versions of files is THE reason I use it.
Re:Syncthing – a continuous file synchronization program by rcMgD2BwE72F on Thursday October 14, 2021 @11:30AM (#28865685)
Re:Syncthing – a continuous file synchronization program by MikusR on Thursday October 14, 2021 @12:37PM (#28866546)
Re:Syncthing – a continuous file synchronization program by hikarudo on Thursday October 14, 2021 @06:35AM (#28862524)
> I've been thinking about solving the backup part by letting one of the devices perform btrfs snapshots on its storage.

I do zfs snapshots on my storage server (home desktop), which is in Syncthing's "receive only" mode. I use it to sync my camera roll and Whatsapp media files from my Android phone. I use pyznap for snapshot management.

> Setting up a cron job / timer unit that commits the synced folder to a git repo is also an alternative

Another option would be to backup the synced folder using a backup tool like borg, restic, duplicacy etc. They have options to prune the snapshots.

Re:Syncthing – a continuous file synchronization program by andrewaylett on Thursday October 14, 2021 @07:29AM (#28862903)
I have a script that takes a btrfs snapshot, uses borg to back up the consistent snapshot (to rsync.net), then removes the snapshot again. It then instructs Borg about which snapshots to retain, so my space shouldn't grow without bound.

For extra extra snapshotting fun, rsync.net then takes ZFS snapshots of the borg backup. So even if my snapshot cleaning gets over-enthusiastic, I'll still have a snapshot of the snapshot.

Re:Syncthing – a continuous file synchronization program by Joeri on Thursday October 14, 2021 @07:14AM (#28862800)
I’ve set up a single always on desktop computer as my backup hub. Syncthing is used to sync everything I care about to that machine, and backblaze pulls everything to the cloud as versioned backups. I use a .stignore file to exclude some things from syncing (like node_modules) and similarly backblaze is configured to exclude some things from the cloud backup. There’s also a regular local backup to an external drive (time machine). The setup took some work to figure out, but it is effectively zero maintenance and robust.