View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 13 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Tue Dec 06, 2005 2:49 pm 
Offline
Joined: Sun May 08, 2005 2:48 am
Posts: 107
Location: New Zealand
Hi there,

I have a my /myth/video and /myth/tv dirs symbolically linked to /data/video and /data/tv respectively. /data is a the mount point for a large (400G) external disk.

(There is a reason why - to do with preserving lots of tv and video data when moving to knoppmyth from std mythtv install.)

I'm currently running R5A15.1, and I am looking to upgrade to R5A26.

My question is:
will the upgrade preserve my video and tv data given the symbolic links above?

Many thanks for your help.
Paul.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 06, 2005 3:08 pm 
Offline
Joined: Fri Sep 19, 2003 7:05 pm
Posts: 5088
Location: Fontana, Ca
On an a auto-upgrade, /dev/hda1 (/) is wiped clean. So the question is where do you have those symlinks?

_________________
cesman

When the source is open, the possibilities are endless!


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 07, 2005 1:15 am 
Offline
Joined: Sun May 08, 2005 2:48 am
Posts: 107
Location: New Zealand
cesman wrote:
On an a auto-upgrade, /dev/hda1 (/) is wiped clean. So the question is where do you have those symlinks?


Hi there - thanks for getting back to me.

My structure is as follows:
Code:
~$ mount
/dev/hda1 on / type ext3 (rw,errors=remount-ro)
none on /proc type proc (rw,nodiratime)
/dev/hda3 on /cache type ext2 (rw,noatime)
/dev/hda4 on /myth type ext3 (rw,noatime)
sysfs on /sys type sysfs (rw)
/dev/sda1 on /data type ext3 (rw,noatime)
usbfs on /proc/bus/usb type usbfs (rw)
~$


On the internal disk:
root and home are on /dev/hda1 (3.5GB)
/myth is on /dev/hda4 (150GB)
/cache is on /dev/hda3 (10GB)

On the external disk:
/data is on /dev/sda1 (400GB)

Looking at /myth, you can see the links:
Code:
~$ ls -l /myth
total 76
drwxr-xr-x    6 www-data www-data  4096 Oct 19  2004 avimanager
drwxrwxr-x    2 mythtv   mythtv    4096 Jun 18 10:34 backup
drwxrwxr-x    3 mythtv   mythtv    4096 Jun 18 19:52 gallery
drwxrwxr-x    6 mythtv   mythtv    4096 May  8  2005 games
drwxrwxrwx    2 mythtv   mythtv   12288 Dec  6 22:47 image_cache
drwx------    2 mythtv   mythtv   16384 May  8  2005 lost+found
drwxrwxr-x  220 mythtv   mythtv   12288 Nov 16 20:49 music
drwxrwxr-x    8 mythtv   mythtv    4096 Nov 14 21:18 nuv2disc
drwxrwxrwx    3 mythtv   mythtv    4096 Nov 29 07:34 playlists
drwxrwxr-x    3 mythtv   mythtv    4096 Dec  5 22:23 tmp
lrwxrwxrwx    1 root     root         8 May 10  2005 tv -> /data/tv
lrwxrwxrwx    1 root     root        11 May 10  2005 video -> /data/video
~$


If I understand you, /dev/hda1 is wiped, but /dev/hda3 and 4 will remain unchanged. Therefore, my symbolic links in /myth will be preserved.

However, since the external disk is mounted at /data - the mount point will disappear. So the symbolic links /myth/tv and /myth/video will point to nothing.

As an aside, is it possible to change just the TV and VIDEO directories inside myth?

Thanks for any advice you can provide.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 07, 2005 11:05 am 
Offline
Site Admin
Joined: Fri Sep 19, 2003 6:37 pm
Posts: 2659
Location: Whittier, Ca
You can change any MythTV configuration you want. I'd suggest reading the MythTV docs is you have questions.


Top
 Profile  
 
PostPosted: Wed Dec 07, 2005 4:44 pm 
Offline
Joined: Sun May 08, 2005 2:48 am
Posts: 107
Location: New Zealand
cecil wrote:
You can change any MythTV configuration you want. I'd suggest reading the MythTV docs is you have questions.


Thanks - will do.

