Jump to content

Migrate using Server Config Backup


Recommended Posts

TugboatBill
Posted

Hi,

I'm looking to migrate my install from my Synology NAS to a Ubuntu VM.  The goal is to make this totally transparent to the clients.  I want to preserve all the metadata and watched status.  

Synology NAS DSM is 6.2.4-25556 Update 2.

Emby Server is 4.5.4.0 (Emby Premier)

The location of the media will not change.  IE nfs://fnas1/volume1/TV Shows

New server will be a Ubuntu x64 install.  

 

What would be the best way to do this?  

 

Posted

Hi, is your media actually mounted in Emby on Synology as nfs://fnas1/volume1/TV Shows right now?

Honestly it doesn't matter that much and depending on how old you present system is you might be better off installing a fresh copy. If you used the option to save NFO files and graphics to the media files this will probably be ideal.  If you didn't save that info to the media folders then it will depend I guess on how many movies you had to manually adjust the first time around due to bad file naming, etc...  So you could try a fresh build and scan and if you don't like it then you copy the cache, metadata, databases, etc like the article Luke linked to.

If you try the fresh install use the Backup Configuration Plugin to backup/restore all the core settings to the new server. That will also bring your users and their watched status over as well. Once the new server is ready you just change the port forwarding on your router to point to the new server.

There are a couple of possible "gotchas" if using Emby Connect.  On the new server you will see the EC name but the person won't actually be authorized for that new server.  You will need to copy the username, remove it saving the record. Then paste it back and save the record which will authorize them on the new server.  Do that for each EC user.

When they try to connect to the new server the first time they may not be able to as there now might be two servers showing up with them defaulting to the old server. Test this yourself first as it will vary depending on the method you used to migrate.

The simple way to test that is just switch the IP used on the port mapping rule at the firewall to point to your new machine when no one is on your system.

TugboatBill
Posted

Would there be any issues if I leave the Synology at 4.5.4, do the server backup, and restore to the new linux system that has 4.6.7 installed?  The reason I ask is that there have been problems with upgrading on Synology.  I haven't been watching that forum for a while though and that may no longer be an issue.

I'm not using Emby Connect and graphics/NFOs are stored in the media folders.  

The current system accesses the media files locally through a mounted share EG:

  <MediaPathInfo>
      <Path>/volume1/MediaMasterShare/TV Shows</Path>
      <NetworkPath>nfs://fnas1/volume1/TV Shows</NetworkPath>
    </MediaPathInfo>

I don't see a problem with that though.  I can easily replicate the same paths on the new system.

TugboatBill
Posted

I was able to get the Synology install upgraded to 4.6.7.  Yay!  I'll build the new server later today after I get my booster.

Posted
4 hours ago, TugboatBill said:

I was able to get the Synology install upgraded to 4.6.7.  Yay!  I'll build the new server later today after I get my booster.

Thanks for the feedback.

TugboatBill
Posted

Looking pretty good so far.  Problem - Remote WAN access - where do I change it to use https?   Old system (Synology) shows https://<domain>:443 but new system shows http://<domain>:80

Server -> Network is identical between systems, other than the linux install allows changing the local http and https ports.

Happy2Play
Posted
1 minute ago, TugboatBill said:

Looking pretty good so far.  Problem - Remote WAN access - where do I change it to use https?   Old system (Synology) shows https://<domain>:443 but new system shows http://<domain>:80

Server -> Network is identical between systems, other than the linux install allows changing the local http and https ports.

Best guess would be permissions and/or certificate.  Can you post a server log.

TugboatBill
Posted

I've been hacking away at this for a while.  The cert file wasn't located where I thought was an so it wasn't there when I started the new instance.  I moved a copy over but it didn't help.  So I created a new self signed cert - 

sudo openssl req -newkey rsa:2048 -keyout emby_key.pem -sha256 -nodes -x509 -days 1700 -out emby_crt.pem

sudo openssl pkcs12 -export -inkey emby_key.pem -in emby_crt.pem -out emby.p12

 

That actually broke Emby.  I rebooted and the management page never came back up.  To get Emby back I had to rename the p12 file and reboot.   

All I need is a self signed cert - I'm using Cloudflare and self signed is all that is needed.    Is there a written procedure on how to create a good self signed cert?

Posted

There's quite a bit of info in the community here about using let's encrypt. @FrostByte have you tried this?

TugboatBill
Posted

I'm still working on this, but I've put aside the cert for now.  

I noticed that all my metadata is gone.  NFOs and artwork are saved to the media folders.  So I'm trying to set up a centralized metadata area.  I created a share on my NAS and set it up in Library -> Advanced.  The local path is to a mounted share which is the same share I used for the optional shared network folder for my clients.  Perms on the mount folder in Ubuntu is 777.  Below that Emby created folder metadata (emby:emby 755).  Emby created a subfolder "views" w/same perms.  In the log I see errors where it can't find folder "library/  etc" in metadata.  I created "library" next to "views" w/same perms but that didn't help.  log is attached.

