View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 15 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Mon May 16, 2005 2:18 pm 
Offline
Joined: Wed Dec 10, 2003 8:31 pm
Posts: 1996
Location: /dev/null
I'd like to migrate my system from its current 160 gig drive to a 320 or 400 in the near future. Unless I'm mistaken, I can run mythbackup on the old drive, copy those files plus /myth to the new drive and do a myth restore. Has anyone done this before? If so, what process worked best for you (i.e. clean install on the new drive and migrate the files over)?

Currently running R5A15.1

Thanks all.

_________________
Retired KM user (R4 - R6.04); friend to LH users.


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 16, 2005 2:56 pm 
Offline
Joined: Fri Sep 19, 2003 7:05 pm
Posts: 5088
Location: Fontana, Ca
Yes, what you describe will work. Yes, it has been done before. As far as which process worked best, you're not giving us as second option to compare against. Various ways of do this has been discussed on the forum before....

_________________
cesman

When the source is open, the possibilities are endless!


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 16, 2005 3:03 pm 
Offline
Joined: Fri Apr 02, 2004 10:08 am
Posts: 1637
Location: Virginia, USA
If you have room in your case for a second hard drive, I would just add the new larger hard drive as a slave and use LVM to get both drives working together. That way you could use the space on your old 160 as well as the new space.

There are good docs on the wiki on how to use LVM.


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 16, 2005 3:17 pm 
Offline
Joined: Wed Dec 10, 2003 8:31 pm
Posts: 1996
Location: /dev/null
Thanks for the quick replies. I actually have a use for the old drive, so after the transfer, it'll be out of the case. I'll go the mythbackup route. I'm not a real LINUX guru so it'll probably be painful. Here's the process as I see it:

1. install new drive/unplug old drive
2. install/setup r5a15.1 on new drive
3. add old drive and mount to something like /old
4. copy mythbackup files to new dir structure
5. copy old myth contents to new drive (is it as simple as: $ mv /old/myth /myth)?

Does that seem reasonable?

Thanks again.

_________________
Retired KM user (R4 - R6.04); friend to LH users.


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 16, 2005 5:31 pm 
Offline
Joined: Fri May 21, 2004 11:55 pm
Posts: 1206
Location: Silicon Valley, CA
If it were me, I think I'd put the new disk in and do a fresh install. Then I'd stick in the "old" disk as a second drive and copy the contents of its /myth partition to the new drive. Then I'd do a "mythrestore", pull out the old drive again, and all's well. Heck, you could probably even put the old disk in a USB2.0 enclosure to copy its /myth partition.

This approach has the advantage that at any point you can punt and put in the old drive again. Nothing on it is touched until you re-purpose it in your next computer.

_________________
Do you code to live, or live to code?
Search LinHES forum through Google


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 16, 2005 6:24 pm 
Offline
Joined: Wed Dec 10, 2003 8:31 pm
Posts: 1996
Location: /dev/null
OK... sounds like a plan. Thanks for the input.

_________________
Retired KM user (R4 - R6.04); friend to LH users.


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 26, 2005 2:52 pm 
Offline
Joined: Wed Dec 10, 2003 8:31 pm
Posts: 1996
Location: /dev/null
If Airborne Express comes on time, I'll be trying this on new drive this weekend. I'll post in this thread once it's complete.

_________________
Retired KM user (R4 - R6.04); friend to LH users.


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 27, 2005 4:40 pm 
Offline
Joined: Wed Dec 10, 2003 8:31 pm
Posts: 1996
Location: /dev/null
Cool... the R5A15.1 install on the new 320 gig drive went flawlessly (thanks again Cesman and Dale). Now I'm at a point where I have connected the old drive as a slave and would like to copy over the files and run mythrestore.

I mounted the drive like this (please be nice since I'm pretty new at using LINUX):

Code:
# mount /dev/hdb4 /old


That successfully placed the old drive's /myth to the new drive's /old

Now, I'm just planning to manually copy the contents of /old/tv /old/backup and /old/video over to the /myth/tv /myth/backup and /myth/video


:EDIT:

Ran mythrestore and everything worked great!

_________________
Retired KM user (R4 - R6.04); friend to LH users.


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 30, 2005 6:32 am 
Offline
Joined: Tue Oct 05, 2004 8:53 pm
Posts: 15
For future reference, an easy way to copy a directory tree is

Code:
cp -a source destination


or in this case

Code:
cp -a /old /myth


The -a means "archive" which tells cp to:
    copy all files recursively (all subdirectories);
    preserve all symlinks, but not follow them; and
    preserve file ownership and time stamps.


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 30, 2005 7:41 am 
Offline
Joined: Wed Dec 10, 2003 8:31 pm
Posts: 1996
Location: /dev/null
Thanks for the tip, Kebe. I saw those switches in the man page, but doing each of the dirs separately was the safest bet for me :)

_________________
Retired KM user (R4 - R6.04); friend to LH users.


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 30, 2005 9:14 am 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
The old Unix portability stand-by for this is:
Code:
(cd source_dir ; tar cf - *) | (cd dest_dir ; tar xvf -)

There are any number of ways to do this on more modern systems using "cp -a", "rsync -av", ... but the "tar trick" is one that works pretty much everywhere.


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 30, 2005 12:34 pm 
Offline
Joined: Tue Dec 07, 2004 12:04 pm
Posts: 369
tjc wrote:
The old Unix portability stand-by for this is:
Code:
(cd source_dir ; tar cf - *) | (cd dest_dir ; tar xvf -)

There are any number of ways to do this on more modern systems using "cp -a", "rsync -av", ... but the "tar trick" is one that works pretty much everywhere.


Does `tar cf - *` automatically include dotfiles (hmmm...I guess my concern is the top level directory of that subtree)?

-brendan


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 30, 2005 4:41 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
No it doesn't, but that's trivial to fix by using "tar -cf .* *" or "tar cf ." if you have dotfiles to worry about.


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 30, 2005 6:00 pm 
Offline
Joined: Tue Apr 13, 2004 6:51 pm
Posts: 890
Location: Groton, MA
Quote:
No it doesn't, but that's trivial to fix by using "tar -cf .* *" or "tar cf ." if you have dotfiles to worry about.


dont forget the hyphen

tar -cf - .* *

_________________
R5F1 - Dell P4 2.4Ghz 500MB - PVR250 x 2 - GeForce FX 5200 - Onboard sound/NIC 80GB ATA/250GB ATA/400GB SATA


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 30, 2005 11:16 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
Sigh... My bad... For one that gets dot files too, use:
Code:
(cd source_dir ; tar cf - .) | (cd dest_dir ; tar xvf -)

Serves me right for tossing out an answer without thinking... :(


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 15 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: Bing [Bot] and 3 guests


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 post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu