Jump to content

Backup Plugin not restoring library properly


Dibbes

Recommended Posts

Just had to restore after a crash of one of my SSD's. I knew this was coming, so I had backed up everything, including Emby. This with the expectation I could just restore it without any issues. Little did I know...

  • Eight out of 13 library items are now set to "Mixed Content" and when trying to change the content type, it tells me that can only be done by removing the library and re-adding it. Why is this not restored properly and, an even more irritating point, why is there an "option" to change the content type when it just doesn't work? I think I asked this back in 2014 or before already, I just can't find the topic.

  • The backup does not backup the database, which means it has to be rebuild from scratch. For me this means an unusable server until it completes, as for some obscure reason, the server does not display items until the scan completes. A full rebuild for me is a 6 day plus operation (I'm now on 94.8% since last Wednesday), so very irritating. If all library settings (mostly) and user settings are being backed up, what's the reason the database is not done?

  • Plugins are being reinstalled, but the settings of these, like SMTP settings for email or user/pass for subtitle plugins and a few other settings for other plugins, are not.
All in all, in my opinion, this plugin still needs some tweaking. Edited by Dibbes
Link to post
Share on other sites

 

 

why is there an "option" to change the content type when it just doesn't work?

 

Because before we had this in the UI, we were constantly asked how to change the content type. The only way to make those questions stop is to put the information directly in the user interface. Sure, it's not the answer you want, but at least you're able to find the answer on your own without having to call for help.

Link to post
Share on other sites
Happy2Play

I was testing uninstall the other day, so I zipped my entire Emby-Server folder and did a uninstall without issue except for the registry key for uninstall not being removed from Apps and Features.

 

I had no issue doing basically a portable restore from my backup zip.

 

Okay doing a clean install and restoring 30 libraries I am seeing 3 libraries that were TV Show Content type changed to Mixed Content according to Dashboard-Library (initial scan still going)

 

One example

5df8c9a9e7739_test.jpg

Edited by Happy2Play
Link to post
Share on other sites
Happy2Play

Did you create the backup using the 4.3 server, or an older version?

 

It was a same day backup and restore of 4.3.0.30 and 4.4.0.1.

Link to post
Share on other sites

 

 

Okay doing a clean install and restoring 30 libraries I am seeing 3 libraries that were TV Show Content type changed to Mixed Content according to Dashboard-Library (initial scan still going)

 

 

@@Happy2Play I don't understand what the reason is for a complete rebuild. An update scan, yes, but a complete rebuild should not be necessary.

 

By the way, my scan is still busy at 95,3% at this time. Maybe something for another topic, but the server not being fully available with the content that's already scanned, might be something to look into

Link to post
Share on other sites

Just out of curiousity: what's the reason the database isn't part of the backup? at least optionally if space is an issue...

Link to post
Share on other sites
Happy2Play

I would assume backup size as the database to a point is useless without the /metadata folder.  The database has everything by a unique id so from a database point it is all or none when it comes to media.

 

So you may as well have a true system backup.  Or a backup plan for the Emby installation.

Link to post
Share on other sites

So you may as well have a true system backup.  Or a backup plan for the Emby installation.

 

That's what I thought I had with the backup plugin... I guess I should have checked more closely. I mean, though handy that the user profiles and library paths are restored, the main thing for me is the database itself... I'm at 95.5% now and it's slow going... It's the music library that's taking this amount of time. I've already removed it, ran the scan for the rest, and then added it so that at least the rest is properly available, but that removed the favourites and everything...

Link to post
Share on other sites
Happy2Play

That's what I thought I had with the backup plugin... I guess I should have checked more closely. I mean, though handy that the user profiles and library paths are restored, the main thing for me is the database itself... I'm at 95.5% now and it's slow going... It's the music library that's taking this amount of time. I've already removed it, ran the scan for the rest, and then added it so that at least the rest is properly available, but that removed the favourites and everything...

Favorites are a part of the restored UserData unless there were no provideids for the items.  But nothing will appear completely correct until initial scan has finished.  If scan has finished then I would restore userdata again to see if that resolves missing info.

Link to post
Share on other sites

Favorites are a part of the restored UserData unless there were no provideids for the items.  But nothing will appear completely correct until initial scan has finished.  If scan has finished then I would restore userdata again to see if that resolves missing info.

What I meant was that I cancelled the scan because it still hadn't finished after a week (yes, I have a large music library) and then removed the Music library from the Emby server, then ran the library scan again until completion. Since the Music library was not available, everything regarding this library was lost. Now that I've re-added the library, it's fully scanning it again, which will take another week or so, but since it's seen as a new library, I don't think that the userdata for music will be restored... I don't see how that would be possible within the current process

Link to post
Share on other sites
Happy2Play

What I meant was that I cancelled the scan because it still hadn't finished after a week (yes, I have a large music library) and then removed the Music library from the Emby server, then ran the library scan again until completion. Since the Music library was not available, everything regarding this library was lost. Now that I've re-added the library, it's fully scanning it again, which will take another week or so, but since it's seen as a new library, I don't think that the userdata for music will be restored... I don't see how that would be possible within the current process

If you have restored the users and userdata via the plugin, once all the media is reimported the restored userdata should be seen no matter how many times you add and remove libraries or rename libraries.  So once the item providerid is know it will see that same providerid in your userdata table in the database.

  • Like 1
Link to post
Share on other sites

Just out of curiousity: what's the reason the database isn't part of the backup? at least optionally if space is an issue...

 

Because a database from any particular point in time is not guaranteed to be compatible with a system you try to restore to. In fact, it is quite likely not to be.

 

So the backup/restore operation uses the API to gather and update data so that it is version agnostic.

 

The plug-in is not intended to backup your entire system. It is just intended to help restore your basic configuration if necessary (hence the name).

  • Like 1
Link to post
Share on other sites

Because a database from any particular point in time is not guaranteed to be compatible with a system you try to restore to. In fact, it is quite likely not to be.

 

So the backup/restore operation uses the API to gather and update data so that it is version agnostic.

 

The plug-in is not intended to backup your entire system. It is just intended to help restore your basic configuration if necessary (hence the name).

 

That's a fair point, and I'm sure you guys know a lot more about this than I do, but it seems to me there should be a way to migrate a full database from one machine to another if the server versions and library paths are the same...

Link to post
Share on other sites

That's a fair point, and I'm sure you guys know a lot more about this than I do, but it seems to me there should be a way to migrate a full database from one machine to another if the server versions and library paths are the same...

 

If that's the case, you can pick up the whole Emby-Server folder and move it.  No plug-in required :).

  • Like 1
Link to post
Share on other sites
Happy2Play

Depending on how old of a installation we are talking about, but newer installations are somewhat portable (library path dependant).

  • Like 1
Link to post
Share on other sites
  • 2 months later...
Dibbes
  • Eight out of 13 library items are now set to "Mixed Content"
  • Plugins are being reinstalled, but the settings of these, like SMTP settings for email or user/pass for subtitle plugins and a few other settings for other plugins, are not.

 

I had a reason to test this tonight and unfortunately these two point are not resolved... I still have more than three-quarters of the "restored" libraries as mixed content, which means I'm going to have to remove and manually re-add once the initial scan is done, in 3 days or so...

 

This really is very frustrating, especially since a lot of people will need to rebuild to make use of the new sorting, etc. in the coming release...

Link to post
Share on other sites
Happy2Play

@@Luke there appears to be a issue restoring libraries that no longer contain "*.collection" file.  If you library contains this file it restores as that type.  So there must be a issue reading options.xml ContentType.  But I was testing manually moving library between test machines.
 
Only testing on beta

Edited by Happy2Play
Link to post
Share on other sites
Dibbes

@@Luke there appears to be a issue restoring libraries that no longer contain "*.collection" file.  If you library contains this file it restores as that type.  So there must be a issue reading options.xml ContentType.  But I was testing manually moving library between test machines.

 

Only testing on beta

 

Yes, that seems correct. The libraries that restored properly, all had .collection file in the folder, but that wasn't it... I've added these files to all the folders manually and I have the same result... the libraries that had mixed content before, still have mixed content...

 

Aren't these legacy files and about as old as the mblink files some of my libraries still have?

Edited by Dibbes
Link to post
Share on other sites
Happy2Play

Yes, that seems correct. The libraries that restored properly, all had .collection file in the folder, but that wasn't it... I've added these files to all the folders manually and I have the same result... the libraries that had mixed content before, still have mixed content...

 

Aren't these legacy files about as old as the mblink files some of my libraries still have?

They should be legacy, but I can add and remove them for a library being restored and it changes the contenttype for me each time.

Link to post
Share on other sites

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