Author Login
Post Reply
On Sun, Mar 30, 2008 at 4:05 PM, Neil Bothwick <neil@(protected):
> On Sun, 30 Mar 2008 15:48:54 -0400, Hal Martin wrote:
>
> > You cannot use tar unless you create an exclude file, as it will copy
> > the contents of /dev and /sys, which means the entire contents of RAM,
> > and anything that is currently being generated by your devices will be
> > copied as well.
> >
> > Personally, I would use either tar or rsync to do this, however, in
> > saying that, I have never actually done this with a live system. This is
> > the tar command I use for copying inactive systems, and it works quite
> > well.
> >
> > (cd /mnt/source; tar cfpl - .) | (cd /mnt/dest; tar xfp -)
> >
> > I assume you could just generate an exclude file, and include that in
> > the first command
>
> You don't need an exclude file to avoid /dev and /sys because they are on
> separate filesystems, so your use of -l takes care of this.
>
> Rsync may work, or it may complain that files have changed between
> building the list and copying them and you'd need to use -x to do the
> same as -l with tar. Either way, shut down as many services as possible
> during the copy, particularly anything that uses databases.
>
>
> --
> Neil Bothwick
>
> If you got the words it does not mean you got the knowledge.
>
Now, correct me if I'm wrong, but I had read that if you don't copy
the files in /dev, udev won't mount properly on the machine you're
cloning to and all hell will break lose. Also, iirc, I believe I
tarred a running machine (including /dev, excluding /sys) and the
clone was successful.
Any thoughts?
--
Dan Cowsill
http://www.danthehat.net
--
gentoo-user@(protected)