Jump to content
acnp77

Backup Emby server

Recommended Posts

acnp77

Hi

I need to migrate my Emby server to a new machine. I do not mind setting up server config and users, but I put a LOT of time into creating my library and metadata I would very much like to migrate it to the new server.

Using Emby server 4.4.3.0 (Debian, amdX64), media is on a read-only network-share, metadata is saved centrally. (And I want to keep it this way)

I looked at the instructions on: https://support.emby.media/support/solutions/articles/44001159936-backup

It says: "Note: Unless you use a custom Metadata path you will want to backup your /ProgramData/metadata folder to preserve your People images. The only two folder in metadata you don't need are library and views."

QUESTIONS:
- So this will only backup people images?
- It says I do not need "metadata/library" and "metadata/views", but these are the only 2 folders in metadata. So where is my metadata actually stored? (in my server-dashboard it says metadata stored in /var/lib/emby/metadata)

- Is there a reliable way to preserve my libraries and metadata so I will not have to do the whole work again?
- Is the folder structure the same in different server versions, ore may I run into problems there as well?

In general I would think that there should be a decent way to migrate a central library, I think this could be important for a lot of users.

Edited by acnp77

Share this post


Link to post
Share on other sites
cayars

Hi,

Are you going from Linux to Linux? Just out of curiosity why the move?  Also, are you moving all data/media as well?

If so you can copy everything from one machine to the other.  If you have any custom cache or metadata libs copy them as well.

Reset any file permissions if needed for every directory/folder you copied.

Typically once you have everything copied over you can do an install right over top just for good measure.

Then you'll want to review each library and make any changes to mount points.  Hopefully you set things up so the files are referenced with the same mount points otherwise you have to rescan the library or can cheat if you know how using SQL by running a couple of sql commands to mass change file locations.

Give us more information on what will be the same and what will be different between the systems and we can be of more assistance.

Share this post


Link to post
Share on other sites
acnp77

@cayars

Thanks for your reply.

To answer some of yours questions: Yes im going from Linux to Linux. As I mentioned before, my media is on a separate fileserver with network shares (smb), mounted on emby server on /mnt/media/
Fileserver and Emby server are two VMware vm's on the same host. I also have a separate backup server on a different physical machine. I am getting a more powerful host, that's why I need to migrate. I might just copy the vm to the new server, and be done with it.

My question is more of a general one: Let's say my disks fail, and I need to migrate my library/metadata, how would I do that?

I want to be able to do a new clean install of Emby-server and then restore my library/metadata from my backup-server. So the question is, which files and directories do I need to backup and restore to get back my library with all the metadata? The library-setup with directories and also mountpoints will all remain unchanged.

Also, what I do not understand is that the instructions (for link see my orig. post) states that only people images will be preserved and also that I do not need the 2 only folders in the "metadata" folder.

I imagine something like this: I do a fresh install, copy the necessary directories to the new server, adjust permissions if needed and then rescan the library and end up with my library and all metadata. But I need to know which directories I need to backup. The instructions were not conclusive for me in this case.

Cheers

 

 

Share this post


Link to post
Share on other sites
Happy2Play

Old and new installations will be different do to changes along the way.  Old installs saved People to the people folder and new installation do not and no longer uses that people folder.  That is why there was a People backup plugin created.

In the end you need the entire Emby Programdata folder as the /metadata folder is pretty much useless without the database it was created from.

Share this post


Link to post
Share on other sites
cayars

Ahh if using VMs don't worry about Emby config like this.  Just move the whole virtual machine(s) and be done with it.  Easy Peasy.

 

Share this post


Link to post
Share on other sites
cayars
10 minutes ago, Happy2Play said:

Old and new installations will be different do to changes along the way.  Old installs saved People to the people folder and new installation do not and no longer uses that people folder.  That is why there was a People backup plugin created.

In the end you need the entire Emby Programdata folder as the /metadata folder is pretty much useless without the database it was created from.

I typically don't worry about that.  If you upgrade to the latest version, copy EVERYTHING over to the new machine and install the same version on top, it just works (like before anyway) since it doesn't know any better.

Share this post


Link to post
Share on other sites
acnp77

@Happy2Play thanks. So it should work if I do a fresh install and then just replace the whole programmdata folder? So there is nothing in the programmdata folder that is bound to a specific install?

@cayars thanks for your help, maybe you are right, and it is the best thing to backup EVERYTHING and copy it back to the new machine. So you would have a backup, even in the case your emby server disks break. Would you happen to know which files to copy so I really get EVERYTHING? (on Debian Linux). That would be great :)
Is it even possible to just copy all the files to a new machine without installation?

CHEERS

 

 

Edited by acnp77

Share this post


Link to post
Share on other sites
Happy2Play
30 minutes ago, acnp77 said:

@Happy2Play thanks. So it should work if I do a fresh install and then just replace the whole programmdata folder? So there is nothing in the programmdata folder that is bound to a specific install?

Mostly no as everything is somewhat contained within programdata.  Library paths will be your biggest concern if library paths change at all you will lose all centralized images and database metadata do to Emby Purging no longer existing paths.  

Share this post


Link to post
Share on other sites
cayars

If you move the whole VM you are essentially just moving the virtual machine to something "faster" I'd assume and if you do the VM config correctly Emby won't even blink or care.  If your present machine is working well and you have no reason to redo anything other than just moving it to a newer machine the VM move is the way to go.

Just leave your original server intact so if something goes wrong you still have your original setup.  In that case just ping/pm me or post here for additional help.

If you go this route (I'd suggest it) and hit a snag just stop and ask or PM me as I've done a lot of work with many different VMs on different platforms and cloud infrastructures and can give you a hand more than likely.

Share this post


Link to post
Share on other sites
acnp77

@Happy2Play Ok, thanks a lot for the information. I will backup the ProgramData folder and test it, if it works for me. Cheers.

@cayars Thanks a lot for your information and offer to help. I guess I will backup the ProgramData folder and also the whole VM. Just to be sure. One last question: I have read some information from VMWare, but I am not sure if I understood correctly. I would like to backup the whole Emby-VM on a regular basis, so I am able to copy it back to the same host it was copied from, or also to a new host, if needed. What would be the simplest way to do that? Just copy the VM from the host and copy it back? Or do I need to clone it or something? (Sorry, but my knowledge in VM's is very limited) My host is a VMWare ESXi 6.5. CHEERS

Share this post


Link to post
Share on other sites
cayars

Yes the simplest sure fire way is to shut down the VM and copy it from the host file system to your backup drive.

  • Like 1

Share this post


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