Jump to content

Server Migration (Backup & Restore)


Guest

Recommended Posts

Hi, I've been using Emby for at least month on a temporary server and now consider buying premiere sub, there are some movie collections though that I configured myself, creating custom images, thumbs, description, etc. Will those images and descriptions carry over (if I have premiere sub) when I install Emby server on a dedicated linux server (using the same hdd, but obviously different os) and do backup and restore? OCD kinda kicks in and I really like how I organize my files. Thank you.

Link to comment
Share on other sites

Hi, no, these you will currently need to copy over, although on a new os the paths to the media files will probably be different so those will need to be fixed up manually.

Link to comment
Share on other sites

Hi, no, these you will currently need to copy over, although on a new os the paths to the media files will probably be different so those will need to be fixed up manually.

"Copy over", meaning they are like in my "metadata folder" in which I can just copy over to the new server without setting the affected files from scratch? I have like 14 collections with custom thumbs and description.

Link to comment
Share on other sites

Hi, we will add documentation to our wiki and then get back to you on this. Thanks !

  • Like 1
Link to comment
Share on other sites

SikSlayer

Great! This is something I was thinking about myself.

So long as the paths to my HDDs with my content stay the same, it should be pretty simple to copy things over, yes?

Link to comment
Share on other sites

  • 4 weeks later...

Hello, any update on this one? I’m now planning on migrating to OMV4 with the emby docker btw, It’s kind of alright though if it’s not possible to transfer all the metadatas as those individual media datas can be redownloaded easily, I’m just concerned with my custom collections that I made myself and the server settings in general.

 

I have my users and collections folders backed up already thinking if they’re gonna be of use in the process.

Link to comment
Share on other sites

d00zah

NVM, I see you've already archived collections folder so info is irrelevant.

Edited by d00zah
Link to comment
Share on other sites

NVM, I see you've already archived collections folder so info is irrelevant.

Yup, still need confirmation though if this is possible. :unsure:

Link to comment
Share on other sites

If you provide a server log from both the new and old server I can tell you what folder to copy. Thanks.

Link to comment
Share on other sites

pclausen

I'm getting ready to do a fresh win 10 install onto a fresh SSD on my existing server running Emby.  All my media lives on a large array that will still be connected to the server after the fresh win10 install, so the paths will all remain the same as before.

 

I run the Backup & Restore plugin, so my thinking is that the following steps should do the trick:

 

1. Backup the AppData\Roaming\Emby-Server\metadata folder

2. Install fresh copy of win 10

3. Install Emby

4. Install all plugins

5. Restore all settings backed up by Backup & Restore plugin

6. Restore metadata folder from backup

 

Am I missing anything?  I have a 120TB library with 10 user profiles and they would be pissed if they lost all their watched statuses for shows.  I have 7 Gb in my metadata folder, and it would take forever to have Emby re-download all that stuff.  My current Emby installation is about 26 months old and I'm hoping this whole thing will be a quick and painless process following the steps outlined above.

Edited by pclausen
Link to comment
Share on other sites

pclausen

I got a fresh copy of Emby installed on the server after replacing the original SSD.  I added a step 3.5, which was to restore my Emby Premiere key.

 

I then installed all the plugins I had before.  I also copied over my daily backs from yesterday and this morning.  At first things were looking good when I attempted to restore and I had the 2 backups to choose from:

 

embybackup_01.JPG

 

But as soon as I picked either one, I get this:

 

embybackup_02.JPG

 

So I guess that plugin looks at the actual date on the files, which makes it pretty worthless for doing a restore on a new server, since all the file time stamps are going to be never than the originals.

 

So now I'm trying to manually copy the various folders over from my original install to the new one.  One thing I'm noticing is that the old install did not have a programdata folder, and this is where config, metadata, etc lives on the new install.  So I moved over folders from the old install to the new one and into programdata since that is where those folders appear to live now.  So after restarting the server, it picked up the users, but the new install did not pick up on any of the libraries.  So I'm manually adding in a couple by hand and will see if the user pointers for shows were preserved.

 

What a mess...

Link to comment
Share on other sites

CBers

There's something wrong somewhere in your setup, as I have only recently used the restore plugin on a rebuilt PC, restoring user information from a backup from a few days ago.

 

All worked fine for me.

 

Perhaps post your logs for someone to look at.

Link to comment
Share on other sites

pclausen

It was a fresh install of Emby onto a fresh install on Win 10, so I'm not sure what I could have done wrong.

 

At any rate, manually copying over the config and various other files seems to have done the trick.  Users are able to log in and for the libraries I have manually added back so far, their pointers are all in place.  So I think I'm good.

 

I am curious what the issue is, so I will post up some logs when I get a chance, once  get everything else this server is responsible for back up and running again as well.

Link to comment
Share on other sites

Happy2Play

It was a fresh install of Emby onto a fresh install on Win 10, so I'm not sure what I could have done wrong.

 

