snapshot rsync dump/restore

2009-12-17 Thread n dhert
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?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: snapshot rsync dump/restore

2009-12-17 Thread Matthew Seaman

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



signature.asc
Description: OpenPGP digital signature


Re: snapshot rsync dump/restore

2009-12-17 Thread Roland Smith
On Thu, Dec 17, 2009 at 09:03:50AM +0100, 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.

Dumping /tmp is usually not necessary.

 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.

If the new system has different hardware, do not forget to adjust
/boot/loader.conf, or build a custom kernel. And you should definitely edit
/etc/rc.conf if even for the hostname.

 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.
snip
 How exactly would one best proceed?

I would recommend rsync.

 Is rsync save regarding soft-links ?

Yes, if you use the '-a' flag.

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


pgpXk89WkOmYO.pgp
Description: PGP signature


Re: snapshot rsync dump/restore

2009-12-17 Thread Ivan Voras

n dhert wrote:


I was told one could do this using rsync and by using a snapshot it would
even be faster (?)


Also try http://rdiff-backup.nongnu.org/

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org