Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Dec 2009 08:56:00 +0000
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        n dhert <ndhert@gmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: snapshot rsync dump/restore
Message-ID:  <4B29F220.1050301@infracaninophile.co.uk>
In-Reply-To: <8021a2660912170003t3e01f4ean396908745c411740@mail.gmail.com>
References:  <8021a2660912170003t3e01f4ean396908745c411740@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)
--------------enig033418E749FED86ACC873BE0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: quoted-printable

n dhert wrote:
> I want to clone a FreeBSD system on another system.
> Say, Mondaymorning I use the dump(8)  to make dumpfiles of all filesyst=
ems
> (dumpofroot.dmp, dumpofvar.dmp, ...tmp.dmp, ...usr.dmp, ...home.dmp ) o=
n an
> external USB disk.
> The original system keeps running.
> Then Wednesday I setup FreeBSD on the new system, and use restore(8) to=
 put
> the contents of my dumpfiles in the filesystems of that clone system.
> Then I still need to have the changes occured during Mondaymorning till=

> Wednesdayafternoon on the original system, to be put in some way on the=

> clone system, so that these are not lost.
> I was told one could do this using rsync and by using a snapshot it wou=
ld
> even be faster (?)
> Is rsync save regarding soft-links ?
> How exactly would one best proceed?

Presumably you did a level 0 dump to make your initial copy?  Did you
happen to use the -u flag to dump? ie. update /etc/dumpdates?  If so,
then you can just do an incremental dump of everything that has changed s=
ince.
(This is standaard dump(1) functionality).  So long as the filesystems on=

the second machine haven't changed in the meantime, you should be able to=
=20
just restore the incremental dump on top of the original full backup
to get things pretty much in synch.  (Although watch out for files that
were deleted between the full and the incremental dumps).

If you didn't update /etc/dumpdates, then you can manually edit /etc/dump=
dates
to achieve the same result.

Failing that, yes, you can use rsync to synchronise the filesystem state.=

You don't have to snapshot the original system, but it will help to get y=
ou
a consistent point-in-time copy of the original server.  To create a snap=
shotted
and mounted directory tree see the section on 'snapshot' in mount(8).
If you have several filesystems to rsync to the other machine, you should=

snapshot all of them and mount them one over the other in the same relati=
on as
the original filesystems.  Then you can rsynch the whole snapshotted dire=
ctory
tree to your new server in one command.

	Cheers,

	Matthew

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


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

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

iEYEAREIAAYFAksp8iEACgkQ8Mjk52CukIwO6QCdEerMALNhg0/2a9ljBjt0zNUV
KgcAnjIRLmspAXpngXVYYHFvruzpNYfB
=RIqp
-----END PGP SIGNATURE-----

--------------enig033418E749FED86ACC873BE0--



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