At any rate, manually copying over the config and various other files seems to have done the trick.  Users are able to log in and for the libraries I have manually added back so far, their pointers are all in place.  So I think I'm good.

 

I am curious what the issue is, so I will post up some logs when I get a chance, once  get everything else this server is responsible for back up and running again as well.

 

What was the server version you were restoring from?

Link to comment
Share on other sites

pclausen

Both the old and new servers were on 3.4.1.27 (latest beta).

 

On the old server, I did constantly have issues with the automatic updates.  It said they had been downloaded and to reboot for them to take effect, but it would always come back up on the old version.  So I had to resort to go download it manually and install it.  Then it would take.  Keep in mind that my old server was originally installed about 2.5 years ago, so maybe something changed along the way that caused the automatic updates to fail, and could perhaps also explain the odd "invalid date" thing I was seeing with the backup plugin.

Link to comment
Share on other sites

pclausen

What was the server version you were restoring from?

 

If you mean the OS, both old and new were Win 10 1803 spring update.

Link to comment
Share on other sites

Happy2Play

Both the old and new servers were on 3.4.1.27 (latest beta).

 

On the old server, I did constantly have issues with the automatic updates.  It said they had been downloaded and to reboot for them to take effect, but it would always come back up on the old version.  So I had to resort to go download it manually and install it.  Then it would take.  Keep in mind that my old server was originally installed about 2.5 years ago, so maybe something changed along the way that caused the automatic updates to fail, and could perhaps also explain the odd "invalid date" thing I was seeing with the backup plugin.

 

I was just trying to confirm you weren't trying to use backups from a older server version as there would be compatibility issues.

 

Everyone had this issue do the change to net core 2.1.  I used the restore feature on 3.4.1.26 so it would appear to be something specific to your setup.

Link to comment
Share on other sites

pclausen

Ok, I parsed through the log files, and these are the errors I'm seeing:

 

Backup error:  One thing I noticed is that on the old server, when I went into the plugin, it showed me all the objects I wanted to back up.  I had everything selected.  On the new install, I don't see this list of objects anywhere, not even when I initially installed it.  Furthermore, when I tried restoring the backup that the plugin created this morning on the new server, I got the same "Invalid Timestamp" message, so I think that proves the issue is not actually with the backup file timestamp.  Perhaps I should un-install this plugin and try again?

2018-07-07 17:54:39.387 Error HttpServer: Error processing request
	*** Error Report ***
	Version: 3.4.1.27
	Command line: C:\Users\peter\AppData\Roaming\Emby-Server\system\EmbyServer.dll -noautorunwebapp
	Operating system: Microsoft Windows NT 6.2.9200.0
	64-Bit OS: True
	64-Bit Process: True
	User Interactive: True
	Processor count: 28
	Program data path: C:\Users\peter\AppData\Roaming\Emby-Server\programdata
	Application directory: C:\Users\peter\AppData\Roaming\Emby-Server\system
	System.NullReferenceException: Object reference not set to an instance of an object.
	   at MBBackup.ServerEntryPoint.ExecuteRestore(BackupInfo settings, CancellationToken cancellationToken, IProgress`1 progress, Boolean isAuto)
	System.NullReferenceException
	   at MBBackup.ServerEntryPoint.ExecuteRestore(BackupInfo settings, CancellationToken cancellationToken, IProgress`1 progress, Boolean isAuto)

User profile: (when I got into any user profile, everything is blank and that "circle" just spins forever).  So me just copying over the user folder from the old install apparently didn't quite pull everything with it.

2018-07-07 18:12:02.769 Error UserManager: Error reading policy file: C:\Users\peter\AppData\Roaming\Emby-Server\programdata\config\users\3c37c9e021954c67837b9a6db3d4abde\policy.xml
	*** Error Report ***
	Version: 3.4.1.27
	Command line: C:\Users\peter\AppData\Roaming\Emby-Server\system\EmbyServer.dll
	Operating system: Microsoft Windows NT 6.2.9200.0
	64-Bit OS: True
	64-Bit Process: True
	User Interactive: True
	Processor count: 28
	Program data path: C:\Users\peter\AppData\Roaming\Emby-Server\programdata
	Application directory: C:\Users\peter\AppData\Roaming\Emby-Server\system
	System.InvalidOperationException: There is an error in XML document (0, 0). ---> System.Xml.XmlException: Root element is missing.
	   at System.Xml.XmlTextReaderImpl.Throw(Exception e)
	   at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
	   at System.Xml.XmlTextReaderImpl.Read()
	   at System.Xml.XmlReader.MoveToContent()
	   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderUserPolicy.Read7_UserPolicy()
	   --- End of inner exception stack trace ---
	   at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
	   at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader)
	   at Emby.Server.Implementations.Serialization.MyXmlSerializer.DeserializeFromStream(Type type, Stream stream)
	   at Emby.Server.Implementations.Serialization.MyXmlSerializer.DeserializeFromFile(Type type, String file)
	   at Emby.Server.Implementations.Library.UserManager.GetUserPolicy(User user)
	System.InvalidOperationException
	   at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
	   at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader)
	   at Emby.Server.Implementations.Serialization.MyXmlSerializer.DeserializeFromStream(Type type, Stream stream)
	   at Emby.Server.Implementations.Serialization.MyXmlSerializer.DeserializeFromFile(Type type, String file)
	   at Emby.Server.Implementations.Library.UserManager.GetUserPolicy(User user)
	InnerException: System.Xml.XmlException
	System.Xml.XmlException: Root element is missing.
	   at System.Xml.XmlTextReaderImpl.Throw(Exception e)
	   at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
	   at System.Xml.XmlTextReaderImpl.Read()
	   at System.Xml.XmlReader.MoveToContent()
	   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderUserPolicy.Read7_UserPolicy()
	   at System.Xml.XmlTextReaderImpl.Throw(Exception e)
	   at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
	   at System.Xml.XmlTextReaderImpl.Read()
	   at System.Xml.XmlReader.MoveToContent()
	   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderUserPolicy.Read7_UserPolicy()

