Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] Possible to copy/paste ALL files in / ?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
urguncle
n00b
n00b


Joined: 03 Feb 2007
Posts: 12

PostPosted: Tue Feb 20, 2007 6:04 pm    Post subject: [solved] Possible to copy/paste ALL files in / ? Reply with quote

If I want to make a backup, can I simply set up partitions on another drive and then copy all files from my current Gentoo to that HD?

(Afterwards I'll replug the HDs to make the new one master and all that.. And I'll run a quickie with the Gentoo CD to fix up Grub.)

I'm gonna switch harddrives, and I want my system exactly as it is now - but on the other HD..

Will this work?


Last edited by urguncle on Wed Feb 21, 2007 3:14 pm; edited 1 time in total
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3846
Location: Austro Bavaria

PostPosted: Tue Feb 20, 2007 6:27 pm    Post subject: Reply with quote

You could make a stage4 install on your second drive. There are guides on the web. Tell me your progress if you try it!
Back to top
View user's profile Send private message
urguncle
n00b
n00b


Joined: 03 Feb 2007
Posts: 12

PostPosted: Tue Feb 20, 2007 7:04 pm    Post subject: Reply with quote

Yeah I know about the stage 4 scripts. But I don't want to have a stage 4.

I don't want to backup a part of my system - I want to backup everything on the partition..

I don't want to tar anything, or do anything strange.

I just want to "cp hda1/* hdb1/".

And then switch the drives, and run Gentoo CD to fix the MBR on the new disk (I'll wipe the old one).

Humm, would this work?
Back to top
View user's profile Send private message
BlackEdder
Advocate
Advocate


Joined: 26 Apr 2004
Posts: 2588
Location: Dutch enclave in Egham, UK

PostPosted: Tue Feb 20, 2007 7:32 pm    Post subject: Reply with quote

A cp -a will work fine. Although it would be best to not copy /dev and /proc

http://www.tldp.org/HOWTO/Hard-Disk-Upgrade/copy.html
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3846
Location: Austro Bavaria

PostPosted: Tue Feb 20, 2007 7:46 pm    Post subject: Reply with quote

Are these two discs IDE, or IDE and SATA, or two SATA discs.

There are certain directorys which shouldn*t be copied, because that makes no sense. Especially /proc ....
Back to top
View user's profile Send private message
ffaerton
n00b
n00b


Joined: 14 Apr 2005
Posts: 22

PostPosted: Tue Feb 20, 2007 8:19 pm    Post subject: Reply with quote

use rsync - cause rsync rocks

Code:
rync -varn --filter='/dev /proc' /mnt/backups/myBackup
tar cvf backup.tar myBackup
gzip backup.tar


the n option is for a dry run. ie: tell me what you're going to do before you go and do it. The filter option does what it sounds like it should do and excludes those files from the list that rsync builds before it's going to copy.

backing up everything in / isn't generally the way to go about it, have a peep at this from the wiki http://gentoo-wiki.com/HOWTO_Backup

And then i just re read your post and realised that i'd missed the point :wink: You broke your MBR? so you really need to just reinstall grub in your mbr?
Back to top
View user's profile Send private message
urguncle
n00b
n00b


Joined: 03 Feb 2007
Posts: 12

PostPosted: Wed Feb 21, 2007 3:14 pm    Post subject: Reply with quote

Thanks for the info, I'll try to fix the partitions right and sort of do a

Code:
cp -ax / /newdisk


I'll see what happens. I've already backed up all my important data, so in the worst case I'll have to spend 3 days setting up a fresh Gentoo..

Wish me luck. 8)
Back to top
View user's profile Send private message
padoor
Advocate
Advocate


Joined: 30 Dec 2005
Posts: 4185
Location: india

PostPosted: Wed Feb 21, 2007 3:52 pm    Post subject: Reply with quote

i have had troubles with copying the / to other partitions all dont get copied. some not readable some not movable.
moving has worked better than copy. thought grub has to be installed again and fstab to be rewritten.
hda hdc change of location it does not agree with. if you move it is one chance of working or reinstall. copying gives second third chances also.
in my experience reinstall new gentoo is far easier than end up with a copied / moved broken borked system. i was not at all happy with the performance of the moved install.
_________________
reach out a little bit more to catch it (DON'T BELIEVE the advocate part under my user name)
Back to top
View user's profile Send private message
urguncle
n00b
n00b


Joined: 03 Feb 2007
Posts: 12

PostPosted: Sun Feb 25, 2007 1:23 pm    Post subject: Reply with quote

Well, I just wanted to post my success.

I'm currently using the new harddrive to write this, and everything seems to work just fine..

Cheers!
Back to top
View user's profile Send private message
padoor
Advocate
Advocate


Joined: 30 Dec 2005
Posts: 4185
Location: india

PostPosted: Mon Feb 26, 2007 10:03 am    Post subject: Reply with quote

three cheers thats very good
enjoy
:D :D :D
_________________
reach out a little bit more to catch it (DON'T BELIEVE the advocate part under my user name)
Back to top
View user's profile Send private message
Cyker
Veteran
Veteran


Joined: 15 Jun 2006
Posts: 1746

PostPosted: Mon Feb 26, 2007 7:35 pm    Post subject: Reply with quote

I did this with Midnight Commander! (mc) :mrgreen:

You get a nifty progress bar too :mrgreen:

Unfortunately I forgot to install grub on the mbr of the target drive! :shock:
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things 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