Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 02 Jan 2011 21:39:07 +0000
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        David Brodbeck <gull@gull.us>
Cc:        freebsd general questions <freebsd-questions@freebsd.org>
Subject:   Re: Half a Mirror Backup
Message-ID:  <4D20F07B.6040903@infracaninophile.co.uk>
In-Reply-To: <AANLkTik8XdJoD4nV8cQTy0xkkGiP_TRRpfBQErZyZYjf@mail.gmail.com>
References:  <4D20D872.3020400@speakeasy.net> <AANLkTik8XdJoD4nV8cQTy0xkkGiP_TRRpfBQErZyZYjf@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig835D56775F51CCD51138219A
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On 02/01/2011 20:30, David Brodbeck wrote:
> On Sun, Jan 2, 2011 at 11:56 AM, Jason C. Wells <jcw@speakeasy.net> wro=
te:
>> Is using one half of a mirror as a backup a good/bad idea?
>>
>> I was thinking of rotating drives on a periodic basis as a back up met=
hod.
>>  You'd get the backup instantly, but rebuilding the mirror with the in=
coming
>> drive would take a little time and leave you vulnerable to a small los=
s of
>> data if a disk failed while the mirror was rebuilding.
>=20
> Besides the problem you mention, you'll have a pretty sizable
> performance hit while the mirror is being rebuilt.  Also, keep in mind
> that the most likely time for a second drive to fail is during a
> rebuild, since the rebuild forces a read from every sector.  I think I
> would use rsync or dump instead, although I have to admit the rotating
> mirror idea is clever.

It's a well known and really pretty clever technique to obtain a
point-in-time image of a filesystem without needing lengthy outages.
Two points:

  1) The classic way of doing this without losing resilience is to use
     a mirror of three disks.  Typically you'ld attach a third drive
     to the existing mirror, let it synch its contents, detach it and
     then backup the third disk's content to tape at leisure.

  2) It's rendered pretty much obsolete if you have a filesystem that
     you can snapshot.  Which you can for both UFS and ZFS.  Take
     snapshots of your filesystems, mount the snapshots and back them
     up.  It's exceedingly easy with ZFS(*), and only slightly more
     involved with UFS.

In fact, snapshotting ZFS is so easy, that it is common practice to
create snapshots at regular intervals -- hourly is not unknown -- and
keep several days worth on-line as insurance against accidental
deletions and so forth.

Note: this does *not* constitute a proper backup. Without off-line
copies (or preferably off-site copies) if your computer gets destroyed
by fire, flood or whatever, then you will loose your data.

	Cheers,

	Matthew

(*) Hint: ZFS snapshots automount at
/${filesystem}/.zfs/snapshot/${snapname} if you just cd to that directory=
=2E

--=20
Dr Matthew J Seaman MA, D.Phil.                   7 Priory Courtyard
                                                  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey     Ramsgate
JID: matthew@infracaninophile.co.uk               Kent, CT11 9PW


--------------enig835D56775F51CCD51138219A
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.16 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk0g8IUACgkQ8Mjk52CukIxKHQCeJ6QT382I9ZRkYFbMuBHRRQve
VZ0AmQFADOvFLWtEteKbtXs8Y/1iolcj
=WC2m
-----END PGP SIGNATURE-----

--------------enig835D56775F51CCD51138219A--



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