View previous topic :: View next topic |
Author |
Message |
zen_guerrilla Guru
Joined: 18 Apr 2002 Posts: 343 Location: Greece
|
Posted: Sat Sep 14, 2002 3:06 pm Post subject: Dublicating installation with tar |
|
|
Hello world,
I want to transfer a gentoo installation 'as is' on another hard drive with tar. The following has worked fine on slack-8.1 without devfs:
Code: | tar cplf - -C / . | tar xvpf - -C /mnt/other_disk |
Has anyone tried it with gentoo ? Since gentoo is using devfs & tmpfs I' m not sure for the results. If that doesn't work on gentoo, is there another way to do it ? The reason I want to do that is to convert the slack-based network (only the workstations, not the server) on my work to gentoo 1.4rc1
.:: zen ::. |
|
Back to top |
|
|
de4d Apprentice
Joined: 12 Sep 2002 Posts: 181 Location: fr. i. br. (ger)
|
Posted: Sat Sep 14, 2002 3:17 pm Post subject: |
|
|
dont actually know but id expect
Code: |
mount /dev/<sourcerootp> /mnt/src
mount /dev/<targetrootp> /mnt/target
tar cplf - -C /mnt/src . | tar xvpf - -C /mnt/target
|
to work...
(if your version fails @ /dev - didnt try) _________________ void main(){fork();main();} |
|
Back to top |
|
|
zen_guerrilla Guru
Joined: 18 Apr 2002 Posts: 343 Location: Greece
|
Posted: Sat Sep 14, 2002 3:23 pm Post subject: |
|
|
I also expect it' s gonna work, but I' m not sure for the results. Has anyone else tried it ?
p.s. : Your version is the same as mine....
.:: zen ::. |
|
Back to top |
|
|
rac Bodhisattva
Joined: 30 May 2002 Posts: 6553 Location: Japanifornia
|
Posted: Sat Sep 14, 2002 5:00 pm Post subject: |
|
|
I described a way to use cpio to do this in this thread. That way, you can use find's -prune options to avoid any directories you want to avoid. _________________ For every higher wall, there is a taller ladder |
|
Back to top |
|
|
de4d Apprentice
Joined: 12 Sep 2002 Posts: 181 Location: fr. i. br. (ger)
|
Posted: Sat Sep 14, 2002 5:06 pm Post subject: |
|
|
zen_guerrilla wrote: |
p.s. : Your version is the same as mine....
|
not when ur system on / is currently running (imho)
mounting ur root partition in another directory gives u more 'direct' access to the files (esp. those in /dev or /proc (which arent really there))
if this is basically wrong please correct me :] _________________ void main(){fork();main();} |
|
Back to top |
|
|
Naan Yaar Bodhisattva
Joined: 27 Jun 2002 Posts: 1549
|
Posted: Sat Sep 14, 2002 5:22 pm Post subject: |
|
|
I use something similar (though not exactly the same) for making backups to CD-ROM. I assume that you have only one partition since you are turning of spanning of file systems using the 'l' option. After you make the copy, you can do a "tar d" (or a diff -r) to make sure that the copy went OK.
Transient things (like proc, tmpfs and devfs) should not really matter and will be excluded from the tar with the 'l' option. You can use the copy as your root on a reboot to check whether things are OK. |
|
Back to top |
|
|
zen_guerrilla Guru
Joined: 18 Apr 2002 Posts: 343 Location: Greece
|
Posted: Sat Sep 14, 2002 6:08 pm Post subject: |
|
|
de4d: From tar' s man page :
Code: | -l, --one-file-system
stay in local file system when creating an archive |
So our versions are actually the same since it doesn't tar any mounted fs on the local fs (/).
Thanx all for answering. I' ll try it maybe next week, since we' re getting 7 new machines, and let u know for the results. |
|
Back to top |
|
|
|