On Sat, May 26, 2007 at 09:05:07PM +0200, Svein Halvor Halvorsen wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Roland Smith wrote: > >> Is it possible to rollback a file system snapshot, i.e. restore the > >> file system to the state it was in at the time a mksnap_ffs command > >> was issued? > > > > You can mount the snapshot, and then copy the files back to the original fs. > > Note that cp can preserve flags, but not ACLs AFAIK. > > Yes, I know that this is possible. However, it's a lot of work.
Huh? Suppose you did 'mksnap_ffs /usr /usr/.snap/20070526' Then all you have to is something like: # mdconfig -a -t vnode -f /usr/.snap/20070526 -u 0 # mount /dev/md0 /mnt/snapshot # cd /usr # tar cf - /mnt/snapshot/* |tar xpf - # umount /mnt/snapshot # mdconfig -d -u 0 How much easier could it be? You could easily create a script for this as well. > There should be some straightforward way of rolling back to a > snapshot, since the files and all the file system structure are > already there. Also, there might not be room on the disk for it. Snapshots take up room as well. Roland -- R.F.Smith http://www.xs4all.nl/~rsmith/ [plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated] pgp: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)
pgp8ndcyeNNPt.pgp
Description: PGP signature