Unable to restore 1.12 backup to 1.18

Server Version#: FreeNAS 11.2, Plex 1.18
Player Version#: N/A

Hi all,

I’m updating from 1.12 to 1.18 which I could only seem to do with a new install of Plex Media Server plugin on FreeNAS 11.2 (using the plexpass variety). But I haven’t been able to restore my server backup and would love some advice if anyone has experienced a similar issue or can see where I’m going wrong.

Plex documentation says to just copy the “${JAIL_ROOT}/var/db/plexdata/Plex Media Server/” folder from the old and restore it to the same location in the new version’s jail. But the filesystem looks to have changed for FreeNAS 11.2 plugin onwards and the official documentation hasn’t kept up.

Once I have FreeNAS 11.2 and PMS 1.18 running successfully (if I access it, it offers the setup wizard to add libraries etc.), I did the following:

  1. Stop both instances of PMS (1.12 and 1.18) so the databases can be fully accessed
  2. Copy the entire PMS 1.12 database folder (mine is at /mnt/raid-array/jails/plexmediaserver_1/var/db/plexdata/Plex Media Server) to the new PMS 1.18 database folder (I think mine is at /mnt/raid-array/iocage/jails/plex-plexpass/root/Plex Media Server)
  3. Start PMS 1.18

But I open the new server and no libraries are there, it’s just prompting me to get started. I’ve been browsing forums for hours trying to pull bits and pieces from other people’s cases and notes but so far no luck. Everything seems to suggest you just dump the database and you’re good.

If anyone could steer me in a direction I would be very grateful. Thanks in advance!

I noted that this forum thread confirms the locations for the FreeNAS 11.1 and 11.2 database locations so I believe I am copying the files to the correct location. But I also noticed that in the new folder there’s items like “Movies” and “TV Shows” which were not part of the 1.12 directory structure.

Is it possible that Plex has changed the database/backup structure and therefore it’s not possible to restore a 1.12 backup to a 1.18 instance?

Thanks again for any insight anyone can send my way.

Sounds like you haven’t set up your libraries yet.

Thanks so much for the lead. It didn’t seem like it would make sense to have to re-create the libraries as (surely) that’s part of the database, but I just went through and created the libraries, then stopped PMS plugin, copied the backup over to the 1.18 database directory I posted at the top, restarted PMS and it’s still the same, no data just the two empty libraries I manually created.

Do you have any idea if the database/dir structure changed between 1.12 and 1.18? All documentation just says to copy the old servers dir to the new one, there’s nothing more detailed than that unfortunately.

Not true. The database is plex metadata only (e.g. show synopsis, cover images, times you’ve played a movie, etc). It’s possible you’ve changed the metadata e.g. if you scanned your non-existent media before setting up the libraries, the metadata would disappear.

How did you create your libraries? Did you set up mountpoints for the jail? I’m assuming your media lives outside the jail?

Thanks so much for your help.

I guess it’s more my misunderstanding of what they mean by “backup” as I would have thought once you have the app infrastructure in place, the backup would restore all the media links/records etc.

Thanks to your advice I’ve removed and re-added a clean install of the plugin, set up jail mountpoints, added libraries and now it’s crawling the directories to index all the media and downloading metadata and artwork etc. at the same time.

I don’t know if restoring the backup will do anything but by the time it does all that it’s like 90% setup again so I’ll just do the rest manually as well rather than mess around with restoring view counts and some incorrectly linked films.

If you’re interested in your history of use e.g. movies watched previously, times watched, etc, I’d still consider overwriting the 1.8 metadata with the 1.2 metadata.

1 Like

Thanks again for your help, but I still can’t get seem to get any of the metadata to be recognised. I’ve allowed it to successfully scan and add all the media to a library (took 18 hours), stopped both instances (1.12 and 1.18) and copied the “Plex Media Server” folder contents as described in my original post.

Does the …/iocage/jails/plex-plexpass/root/Plex Media Server path look correct to you @basilh?

Interestingly when I open a command shell in the plex-plexpass jail there doesn’t seem to be any folders in there (just by running “ls”), which suggests I’m maybe misunderstanding something about the file system. Any ideas?

Location of the Plex database Plex Media Server

This is the absolute path for the Plex db in a Warden jail on an 11.2 server for me:

/mnt/tank/jails/plexmediaserver_1/var/db/plexdata/

Looks like it has moved again under 11.3. This is what it now looks like for the Plex db in an iocage jail on an 11.3 server:

/mnt/tank/iocage/jails/plex/root/config/

Thanks. The first directory structure looks correct and is where I’m copying the data from, but the second I don’t have a /config/ directory strangely.

I did a search for “Metadata” in the new iocage jail but can only find it in the /mnt/raid-array/iocage/jails/plex-plexpass/root/Plex Media Server directory). Would you suggest any other way to locate it? I’m assuming it would need a “Metadata” folder but that could be wrong.

What you have is correct. I forgot, I’m using a scripted Plex installation, which places my metadata outside the jail and auto-updates Plex. You might want to consider using it once you’ve figured out where’s what on your system Scripted Plex installation

If you see bundles on 11.3 when you enter ls "/mnt/raid-array/iocage/jails/plex-plexpass/root/Plex Media Server/Metadata/Movies/0", you’ve got the db. Similarly for 11.2.

When copying the database across, make sure you do a recursive copy and retain permissions. This tutorial may be helpful https://www.ixsystems.com/community/threads/tutorial-11-1-warden-jail-to-11-2-iocage-jail-plex-migration-and-rebuild-of-transmission-openvpn-pia-ipfw-tvnamer.72523/

This, a million times. :+1:t2:

Thanks again. I followed the exact copy structure from that last link and weirdly it didn’t fix anything but it did rename my new server instance to the name I had for my old… it still shows every item as unwatched, some titles are incorrectly matched, all collections are gone and posters aren’t as I’ve specified.

I hadn’t seen the Scripted Plex installation, I might actually give that a go as the auto-update and media outside the jail sounds ideal. Thanks for the tip and for all your help so far.

OK the Plex Scripted Installation was much easier, and I was able to restore my backup successfully (version 1.20).

Huge thanks @basilh for your help and the referral.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.