Jump to content

Compare the databases (movies, series, etc.) between two servers


Recommended Posts

DragoMag
Posted

Hello,

I hope you are well, I am not very well...

To explain quickly, I lost my data due to a format (done by someone else, a technician...) when I should have just reinstalled Windows. He used a custom script, but the script formats all the drives it sees, even though I had specifically mentioned that I only wanted to format my C drive, well, here we are...

After 3-4 days I managed to recover a lot of data, but not everything, using MiniTool Power Data Recovery. Fortunately, I was able to restore the Emby server, so I have access to everything that was there before, because it keeps a cache (which is great !). So I was able to see how many movies, series, I had before the incident, etc.

What I would like to do now is compare my new Emby (I reinstalled everything to start fresh) with my old one to see what is missing. I looked in the database (library.db) with a software called DB Browser, but found nothing.

Can you help me, please ?

Thank you VERY much in advance, and have a nice day.

Posted

Hi, you could compare the contents of the mediaitems tables of both databases.

DragoMag
Posted

Hello, how do I do it? 

Posted

try running select * from mediaitems where type=5 in both databases.

from there you'll have to eyeball the results or export and view using some other tool.

DragoMag
Posted

I'm currently here :

Is there a way to "better" organize?

DB_Browser_for_SQLite_CJjnxt6eao.png

DB_Browser_for_SQLite_k6gwfITNqT.png

Posted

You could add order by path to the end of the query.

DragoMag
Posted (edited)

I found a way; I type 'movies' (all my movies were in this folder) and I sorted by 'Container' so I only see the files that are in .mkv, .avi etc... and not the subfolders. The issue is that I have about 19 movies that are not in a container but still have an extension.

In Emby, I see 598 movies whereas I have 602 😕

In fact, you should be able to search in the search bar for .mkv (etc...) and 'movies' to get everything.

Edited by DragoMag
update
DragoMag
Posted

I made a SQL code to be able to search :.

SELECT * FROM MediaItems 
WHERE (Path LIKE '%.mkv%' OR Path LIKE '%.mp4%' OR Path LIKE '%.avi%' OR Path LIKE '%.mpegts%') 
  AND Path LIKE '%movies%';

The results are very good 597... one is missing....... 

  • Thanks 1
DragoMag
Posted

Good evening,

I'm getting there little by little now, but I have a problem I didn't expect... I can't compare two .txt files : one with my old movies and the other with the current ones (what's left after data recovery). I just want to see the differences and identify what's missing compared to the old server, so I can have a list of what I need to recover to have all my movies back as before....

Could you help me ?

Thank you in advance and have a good evening :)

Lessaj
Posted

Sort the lists alphabetically and use Compare plugin on Notepad++?

DragoMag
Posted

image.thumb.png.e6a219302ad9d914d1bceed0e24e4bd3.png

Is this a bit weird ?

Lessaj
Posted

It's hard to read because of the colour scheme but I think it'll work. Can't really tell since I can't read it. :P 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...