zfs backup question

0 views
Skip to first unread message

Julien Cigar

unread,
Jun 19, 2026, 5:00:29 AM (4 days ago) Jun 19
to freebsd-...@freebsd.org
Hello,

We are backuping our servers with Sanoid / Syncoid.
Our servers provde access to several (web) applications and each
of them is stored in a dedicated ZFS dataset and running in a
dedicated jail.
So we have something like zroot/jails/app1, zroot/jails/app2,
zroot/jail/appx, etc

Due to some changes to our CI/CD pipeline and the way our apps are
deployed, the zfs dataset (zroot/jails/xxx) is now destroyed and
re-created on each deployment (the "app" is distributed as a gzipped
zfs dataset and the deploy process is a simple send/recv).
It works well except for backuping as there is no common ancestor
anymore each time the dataset is destroyed.
The answer is probably "no", but: is there a way to handle this
without having to send the whole dataset when backuping?

(We are thinking of maybe use Podman (or maybe simply a FreeBSD
package?) to package/distribute the application but I haven't found
any good documentation on how packaging something with Podman yet ..)

Thanks,
Julien

--
Julien Cigar
Belgian Biodiversity Platform (http://www.biodiversity.be)
PGP fingerprint: EEF9 F697 4B68 D275 7B11 6A25 B2BB 3710 A204 23C0
No trees were killed in the creation of this message.
However, many electrons were terribly inconvenienced.
signature.asc

Karl Vogel

unread,
Jun 19, 2026, 7:37:25 AM (4 days ago) Jun 19
to freebsd-...@freebsd.org
>> 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

Reply all
Reply to author
Forward
0 new messages