So to conclude:
- my video and TV data is on an external disk
- that disk is mounted on /data.
- /data will disappear during upgrade as /dev/hda1 is overwritten. The mount table will be replaced (right?) and the mount point will be deleted. The actual information on the external disk will not be touched.

I think my question still stands:
- how does one preserve tv/video data on an external disk during upgrade?

Is the correct answer that I just do the upgrade, after which all the TV and video DB entries will point nowhere, then remount the external disk. Does the upgrade process check for Recordings and Videos that have missing data?

(excuse my pickiness here - I want to be very careful not to lose this data. When I switched to knoppmyth from building mythtv myself, I had to manually reinsert all recordings for the kids saved stuff. What a pain!)

Thanks again for your help.
Cheers.
Paul.


Top
 Profile  
 
PostPosted: Wed Dec 07, 2005 5:56 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
tuatara wrote:
- /data will disappear during upgrade as /dev/hda1 is overwritten. The mount table will be replaced (right?) and the mount point will be deleted. The actual information on the external disk will not be touched.

I think my question still stands:
- how does one preserve tv/video data on an external disk during upgrade?

Since that disk won't be touched by the upgrade, and the MythTV code refuses to delete program entries from the database when it can't find the file on disk for exactly this reason, you don't have to do anything to preserve it. Also, during an upgrade even the /myth partition isn't touched so your links should still be there.

To access it, save your current /etc/fstab and after recreating the mount point, either copy it back over or just cut and paste the entry for your data disk into the the post upgrade /etc/fstab.

You can even just use the following sequence of post-upgrade commands as root.
Code:
mkdir /boot
# Remove the bogus entry for /dev/sda1
sed '/\/dev\/sda1/d' </etc/fstab >/etc/fstab.new
# Add back the good one for it as /data
echo '/dev/sda1 on /data type ext3 (rw,noatime)' >>/etc/fstab.new
# Make sure it's not mounted
umount /dev/sda1
# Flip the files
mv /etc/fstab /etc/fstab.old
mv /etc/fstab.new /etc/fstab
# Remount the disk as /data
mount /dev/sda1


Top
 Profile  
 
 Post subject: I am good to go now...
PostPosted: Wed Dec 07, 2005 6:59 pm 
Offline
Joined: Sun May 08, 2005 2:48 am
Posts: 107
Location: New Zealand
Thank you kindly for your help.
Paul.


Top
 Profile  
 
 Post subject: Upgrade trashes data...
PostPosted: Sat Dec 10, 2005 4:57 am 
Offline
Joined: Sun May 08, 2005 2:48 am
Posts: 107
Location: New Zealand
tjc wrote:
Since that disk won't be touched by the upgrade, and the MythTV code refuses to delete program entries from the database when it can't find the file on disk for exactly this reason, you don't have to do anything to preserve it. Also, during an upgrade even the /myth partition isn't touched so your links should still be there.


Well - I completed the upgrade tonite, and I can report some emperical results:

a) symbolic links were preserved. So on reboot just remounted the /data partition (great)
b) all information in mythtv-setup is gone (channels, cards etc). Not a problem as its trivial to fix. however if the plan is to trash this data, we probably should run mythtv-setup after upgrade. (not so great)
b) all information about music, videos and recorded tv programs is gone from the database (major bummer).

After reboot, I remounted the external disk. Then checked the database, and "select * from recorded" gets nothing. From the front end, all music and video were empty until I rescanned music and video. bummer is that all the IMDB data and hand entered data is lost.

Even worse is the loss of all information about recorded programs - I had a lot of the kids and S.O's programs in there, they will be royally p.o.'d when I break the news tomorrow morning. I'm looking at trying to manually reenter this data... ick.

Is this a bug? If so is a pretty yukky one.

I was upgrading from 15.1 to 26.

Is it possible to reverse the upgrade? I did do a backup prior to upgrading.

(sigh) I'm going to bed - this is one I need to walk away from for a day or so...

Yours unhappily.
Paul.


Top
 Profile  
 
PostPosted: Sat Dec 10, 2005 10:12 am 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
tuatara wrote:
b) all information in mythtv-setup is gone (channels, cards etc). Not a problem as its trivial to fix. however if the plan is to trash this data, we probably should run mythtv-setup after upgrade. (not so great)
b) all information about music, videos and recorded tv programs is gone from the database (major bummer).

