snapshot rsync dump/restore

Matthew Seaman m.seaman at infracaninophile.co.uk
Thu Dec 17 08:56:07 UTC 2009


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 filesystems
> (dumpofroot.dmp, dumpofvar.dmp, ...tmp.dmp, ...usr.dmp, ...home.dmp ) on 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 would
> 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 since.
(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 
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/dumpdates
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 you
a consistent point-in-time copy of the original server.  To create a snapshotted
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 relation as
the original filesystems.  Then you can rsynch the whole snapshotted directory
tree to your new server in one command.

	Cheers,

	Matthew

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 259 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20091217/b90ba314/signature.pgp


More information about the freebsd-questions mailing list