Web socket: (not sure what this is related to, but I see this in every log file generated since yesterday)

2018-07-07 15:42:21.869 Error HttpServer: Error closing web socket response
	*** Error Report ***
	Version: 3.4.1.27
	Command line: C:\Users\peter\AppData\Roaming\Emby-Server\system\EmbyServer.dll -noautorunwebapp
	Operating system: Microsoft Windows NT 6.2.9200.0
	64-Bit OS: True
	64-Bit Process: True
	User Interactive: True
	Processor count: 28
	Program data path: C:\Users\peter\AppData\Roaming\Emby-Server\programdata
	Application directory: C:\Users\peter\AppData\Roaming\Emby-Server\system
	System.ObjectDisposedException: Cannot access a disposed object.
	Object name: 'SocketHttpListener.Net.HttpListenerResponse'.
	   at SocketHttpListener.Net.HttpListenerResponse.CheckDisposed()
	   at SocketHttpListener.Net.HttpListenerResponse.set_StatusCode(Int32 value)
	   at EmbyServer.SocketSharp.WebSocketSharpListener.TryClose(HttpListenerContext ctx, Int32 statusCode)
	System.ObjectDisposedException
	   at SocketHttpListener.Net.HttpListenerResponse.CheckDisposed()
	   at SocketHttpListener.Net.HttpListenerResponse.set_StatusCode(Int32 value)
	   at EmbyServer.SocketSharp.WebSocketSharpListener.TryClose(HttpListenerContext ctx, Int32 statusCode)
	
2018-07-07 15:42:21.869 Error HttpServer: Error closing web socket response
	*** Error Report ***
	Version: 3.4.1.27
	Command line: C:\Users\peter\AppData\Roaming\Emby-Server\system\EmbyServer.dll -noautorunwebapp
	Operating system: Microsoft Windows NT 6.2.9200.0
	64-Bit OS: True
	64-Bit Process: True
	User Interactive: True
	Processor count: 28
	Program data path: C:\Users\peter\AppData\Roaming\Emby-Server\programdata
	Application directory: C:\Users\peter\AppData\Roaming\Emby-Server\system
	System.ObjectDisposedException: Cannot access a disposed object.
	Object name: 'SocketHttpListener.Net.HttpListenerResponse'.
	   at SocketHttpListener.Net.HttpListenerResponse.CheckDisposed()
	   at SocketHttpListener.Net.HttpListenerResponse.set_StatusCode(Int32 value)
	   at EmbyServer.SocketSharp.WebSocketSharpListener.TryClose(HttpListenerContext ctx, Int32 statusCode)
	System.ObjectDisposedException
	   at SocketHttpListener.Net.HttpListenerResponse.CheckDisposed()
	   at SocketHttpListener.Net.HttpListenerResponse.set_StatusCode(Int32 value)
	   at EmbyServer.SocketSharp.WebSocketSharpListener.TryClose(HttpListenerContext ctx, Int32 statusCode)

If you want to see the log files in their entirety, let me know.  A couple of them are quite large from when I did the initial re-scan of my libraries.  This is what I got:

 

embylogfiles.JPG

 

I wonder if I botched something by manually moving folders/files over from the old install since I couldn't get the backup plugin to restore?

Edited by pclausen
  • Like 1
Link to comment
Share on other sites

pclausen

Did a complete un-install and then a re-install.  Restored my Premiere key and then the Backup plugin.  This time it won't even let me set the backup location.  Just get that spinning circle when I go to the page.
 
I did not manually copy any files/folders over this time.

 

All log files from this new install are attached.  I don't see any errors.

 

EDIT:  Also attached the install log file.

Emby_Logs.zip

server-install.zip

Edited by pclausen
  • Like 1
Link to comment
Share on other sites

It might be specific to the current beta build. Please try again with the next one. Thanks.

Link to comment
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...