Re: [List] Re: Backup/restore recipe
- In reply to: Frank Leonhardt : "Re: [List] Re: Backup/restore recipe"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 13 Nov 2025 22:01:58 UTC
>> On 12/11/2025 19:06, Eugene R wrote:
> Overall, making backups is indeed pretty straightforward using ZFS or
> an assortment of "agnostic" filetree-based backup solutions.
You can do both. I keep daily snapshots, and I also make snapshots called
"@inc30" for important datasets every 30 minutes. The basic idea:
zfs list -d 3 -Ho name,mountpoint -t filesystem |
while read dataset mountpoint
do
skip unmounted or redundant datasets
skip top-level pools like "tank"
snapshot="${dataset}@inc30"
zfs diff -H "$snapshot" 2> /dev/null |
grep '^[+M]' |
remove crap like cache-files ... > flist
use cpio/tar/whatever to copy flist elsewhere
rm flist
destroy $snapshot
re-create $snapshot
done
When I mangle a file, it's usually something I've created in the last
hour or two, so daily snaps don't help. After a few months, I roll
the 30-minute backups into one daily backup.
--
Karl Vogel I don't speak for anyone but myself
Comment: I was in the military, and China stole my freaking DNA profile.
Reply: Gonna be a weird day for you when China's clone army invades us.
--Hacker News conversation, 6 Nov 2025