Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Dublicating installation with tar
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
zen_guerrilla
Guru
Guru


Joined: 18 Apr 2002
Posts: 343
Location: Greece

PostPosted: Sat Sep 14, 2002 3:06 pm    Post subject: Dublicating installation with tar Reply with quote

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
View user's profile Send private message
de4d
Apprentice
Apprentice


Joined: 12 Sep 2002
Posts: 181
Location: fr. i. br. (ger)

PostPosted: Sat Sep 14, 2002 3:17 pm    Post subject: Reply with quote

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
View user's profile Send private message
zen_guerrilla
Guru
Guru


Joined: 18 Apr 2002
Posts: 343
Location: Greece

PostPosted: Sat Sep 14, 2002 3:23 pm    Post subject: Reply with quote

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
View user's profile Send private message
rac
Bodhisattva
Bodhisattva


Joined: 30 May 2002
Posts: 6553
Location: Japanifornia

PostPosted: Sat Sep 14, 2002 5:00 pm    Post subject: Reply with quote

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
View user's profile Send private message
de4d
Apprentice
Apprentice


Joined: 12 Sep 2002
Posts: 181
Location: fr. i. br. (ger)

PostPosted: Sat Sep 14, 2002 5:06 pm    Post subject: Reply with quote

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
View user's profile Send private message
Naan Yaar
Bodhisattva
Bodhisattva


Joined: 27 Jun 2002
Posts: 1549

PostPosted: Sat Sep 14, 2002 5:22 pm    Post subject: Reply with quote

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
View user's profile Send private message
zen_guerrilla
Guru
Guru


Joined: 18 Apr 2002
Posts: 343
Location: Greece

PostPosted: Sat Sep 14, 2002 6:08 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum