Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 26 May 2007 21:05:07 +0200
From:      Svein Halvor Halvorsen <svein.h@lvor.halvorsen.cc>
To:        Roland Smith <rsmith@xs4all.nl>
Cc:        questions@freebsd.org
Subject:   Re: Restore UFS snapshot
Message-ID:  <465884E3.5000500@lvor.halvorsen.cc>
In-Reply-To: <20070526180336.GB34660@slackbox.xs4all.nl>
References:  <465864F4.7060500@lvor.halvorsen.cc> <20070526180336.GB34660@slackbox.xs4all.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
-----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.
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.


>> User scenario:
>>
>> Before a major upgrade (eg. releng->current, portupgrade -a, etc),
>> it would be nice to mksnap_ffs, and then after the upgrade be able
>> to either delete the snapshot if all went well, or rollback to the
>> snapshot.
> 
> You should use dump(8) in this case. Create level 0 dumps of your
> filesystems and store them somewhere. You can dump live filesystems with
> dump's -L flag.
> 
> If you botch the upgrade, you can use restore(8) to revert your
> filesystems to the situation before the upgrade.
> 
> Note that you should really make regular dumps of your filesystems as
> backups anyway!

This is also beyond the point, although I appreciate that you
suggest alternative ways to meet my objectives. dump/restore would
also require additional disk space.

I do actually backup my data on a regular basis, but not all of my
computers really need external backup, as I could stand some
downtime. However, if I could easily make a snapshot, and then
either roll back or delete it afterwards, it would be a nice
compromise between security and effort. And also: it seems it should
be possible to do this. If not, I might want to make a tool for it.



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (FreeBSD)
Comment: mailto:pgpkey@svein.halvorsen.cc to get my PGP-key

iD4DBQFGWITghQg3vZGYu0ARAjIeAJwIe7+pbMw62dHClFo1r6R6byUKaQCYzWx3
QcIl0qBiYsKdyytwxzVHww==
=OFQk
-----END PGP SIGNATURE-----



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?465884E3.5000500>