NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: bin/60383: fssconfig(8): distinguish between taking and loading a snapshot
The following reply was made to PR bin/60383; it has been noted by GNATS.
From: Taylor R Campbell <riastradh%NetBSD.org@localhost>
To: gnats-bugs%NetBSD.org@localhost, netbsd-bugs%NetBSD.org@localhost
Cc: Robert Elz <kre%munnari.OZ.AU@localhost>
Subject: Re: bin/60383: fssconfig(8): distinguish between taking and loading a snapshot
Date: Sat, 25 Jul 2026 19:28:30 +0000
Another thing that would be nice: mount a snapshot -- or any file
system, really -- just for the duration of a command, so that you
could, e.g., easily write a cron job that rsyncs a snapshot without
having to teach rsync(1) (or tar(1) or tarsnap(1) or borg(1) or
whatever) how to create snapshots on NetBSD:
withsnapmount /fs /fs/.snap/snapname /mnt \
rsync -aH /mnt/. backuphost:/backups/$(hostname)/.
(How to distinguish taking a new snapshot from loading an existing
snapshot in this operation is left as an exercise for the reader's
imagination.)
Also, for comparison, here's the interface on FreeBSD:
1. Create a snapshot /fs/.snap/snapname of the file system /fs
(assuming that is, in fact, the mount point) using the
mksnap_ffs(8) command:
# mksnap_ffs /fs/.snap/snapname
2. Create a snapshot /fs/.snap/snapname of the file system /fs, using
the mount(8) command -- but this doesn't actually mount it,
apparently:
# mount -u -o snapshot /fs/.snap/snapname /fs
3. Given a snapshot that was previously created, mount it at /mnt:
# mdconfig -a -t vnode -o readonly -f /fs/.snap/snapname -u 4
# mount -r /dev/md4 /mnt
Except for mksnap_ffs(8), this strikes me as very confusing! I'm not
sure we want to copy it.
https://web.archive.org/web/20260722195637/https://docs.freebsd.org/en/book=
s/handbook/disks/#snapshots
https://web.archive.org/web/20251118192326/https://man.freebsd.org/cgi/man.=
cgi?query=3Dmksnap_ffs&sektion=3D8&format=3Dhtml
https://web.archive.org/web/20260220073336/https://man.freebsd.org/cgi/man.=
cgi?format=3Dhtml&query=3Dmount&sektion=3D8
Home |
Main Index |
Thread Index |
Old Index