The dashboard shows the new location properly in Paths.

embyserver.txt

Happy2Play
Posted
34 minutes ago, TugboatBill said:

I'm still working on this, but I've put aside the cert for now.  

I noticed that all my metadata is gone.  NFOs and artwork are saved to the media folders.  So I'm trying to set up a centralized metadata area.  I created a share on my NAS and set it up in Library -> Advanced.  The local path is to a mounted share which is the same share I used for the optional shared network folder for my clients.  Perms on the mount folder in Ubuntu is 777.  Below that Emby created folder metadata (emby:emby 755).  Emby created a subfolder "views" w/same perms.  In the log I see errors where it can't find folder "library/  etc" in metadata.  I created "library" next to "views" w/same perms but that didn't help.  log is attached.

The dashboard shows the new location properly in Paths.

embyserver.txt 107.06 kB · 0 downloads

Sorry it does not work that way.  It is either with media or not with media you can not have both.  Sure there can be mixed depending on the options when you enable/disable library options and import media.

But your log show Emby lookin in the custom path and not finding things.  I assume they do not exist in that location.

Quote

    System.IO.DirectoryNotFoundException: System.IO.DirectoryNotFoundException: Could not find a part of the path '/volume1/MediaMasterShare/Metadata/metadata/library/f5/f5e6a74766cf4a808ed1a49c5fe34705/poster.png'.

The having both would fall under the precache feature request I believe

 

TugboatBill
Posted

So is the NFO the container for the metadata?  Why does Metadata under Path on the Dashboard show /var/lib/emby/metadata?  Is that a default that can be overwritten by the individual libraries?

 

When I go into Emby on the new system (Home -> TV Shows) many of the series have no artwork.  They do on the old system.  Why is that?  I can get them to display if I select an individual series and then refresh metadata.

FrostByte
Posted

Did you enable "Download images in advance" in the library settings?  Otherwise I think it won't download some of them until a client requests them.  Try to check that option and then do a refresh including images

Happy2Play
Posted
24 minutes ago, TugboatBill said:

So is the NFO the container for the metadata?  Why does Metadata under Path on the Dashboard show /var/lib/emby/metadata?  Is that a default that can be overwritten by the individual libraries?

 

When I go into Emby on the new system (Home -> TV Shows) many of the series have no artwork.  They do on the old system.  Why is that?  I can get them to display if I select an individual series and then refresh metadata.

Technically metadata path should only be changed at install. but /library is only used if you do not save images with media.  All for bif files if you do not save with media, and if you chose to create Chapter images instead they are save there.  Otherwise /library is not used.

Metadata if not saved to NFO file only exists in the database.

But relocating /Metadata affect more then just one folder.  

image.png.e022de6fba7e29b0261c49594c880b29.png

Since the database already has items in the default location you need to maintain the default location and new custom location for any new items added.

Or you have to start over with custom paths set before any importing.

 

TugboatBill
Posted

Yes, Download Images in Advance is checked.  Some of the series refreshed their images without me manually setting off the metadata refresh.  

I just set off a refresh for all TV Shows.  Movies look good.  Music is missing images so I kicked off a metadata fresh on that too.  I rolled back the metadata path back to undefined.

  • Like 1
TugboatBill
Posted

BTW - I have the cert sorted out.  Once I connected from a remote location the Dashboard started showing the proper URL for WAN access.

  • Like 1
Posted

Did you go back and use the original cert you had previously?  All you had to do to use that was to move it to the new Ubuntu server in a location Emby has access to. Then in network menu select the cert, type in the password again, set the domain. That should be all that's needed. This is all I do to use the same certs with different Linux servers.

How are you accessing the central library/share in Ubuntu?
Did you map/fuse the remote path with username/password to a local folder on Ubuntu?

That's always going to be better then trying to specify \\server\share\path in Emby Server as you know it's always mounted under specific credentials and will self auto-connect on failure. It becomes part of the local file system. This also allows you to control the protocol used to mount as well.

You don't want to assume NFS is better than CIFS for media files.  NFS is better for smaller files as it's less chatty but with larger files CIFS can be a lot faster. On every distro of Linux I have CIFS to my Synology is better than NFS access. It's also a more secured protocol as well which is a plus.  But you can test this yourself and choose what's fastest/best for you then use that to mount the remote path to your local file system.  Then in Emby you treat it like any other local path letting the OS handle it.

Posted

How does the emby server web interface compare?

TugboatBill
Posted

It shows the House episode that was watched as unwatched.

Posted
1 hour ago, TugboatBill said:

It shows the House episode that was watched as unwatched.

Is that the expected result?

TugboatBill
Posted

No.  If an episode is watched on a Kodi client it should show as watched on other clients and in the emby server web interface.

Posted

How does it compare if you watch using the web interface?

TugboatBill
Posted

The web interface will mark an episode as watched.

Posted

OK I'm going to move your problem description to the Kodi section of the community. 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...