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

next in thread | previous in thread | raw e-mail | index | archive | help

--wq9mPyueHGvFACwf
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sat, May 26, 2007 at 06:48:52PM +0200, Svein Halvor Halvorsen wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>=20
> Hello list!
>=20
> 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.
=20
> User scenario:
>=20
> 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!

Roland
--=20
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)

--wq9mPyueHGvFACwf
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.3 (FreeBSD)

iD8DBQFGWHZ4EnfvsMMhpyURArnxAJ4hKFOcjf9HFdRpRR7JI5mE/FLG6gCeLtHb
PrzJolX7LN7Ak6iF/gQ77+Q=
=FhSj
-----END PGP SIGNATURE-----

--wq9mPyueHGvFACwf--



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