Re: zfs backup question
Karl Vogel <[email protected]> Fri, 19 Jun 2026 07:36:58 -0400
| Newsgroups | gmane.os.freebsd.questions |
|---|---|
| Message-ID | <[email protected]> |
>> On Fri 19 Jun 2026 at 05:00:31 (-0400), Julien Cigar wrote:
> Is there a way to handle this without having to send the whole dataset
> when backuping?
It might be easiest to compare hashes of the old and new files to create
your backup. I made two directories with some HTML files: b-old (old
backup) and b-new (production, which will become your current backup).
me% ls -lF
drwxr-xr-x 2 vogelke wheel 3264 19-Jun-2026 06:56:12 b-new/
drwxr-xr-x 2 vogelke wheel 3264 19-Jun-2026 07:01:03 b-old/
I copied b-old to b-new and made some minor changes to b-new:
* removed b-new/1.htm
* added b-new/2.htm
* changed b-new/3.htm
I hashed the files, sorted by filename and compared:
me% cd b-new
me% md5sum * | sort -k2,2 > ../b-new.sum
me% cd ../b-old
me% md5sum * | sort -k2,2 > ../b-old.sum
me% cd ..
me% diff b-old.sum b-new.sum
41a42
> 8f9ea97ad8024ff88c1b39a518e51838 2.htm
43c44
< eeaf2f41b27f5fe6cffc6342d016ff84 3.htm
---
> 6c807fc0929464b31b432563bfce5be0 3.htm
45d45
< 0e3876813506bf815a76d60adb1fe8db 1.htm
You can copy your old backup and update these files when creating your
current backup; the deleted files simply won't exist. If you're also
creating directories, that would be more complicated. I don't know if
you can run something like "syncthing" between two existing directories
in their own jails.
--
Karl Vogel I don't speak for anyone but myself
The server room doubled as the marketing dept's wine cellar.
I no longer work there. --Reddit "janky setup" comment, 6 Jun 2026