Did you remember to do a backup (using /usr/local/bin/mythbackup)? This is called out quite clearly in the upgrade instructions: http://www.mysettopbox.tv/doc.html#autoupgrade and http://www.knoppmythwiki.org/index.php?page=KnoppMythInstall#autoupgrade

If you have a backup the upgrade should restore from it automatically. I've typically got well over 100 recordings and 1000 songs on the KnoppMyth box and they come through every upgrade just fine. If you actually did do a backup, which wasn't restored by the upgrade for some reason, you can always run the restore (using /usr/local/bin/mythrestore) manually.


Top
 Profile  
 
PostPosted: Sun Dec 11, 2005 5:05 am 
Offline
Joined: Sun May 08, 2005 2:48 am
Posts: 107
Location: New Zealand
tjc wrote:
tuatara wrote:
b) all information in mythtv-setup is gone (channels, cards etc). Not a problem as its trivial to fix. however if the plan is to trash this data, we probably should run mythtv-setup after upgrade. (not so great)
b) all information about music, videos and recorded tv programs is gone from the database (major bummer).

Did you remember to do a backup (using /usr/local/bin/mythbackup)? This is called out quite clearly in the upgrade instructions: http://www.mysettopbox.tv/doc.html#autoupgrade and http://www.knoppmythwiki.org/index.php?page=KnoppMythInstall#autoupgrade

If you have a backup the upgrade should restore from it automatically. I've typically got well over 100 recordings and 1000 songs on the KnoppMyth box and they come through every upgrade just fine. If you actually did do a backup, which wasn't restored by the upgrade for some reason, you can always run the restore (using /usr/local/bin/mythrestore) manually.


Hey there,

Yes I did the backup - but I used backup from the Knoppmyth menu. I remember reading that it was the same. Of course the command line is better - you are sure to see if there were errors.

When I restore now - it blanks the DB. So I assume my backup failed.

Sigh. Nearly there with a manual restore.
Thanks
Paul.


Top
 Profile  
 
PostPosted: Sun Dec 11, 2005 10:48 am 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
tuatara wrote:
Yes I did the backup - but I used backup from the Knoppmyth menu. I remember reading that it was the same. Of course the command line is better - you are sure to see if there were errors.

Correct on both counts.
tuatara wrote:
When I restore now - it blanks the DB. So I assume my backup failed.

Ugh... Have you looked in the /myth/backup directory to see if there is anything in the mythconverg.sql file? Were there any errors produced by the restore? I'm wondering if you can just pull out the data for the recorded programs and maybe the settings and feed them in mysql since everything else can be reconstructed.
Code:
grep "\`settings\`" /myth/backup/mythconverg.sql
grep "\`recorded\`" /myth/backup/mythconverg.sql


Top
 Profile  
 
PostPosted: Mon Dec 12, 2005 2:01 am 
Offline
Joined: Sun May 08, 2005 2:48 am
Posts: 107
Location: New Zealand
tjc wrote:
tuatara wrote:
Yes I did the backup - but I used backup from the Knoppmyth menu. I remember reading that it was the same. Of course the command line is better - you are sure to see if there were errors.

Correct on both counts.
tuatara wrote:
When I restore now - it blanks the DB. So I assume my backup failed.

Ugh... Have you looked in the /myth/backup directory to see if there is anything in the mythconverg.sql file? Were there any errors produced by the restore? I'm wondering if you can just pull out the data for the recorded programs and maybe the settings and feed them in mysql since everything else can be reconstructed.
Code:
grep "\`settings\`" /myth/backup/mythconverg.sql
grep "\`recorded\`" /myth/backup/mythconverg.sql


Checked - the backup file exists, but is empty! Interestingly an old backup file (mythconverg.sql.bak) is there from June with valid data. Its old but I should be able to copy some lines from it for some of the 'recorded' data.

Thanks for the hints. Note for the future - dont use the GUI backup, use the command line one.


Top
 Profile  
 
PostPosted: Mon Dec 12, 2005 8:03 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
tuatara wrote:
Checked - the backup file exists, but is empty!

So sorry to hear that. Rotten luck... :(
tuatara wrote:
Thanks for the hints. Note for the future - dont use the GUI backup, use the command line one.

Yeah, or check the file. I'm very paranoid about this myself...


Top
 Profile  
 

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


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 2 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