View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 9 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Thu May 25, 2006 8:48 am 
Offline
Joined: Sat Jan 14, 2006 10:06 am
Posts: 12
I am going to migrate my current knoppmyth install to a faster computer i have laying around. Which files do I need to pull out of my current install / what commands do i need to run to make it happen? I know i have to get all my current videos off of the computer, but what else?


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 25, 2006 9:05 am 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
The quick outline goes something like this:
    - Do a good backup. See the "Hints for upgrading to R5C7" http://mysettopbox.tv/phpBB2/viewtopic.php?t=10116 for how to make it a modern one.

    - Either move your hard drive or copy all of the /myth directory across (preserving ownerships and permissions). The later may require doing a minimal install on the new box first.

    - Once you've got your /myth in place, do an auto upgrade on the new box so it grabs the backup from /myth and "remembers" where all the recordings and other media are.

There is enough variability in that middle step that I'll wait until you call out whether you're planning on moving the drive or not. Moving the drive is the easiest path if it's practical.


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 25, 2006 10:58 am 
Offline
Joined: Sat Jan 14, 2006 10:06 am
Posts: 12
lets see:

I'm 99% sure the /myth partition is on a totally seperate drive. I want to add more space in this new install, so I am going to grab another big drive, get it up to a 1/2 TB or so. This will require LVM, which I don't have yet but know how to setup. I can't just convert my current /myth parition to LVM (right?), so I will do the following:

1) Run the backup scripts as given in the above links (along with /etc, /root, /home) on the current myth computer (call it comp1).

2) Prepare the new computer (comp2) for myth with the new drive and such. Take the drive with /myth parition on it out of comp1 and install it on comp2.

3) Install knopmyth R5C7 on comp2. Do a manual install and make the new drive LVMable. Mount it as /myth. Finish the install.

4) Copy over my /myth files from the old drive on to the new drive.

5) Format the old drive, LVM it, merge it with the current LVM.

6) (!) Restore all my old files into comp2.

I know what to do except for step 6. Is there a command or something where I can just restore my old database of TV into comp2? I have about 200GBs of TV that I would like to just import right in.... Basically, I just want the TV files, NOT settings, configs, etc.


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 30, 2006 3:15 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
mut3 wrote:
1) Run the backup scripts as given in the above links (along with /etc, /root, /home) on the current myth computer (call it comp1).

OK so far.
mut3 wrote:
2) Prepare the new computer (comp2) for myth with the new drive and such. Take the drive with /myth parition on it out of comp1 and install it on comp2.
3) Install knopmyth R5C7 on comp2. Do a manual install and make the new drive LVMable. Mount it as /myth. Finish the install.

No need to go the manual install route. Just do an auto install from the CD, and at the point mentioned in the R5C7 upgrade hints, use the create_lvm.sh script like this:

Code:
create_lvm.sh /dev/hda3
mke2fs -j -O sparse_super -m0 -i8000000 -L myth /dev/vg/myth
mount /myth

mut3 wrote:
4) Copy over my /myth files from the old drive on to the new drive.

