Re:The various scripts I use to back up my home computers us...
by customizable on Friday December 09, 2022 @12:05PM
(#33923687)
ZFS is a game changer for quickly and reliably backing up large multi-terabyte PostgreSQL databases as well. In case anyone is interested, here is our experience with PostgreSQL on ZFS, complete with a short backup script: https://lackofimagination.org/2022/04/our-experience-with-po...
Re:The various scripts I use to back up my home computers us...
by pmarreck on Friday December 09, 2022 @01:18PM
(#33924604)
Came here to say this. Can you list your example commands for snapshotting, zfs send, restoring single files or entire snapshots, etc.? (Have you tested it out?) I am actually in the position of doing this (I use zfs on root as of recently and I have a TrueNAS) but am stuck at the bootstrapping problem (I haven't taken a single snapshot yet; presumably the first one is the only big one? and then how do I send incremental snapshots? and then how do I restore these to, say, a new machine? do I remotely mount a snapshot somehow, or zfs recv, or? Do you set up systemd/cron jobs for this?) Also, having auto-snapshotted on Ubuntu in the past, eventually things slowed to a crawl every time I did an apt update... Is this avoidable?
Re:The various scripts I use to back up my home computers us...
by customizable on Friday December 09, 2022 @02:19PM
(#33925373)
Yes, the first snapshot is the big one, the rest are incremental. Restoring a snapshot is just one line really. Something like ;)
sudo zfs send -cRi db/data@2022-12-08T00-00 db/data@2022-12-09T00-00 | ssh me@backup-server "sudo zfs receive -vF db/data"
Re:The various scripts I use to back up my home computers us...
by GekkePrutser on Friday December 09, 2022 @01:46PM
(#33925002)
Zfs send/receive is nice but it does lack the toolchain to easily extract individual files from a backup. It's more of a disaster recovery thing in terms of backup.
Re:The various scripts I use to back up my home computers us...
by customizable on Friday December 09, 2022 @02:34PM
(#33925564)
You can actually extract individual files from a snapshot by using the hidden .zfs directory like: /mnt-point/.zfs/snapshot/snapshot-name
Another alternative is to create a clone from a snapshot, which also makes the data writable.
Re:The various scripts I use to back up my home computers us...
by GekkePrutser on Saturday December 10, 2022 @05:37AM
(#33931511)
A snapshot yes but not a zfs send stream which is a single file.
I have my /home in a separate dataset that gets snapshotted every 30 minutes. The snapshots are sent to my primary file-server, and can be picked up by any system on my network. I do a variation of this with my dotfiles similar to STOW but with quicker snapshots.