Recovering MySQL Database from Exported Library
#1
I upgraded to Frodo and am trying to rebuild MySQL database from the exported library backup. The issue I am encountering is that after it's been imported, I run a library update and it just scans a duplicate of everything that's already in the library. I have the following files from when I was running Eden.

- full userdata folder
- exported xbmc_videodb_2013-01-28 folder

Here is the process I am using to rebuild the database.
- Cleaned out all old databases from MySQL using the drop database command
- Transfer all of my .xml files from the old userdata folder to the new frodo userdata folder
- Transfer the exported xbmc_videodb_2013-01-28 library folder to the xbmc users home folder
- Reboot XBMC Frodo
(Once it's rebooted I can see the XBMC databases created in MySQL)
- Import the xbmc_videodb_2013-01-28 from the xbmc users home folder.
(This takes a while so I just leave it over night)
- Reboot XBMC in the morning
- All my stuff is back in there and I can play everything without a problem.
- Run a library update and it just scans duplicates of everything that's already there.

I've had this happen a few times now (I'm a sucker for punishment) and I am likely doing something wrong. Before anyone tells me I should have followed the instructions here http://wiki.xbmc.org/index.php?title=HOW...BMC_to_v12 I did try those steps and ended up with having to do the failed upgrade option.
Reply
#2
The reason is very likely that the duplicates are from paths that are subtly different. Check the path table in the database before and after dupes and you'll notice that it's added another set. Once you know the why, you'll likely know how to fix.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#3
Thanks for your reply. Last night I did a fresh run again. Here is how I have things structured on the NAS.

Movies:
MoviesHD/MovieName/MovieRARFile.rar/Movie.mkv

TV:
TVHD/TVShowName/Season#/Ep1.mkv

The TV shows are not affected by this issue. Only the movies which are stored in RAR files are affected.

I went into the database and as per your request I found one of the movies in question.

In path, strPath I am not seeing any duplicates. However in the movie table. row c22 seems to be where the path is located and in one of the movies where there's a dupe. Both path's are completely identical, I even made sure that there wasn't a space or anything at the end of the entry.
Reply
#4
No, row c22 is not where the information is duplicated.

Check the rows of the duplicate carefully. There will be a difference in idFile most likely - that then goes to the files table where you'll have two subtley different files. Fix 'em up and away you go.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#5
Perfect, I am seeing the differences now. Any particular reason why the file path would look like this?

OLD PATH:
rar://smb%3a%2f%2fservername%2ffiles%2fMoviesHD%2f12%2eMonkeys%2e1995%2e1080p%2e

NEW PATH:
rar://smb%3a%2f%2fservername%2ffiles%2fMoviesHD%2f12.Monkeys.1995.1080p.

After looking at files that are not in RAR files they just simply show the file name. How would I go about fixing this?

EDIT: Ultimately it seems as though extracting the files would be my safest bet but I'd like to avoid that if at all possible.
Reply
#6
Anyone have idea's as to how I can avoid having to unrar everything I have?
Reply
#7
Don't import your old library, just scan
If I have been of help, please add to my reputation as a way of saying thanks, it's free.
Reply
#8
I have over 1400 movies. Re-setting the whole libraries watched/unwatched status will be a massive pita.
Reply
#9
Use http://trakt.tv and the XBMC add-on to save the watch status from the old set up, then restore from that in the new set up.
Reply
#10
None of these solutions work to solve my issue. Is there any particular reason why the file path changes between version when you are using RAR files? Every time I upgrade to a new version of XBMC I run into the same problems.
Reply
#11
This is honestly just a guess, and it might be a bug after all, but I'm thinking not a lot of people test this with rars because keeping movies in rar archives is pants on head retarded.
Reply
#12
Maybe I'm missing something but why are you exporting/importing your library? Frodo should make a copy of your Eden database and update it automatically.
If I have been of help, please add to my reputation as a way of saying thanks, it's free.
Reply
#13
@Dlilligaf: It did originally just make a copy but for some reason when I scan for new files it just re-adds everything.
Reply
#14
(2013-02-05, 06:09)Ned Scott Wrote: This is honestly just a guess, and it might be a bug after all, but I'm thinking not a lot of people test this with rars because keeping movies in rar archives is pants on head retarded.

^^^This. I actually didn't even know this would work.
Reply

Logout Mark Read Team Forum Stats Members Help
Recovering MySQL Database from Exported Library0