Remember to use a copy command that preserves ownerships and permissions. Something like:
Code:
cp -a /oldmyth/* /myth

mut3 wrote:
5) Format the old drive, LVM it, merge it with the current LVM.

Good.
mut3 wrote:
6) (!) Restore all my old files into comp2.
I know what to do except for step 6. Is there a command or something where I can just restore my old database of TV into comp2? I have about 200GBs of TV that I would like to just import right in....

That's what running the auto-upgrade (using the backup you made in step 1) will do for you. You can run the restore script manually, but I recommend the full upgrade process so you get all the post-restore fixups. I might even recommend doing it before merging the old drive into the LVM volume, just to give yourself more fallback positions.
mut3 wrote:
Basically, I just want the TV files, NOT settings, configs, etc.

That's definitely an advanced topic. It requires performing elective surgery on your DB dump to just include the recordings, and then restoring with that modified backup. Not recommended unless you're comfortable hacking large volumes of SQl with Unix command line utilities.


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 31, 2006 10:22 am 
Offline
Joined: Sun Mar 19, 2006 9:47 am
Posts: 6
Having just migrated onto a new pc and wanting to keep my old recordings I edited the mysql database using phpmyadmin.

There are probably some other things you need to change in the 'mythconverg' database, if anyone knows what they are please tell.

Don't know how comfortable you are using phpmyadmin and mysql, but this is how I did it...


IF YOU ARE NOT SURE HOW TO USE PHPMYADMIN OR MYSQL DON'T DO THIS !!!

DO A BACKUP FIRST
and/or copy the database (Structure and data) using phpmyadmin

On your OLD system, before you pull it apart:-

Run 'phpmyadmin'
Select 'mythconverg' database
Select 'recorded' table
Select 'Export'
- Export as 'SQL'
- deselect 'Structure:'
- deselect 'Add AUTO_INCREMENT value'
- deselect 'Enclose table and field names with backquotes'

Should leave you with the following selected:-
'Data:'
'Use hexadecimal for binary fields'

Tick the 'Save as file' option
Click 'Go'
Should prompt you to save 'recorded.sql' somewhere

Now REPEAT for 'recordedprogram' table
Which gets saved as 'recordedprogram.sql'



On the NEW system :-

DO A BACKUP FIRST
and/or copy the database (Structure and data) using phpmyadmin
Run 'phpmyadmin'
Select 'mythconverg' database
Select 'recorded' table
Select 'SQL'
In the bit that says 'Location of the text file: ' use 'Browse' to find your 'recorded.sql' file
Click 'Go'

REPEAT for 'recordedprogram' table
using 'recordedprogram.sql' file.


As long as the 'mpg' files are in your 'myth/tv' directory thats it.

Tim


Top
 Profile  
 
PostPosted: Mon Aug 11, 2008 10:24 am 
Offline
Joined: Tue Jun 27, 2006 5:19 pm
Posts: 100
Location: Naptown, Indiana; USA
tjc wrote:

- Either move your hard drive or copy all of the /myth directory across (preserving ownerships and permissions). The later may require doing a minimal install on the new box first.



What command or technique is needed to move directorys while preserving ownerships & permissions? I am going to move from an old system to a new system. Since the new system is SATA and the old is PATA, moving the drive itself is not an option.

Since I'm not to linux savvy, the easiest way for me to move a directory between drives is over the network. For example:
1) I'll install Knoppmyth on the new box.
2) I'll plug my old drive into an external enclosure & connect it to a networked PC.
3) I'll use the PC to move the old drive's /myth files over the network to the new Myth box.

Is this process an option?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 11, 2008 4:45 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
Sure. If the networked PC will let you export the mounted file system. Why can't you connect the external drive to the New KM box? That would be easier...

Oh and for copying a whole directory tree:

- cp -ax /old/* /new
- rsync -ax /old/* /new
- ...

Read the man pages on those commands for more options...


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 12, 2008 3:34 pm 
Offline
Joined: Sat Sep 02, 2006 9:17 am
Posts: 359
There's always 1000 different ways to do things in Linux.

Take TJC's advice, plug the external enclosure into the new mythbox. Since you refer to yourself as "not linux saavy" I'll presume that your networked PC is Windows-based. Mounting the old linux drive in Windows is very nearly impossible. Then you'd have to deal with sharing the drive on one side or the other. Then you have to deal with file permissions (Which Windows tends to ignore) Then you'll be crying over the network thruput.

If you'd be happier with a user friendly GUI, you may want to get a System Rescue CD This will boot the PC, let you start X-Windows and run GParted, which is a linux-based disk partitioning GUI.
You'll be able to see all the drives (including the external) in a pull-down.
You can then copy-n-paste the partition from the old drive to the new.
You can then tell GParted to resize the copied partition to fill the new drive.
Hit the go button and watch the progress bars crawl along.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 08, 2008 6:04 am 
Offline
Joined: Wed May 31, 2006 6:54 am
Posts: 52
Location: Pretoria, South Africa
inforce wrote:

Don't know how comfortable you are using phpmyadmin and mysql, but this is how I did it...


IF YOU ARE NOT SURE HOW TO USE PHPMYADMIN OR MYSQL DON'T DO THIS !!!

[


So, I'm not comfortable with phpmyadmin, and I know very little about mysql. What can I do to import old recordings into a new R5.5 machine?

The reason for wanting to do this is that I just descoverd storage groups so now all of a sudden, I have space for those old recordings in an old /myth dirctory on an old disk.

Please help

Douw.


Top
 Profile  
 

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


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 20 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:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu