LinHES Forums
http://forum.linhes.org/

Clearing out Video database
http://forum.linhes.org/viewtopic.php?f=17&t=7410
Page 1 of 1

Author:  MiguelSanchez [ Fri Dec 16, 2005 4:13 pm ]
Post subject:  Clearing out Video database

On accident, I ran the Video manager with a backup of my old install (just upgraded from R5A16). I didn't realize until it was too late, and now I have a bunch of files (kernel, sources, etc) in my Video database, which is causing all sorts of problems. I went back to the Video Manager and it's removing the files one by one, but it takes a few seconds for each file and it's been running constantly for about a day. Is there a faster way to wipe clean that part of the database?

Author:  lorenzanaj [ Sat Dec 17, 2005 11:46 am ]
Post subject: 

Do some google searches on mysql querries on deleting everything from the videometadata table. from the linux prompt:

[root@localhost mythconverg]# mysql -p -u mythtv mythconverg
Enter password: mythtv

To view the table:
select * from videometadata;

To delete data from table (not 100% sure on this, google it):
delete * from videometadata;


Good luck.

Author:  spalVl [ Sat Dec 17, 2005 4:57 pm ]
Post subject: 

or, create an empty directory on the Myth box, change MyVideo to use empty directory in Utilities/Setup and go Video Manager when rescans choose to remove bad files.

Author:  MiguelSanchez [ Sat Dec 17, 2005 6:07 pm ]
Post subject: 

spalVl wrote:
or, create an empty directory on the Myth box, change MyVideo to use empty directory in Utilities/Setup and go Video Manager when rescans choose to remove bad files.


The problem is that it has been 2 days since I went back to the Video Manager and it is still removing bad files. I have webmin installed - can I use that to wipe out videometadata? Would that be safe?

Author:  MiguelSanchez [ Sat Dec 17, 2005 10:07 pm ]
Post subject: 

Here is what mysql.log is reporting:

Code:
1 Query       SELECT NULL
                      1 Query       SELECT intid FROM videometadata WHERE filename = '/myth/video/backup/usr/local/lib/vlc/video_output/libopengl_plugin.so'
051217 20:06:35       5 Query       SELECT NULL
                      5 Query       SELECT filename FROM videometadata WHERE intid = 46552
                      5 Query       DELETE FROM videometadata WHERE intid = 46552
                      5 Query       DELETE FROM videometadatacountry WHERE idvideo = 46552
                      5 Query       DELETE FROM videometadatagenre WHERE idvideo = 46552
                      5 Query       DELETE FROM filemarkup WHERE filename = '/myth/video/backup/usr/local/lib/vlc/video_output/libopengl_plugin.so'
                      1 Query       SELECT NULL
                      1 Query       SELECT intid FROM videometadata WHERE filename = '/myth/video/backup/usr/local/lib/vlc/visualization/libvisual_plugin.so'


Should I delete everything from videometadata, videometadatacountry, videometadatagenre, and filemarkup? Or will that kill my mythtv database?

Author:  lorenzanaj [ Sun Dec 18, 2005 1:21 pm ]
Post subject: 

I'd guess myth can't find the files and things go wrong from there. You can possibly put all the files back in those dirs and myth will probably delete them afterwards.

I'd recommend manipulating the database manually as stated b4. But before you mess around w/ the database shut the backend down, and backup the database. I usually just:

Code:
cp -a /var/lib/mysql /var/lib/mysql.bak


Then go ahead and manually delete all records in those tables you found (looks like the complete list you have). Strangly my videometadatcountry and filemark tables don't have any records so I'm not sure what got put in there.

Code:
mysql> select * from videometadatacountry;
Empty set (0.00 sec)

mysql> select * from filemarkup;
Empty set (0.01 sec)


I usually backup my database once a month just for occasions your experiencing now.

Author:  MiguelSanchez [ Sun Dec 18, 2005 5:53 pm ]
Post subject: 

I did do a backup, and tried to look at videometadatacountry and filemarkup tables but webmin told me there wasn't a primary index or something. Anyhow, I deleted everything and it seems like things are running smoothly now. Thanks for all the help!

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/