Database backup and restore

Is there a database that can be backed up from time to time in the event of a drive failure, move or operating system upgrade?
I had a server built on Ubuntu 16.04 and decided to rebuild it on Ubuntu Server 16.04, however, all my changes were not saved, of course. I forgot that when I originally setup Plex I had to relabel all my media titles within Plex to a naming standard to not be all caps letters, like this:

Going forward, so that my changes are saved in the event I move to a new machine or whatever, I would like to backup the database and restore it so that all my label changes are kept.

See this support article https://support.plex.tv/hc/en-us/articles/201539237-Backing-Up-Plex-Media-Server-Data

But the reason as to why your movies get the ALL CAPS treatment is most likely due to an incorrect match and/or local metadata embedded. I at least do not have that issue on any of my movies. Best would be if you fixed the most likely root cause issue by making sure that all your files follows the Plex naming guidelines stated over here https://support.plex.tv/hc/en-us/categories/200028098-Media-Preparation

And that the Local Media Agent is set at the bottom https://support.plex.tv/hc/en-us/articles/200241558-Agents

A good tool to help you with the naming part (especially if you have a lot of files) is to use 3rd party tools such as Filebot, that can automatically fix most for you https://forums.plex.tv/discussion/191687/plex-naming-schemes-for-filebot

@Peter_W said:
See this support article https://support.plex.tv/hc/en-us/articles/201539237-Backing-Up-Plex-Media-Server-Data

But the reason as to why your movies get the ALL CAPS treatment is most likely due to an incorrect match and/or local metadata embedded. I at least do not have that issue on any of my movies. Best would be if you fixed the most likely root cause issue by making sure that all your files follows the Plex naming guidelines stated over here https://support.plex.tv/hc/en-us/categories/200028098-Media-Preparation

And that the Local Media Agent is set at the bottom https://support.plex.tv/hc/en-us/articles/200241558-Agents

A good tool to help you with the naming part (especially if you have a lot of files) is to use 3rd party tools such as Filebot, that can automatically fix most for you https://forums.plex.tv/discussion/191687/plex-naming-schemes-for-filebot

Good information. Thanks. The incorrect media naming sounds as if it is a likely cause. One thing I noticed this time around while renaming the titles in Plex is that it is inconsistent, there are a lot of movies that do not have the all caps title.

1 Like

If I may augment Peter’s reply;

Regarding making a backup of your PMS metadata, in Linux, the simplest and perfect backup you can make is

sudo sh
cd /var/lib/plexmediaserver
tar cf /where/to/save/backup/Library.tar   ./Library

When complete, Library.tar will have the full backup image of your files.

Should you later need to restore it., you only need to stop PMS and do the following

sudo sh
cd /var/lib/plexmediaserver
rm -rf Library     # remove anything which pre-exists
tar xf /path/to/saved/Librar.tar
chown -R plex:plex ./Library

Then start PMS.

3 Likes

So, I installed Filebot on my Ubuntu machine but ran into problems with accessing a mounted share where my media is located on a NAS.
I do more research and check out their forum but I believe Filebot may have a bug.

@ecrosby@gmail.com said:
So, I installed Filebot on my Ubuntu machine but ran into problems with accessing a mounted share where my media is located on a NAS.
I do more research and check out their forum but I believe Filebot may have a bug.

Accessing a mounted share is a file system problem, not a FileBot problem. The most common problem occurs when using the distro-supplied Java package. Go to Adobe and get theirs (Java SE Runtime). FileBot does require it.

@ChuckPA said:

@ecrosby@gmail.com said:
So, I installed Filebot on my Ubuntu machine but ran into problems with accessing a mounted share where my media is located on a NAS.
I do more research and check out their forum but I believe Filebot may have a bug.

Accessing a mounted share is a file system problem, not a FileBot problem. The most common problem occurs when using the distro-supplied Java package. Go to Adobe and get theirs (Java SE Runtime). FileBot does require it.

Man, I hate Adobe and Java so much. Maybe I’ll look into using the CLI version of Filebot to bypass using the GUI.

I am running Filebot CLI on a NFS mount without issues. If your server is headless, remember that there is no need to install X stuff to get the ability to execute Java programs. I followed this recently when I had to upgrade Filebot and it worked perfectly on my server - http://www.wikihow.com/Install-Oracle-Java-JRE-on-Ubuntu-Linux

@ecrosby@gmail.com said:

@ChuckPA said:

@ecrosby@gmail.com said:
So, I installed Filebot on my Ubuntu machine but ran into problems with accessing a mounted share where my media is located on a NAS.
I do more research and check out their forum but I believe Filebot may have a bug.

Accessing a mounted share is a file system problem, not a FileBot problem. The most common problem occurs when using the distro-supplied Java package. Go to Adobe and get theirs (Java SE Runtime). FileBot does require it.

Man, I hate Adobe and Java so much. Maybe I’ll look into using the CLI version of Filebot to bypass using the GUI.

you still need it… FileBot needs it

I have Java installed. I don’t think that is the issue. The Filebot GUI opens just fine, it’s just not able to view the mounted volume for some reason.

This is what I see when I open Caja file explorer in Ubuntu (Mate).

This is what I see when I open Filebot.

See that window on the left (not the one you have open… the blue-gray one).

Drag and drop your files in that pane.

After the drag & drop , it will look like this.

Kindly look here https://www.filebot.net/getting-started/

The full manual is here https://www.filebot.net/forums/viewtopic.php?f=3&t=7#p7

Thanks. I’ll take a look.

So, I finally got around to working with Filebot. I basically had to copy my media from the NAS to my local system and make changes then move it back. From what I can tell, while working with it in the GUI, is that it only renames the files, it doesn’t change the metadata, does it? Or is that come from using CLI? I believe that is most of my problems is improper metadata label. I was using EasyTAG on my local Ubuntu Mate machine and it work pretty good but there are some files, for some reason, that it has problem changing.
I guess I look up the links provided and on Filebot’s documentation to see if it will change metadata.

FileBot does not touch the contents of the files. It only renames and restructures the files per your renaming rules.

I have to grab up this one.

Simply dont understand the restoring. I went to Settings --> Help and “Database Restore”.

Now on the new system (Synology DS - like the old one) i want to restore. But i dont understand the help pages and threads.
Could somebody please help me? Thx

Remember when you were in Control Panel -> Update & Restore -> Configuration Backup
and clicked “Backup Configuration” ?

Now you do the reverse.

Get into Control Panel -> Backup & Restore -> Configuration Backup
click on Restore Configuration and browse to the file it previously downloaded to your computer (a .dss file)

This backup works just fine, but I was wondering if there are any folders in the Library folder that can be excluded from the backup? Because the Metadata en Media folders are VERY large, creating a tar takes quite some time.

Yes, it can take a long time but maybe you’re carrying more metadata than you need?

You need the database and all those metadata directories because:

  1. Contains posters
  2. Contains subtitles
  3. Contains chapter index images (if enabled) <— usually the size problem