Jump to content

Identify has stopped working


Recommended Posts

SteveCartman54
Posted

I have been using the MovieDB # to identify movies. Until today it has worked with thousands of movies.

About 10 movies today did not load the metadata. So I tried to load the metadata by using "Identify"

When I use "Identify" to enter the MovieDB # (in this example 533444  for Waves 2019, filename Waves (2019) [tmdbid=533444].mkv), the movie shows, I click on it, but when I click OK (to save it) the circle wait cursor spins for 5 seconds and then stops. Nothing is updated.

This behavior is consistent with all the movies I just uploaded.

I am on Synology version 7 and using docker.

Attached is the embyServer.txt log

 

 

 

 

 

 

 

 

embyserver (4).txt

Happy2Play
Posted

Unfortunately you have a corrupt database.

SQLitePCL.pretty.SQLiteException: Corrupt: database disk image is malformed

Please follow the steps to check and possibly recover database from the KB, but will probably have to start a new database per the last section.

Posted

Please let us know if this helps. Thanks.

SteveCartman54
Posted

Ok So I was able to recover the database.

I used PRAGMA integrity_check in SQlLite and DB Browser  on the Recovery.db and everything was ok.(see attached screen shots)

I rename Library.db to Library.old.  I renamed library-recovered.db to library.db and copied it to my docker folder.

Started up docker. Tried identify and same problem.

I looked at the log and database is malformed (see attached log). 

I have also attached library.db (zipped)

 

Com01.jpg

Screen01.jpg

embyserver (5).txt library.zip

Happy2Play
Posted

You will need to Reset the database per the KB as Recovery did not correct the issue.

Since you have the Server Configuration Backup plugin you will be able to restore your userdata.

 

SteveCartman54
Posted

Renamed Library.db to library.corrupt.

Started Emby.

Users are ok.

But there are no libraries.

 

 

 

SteveCartman54
Posted

Spoke too soon. I went to create a library and now they are all there. 

Happy2Play
Posted (edited)
23 minutes ago, SteveCartman54 said:

Spoke too soon. I went to create a library and now they are all there. 

Yes you have to run a library scan for the new database to start populating existing set libraries.

@cayarsCan you update the final steps in KB to include running a library scan to repopulate the libraries.

Edited by Happy2Play
  • Thanks 1
Happy2Play
Posted
6 minutes ago, SteveCartman54 said:

Users are ok.

Users will be okay, but all previous userdata is not as it was in the corrupt database.  So your new database will have everything as unwatched/unplayed, no favorites or Resume points if you had any.  If you want that information you will need to restore userdata from last backup.

SteveCartman54
Posted

NFO and poster art were created for each movie. Will they reappear or  will the system have to recreate them?

(Many were customized for movies that had no MovieDB# or IMDB #)

 

 

 

Happy2Play
Posted
Just now, SteveCartman54 said:

NFO and poster art were created for each movie. Will they reappear or  will the system have to recreate them?

(Many were customized for movies that had no MovieDB# or IMDB #)

 

 

 

If this information is saved with media yes it will be reused.  If not no as the database entry will not longer exist for the centrally stored metadata.

SteveCartman54
Posted

Information was saved with the media. NFO files were locked and modifications made to them. (It genres, critics rating, etc)

Will the NFO retain the old data?

Finally, what is the best way  to backup up library.db?

 

Happy2Play
Posted
Just now, SteveCartman54 said:

Information was saved with the media. NFO files were locked and modifications made to them. (It genres, critics rating, etc)

Will the NFO retain the old data?

Finally, what is the best way  to backup up library.db?

 

Emby should reread the existing information.

To a point the database is worthless without other folders and data.  Ideally you backup the entire "Data path: /config" folder.

SteveCartman54
Posted

I am using docker. Within the config folder, I have these folders

-  cache  (54,411 files) 1.01 GB

- config  (18 files) 22 kb

- data (48 files) 698 MB

-  logs (46 files) 712 MB

-  metadata (5,360 files) 375 MB

-  plugins (25 files) 16 MB

- root (7 files) 25KB

 

Which of these folders should I backup?

 

SteveCartman54
Posted
53 minutes ago, Happy2Play said:

Emby should reread the existing information.

To a point the database is worthless without other folders and data.  Ideally you backup the entire "Data path: /config" folder.

  • Member
  •  0
  • 8 posts

I am using docker. Within the config folder, I have these folders

-  cache  (54,411 files) 1.01 GB

- config  (18 files) 22 kb

- data (48 files) 698 MB

-  logs (46 files) 712 MB

-  metadata (5,360 files) 375 MB

-  plugins (25 files) 16 MB

- root (7 files) 25KB

 

Which of these folders should I backup?

Posted
4 hours ago, Happy2Play said:

 

@cayarsCan you update the final steps in KB to include running a library scan to repopulate the libraries.

Done

SteveCartman54
Posted

I just spent a day recovering data because of a corrupt Library.db.

I am running Synology 7, which has a number of backup applications.

Can the file library.db be safely backup without shutting down Emby?

(I plan to schedule 4 backups daily, without overwriting backup copies)

 

Posted
18 hours ago, SteveCartman54 said:

Can the file library.db be safely backup without shutting down Emby?

No.  It could easily be in an inconsistent state.

Posted

This is the problem with trying to do backups while the media server is running.

I find the sheer volume of files in the config folder means the backup can take a while to run, so shutting down emby before running the backup means it needs to go offline for too long.

I use Hyper backup to backup the config folder, but I exclude the data directory from the backup.

My plan is to create a small bash script that will shutdown emby, copy the data directory to another location inside the config directory and then restart the emby docker.
(although easily shutting down emby properly so it removes the temp SQL files is proving a bit harder than expected... just stopping the docker container does not remove the temp files)

I would then create a scheduled task to run the bash script which would be scheduled to run a short time before the main backup task is scheduled.

This should mean emby only needs to be offline for a very short time, and my backups will contain a (hopefully) safe version of the database.

(Admittedly 4 backups a day seems at tad excessive, but each to their own. I just do a daily backup)

Posted

Go ahead and setup one of the Synology backup tools.
Just  be aware any database files in EmbyServer/Data may not be reliable.

Install and configure the Server Backup Configuration plugin to a location that will get backed up from above.
This will backup all the configuration files used by the system including your library configurations and all settings.

This plugin backups up:
System Configuration
Library Definition
Plugins
Users including their watched states
Playlists
Auto Organize Settings
Live TV Settings
Task Schedules

So between the Emby Server Configuration Backup and the Synology backup you have everything covered except:
the database files in the EmbyServer/Data folder

Manually backup this data folder once a week to once a month.

Keep in mind you don't need an absolutely current library.db if something happens.  You can put your last known good one back.
Do a Restore from the backup plugin including user watched states.
Then just do a full library scan.

Any new or removed media will get updated pretty quickly and now your library.db is current again.
 

SteveCartman54
Posted

Ok. Thanks. 

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...