Benyamin Dvoskin wrote:
> Hi All ,
>
> I've been wondering how one can clone an entire gentoo system and copy
> it to another physical machine , while the original system is still
> running ( means , ghost , acronis and other tools that force me to
> shutdown the system are not acceptable )
>
> So , someone told me to try just "tar" the whole system to the other
> machine and "untar" it there.
It is possible, that I know, but it is also difficult.
>
> The question is how can I do that ? what are the correct attributes
> and flags ?
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 ('tar cfpl - .') and it *should* work for you.

The other way would be to use rsync, which I have less experience using,
but should do the job.

rsync -avHp --progress / /mnt/dest/

There's a space between / and /mnt/dest, just incase that's unclear...
>
> Or maybe someone have other ideas ?
Again, you'd have to find a way to exclude /dev /sys, and probably
another directory or two too, but again, I don't really have any
experience copying a live system. I'm sure other learned people on this
list will have lots of useful suggestions for you!
>
> Thanks
>
> Benyamin
-Hal
-- 
gentoo-user@lists.gentoo.org mailing list

Reply via email to