Backup Plex Media Server Ubuntu

Server Version#: 1.13.5.5332
Player Version#:

Given a running Plex Media Server on an Ubuntu 16.04, what information would I loose, if I backup just…

/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-in Support/Databases

…instead of the whole folder…

/var/lib/plexmediaserver/*

Or in other words, what kind of information is exactly contained in
/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-in Support/Databases?

Thank you in advance.

You would lose all metadata. The database only stores the linkage of the files

Make a tarball of ./Libary, compressing it as it goes, and be done.
You now have an image backup/clone

I created a script I can use to backup all data and all metadata.

Keep in mind you will need to change {destination} and the source of your data.
I run this script once in a while to create a backup. The next time you run it it will be faster.

I am not sure what all is contained in the 2nd part of the script. It is not that big. I have used it to restore my server on a different Ubuntu install. It works great. It will save all metadata and all settings. It may not be the best method. But it works for me.

I have had issues in the past trying to back it up when the server is running. So now my script will stop the server for a short time as the backup is made.

Here is the script:

$
rsync -var --del /home/BOB/Plex\ Data/ {destination}

service plexmediaserver stop
sleep 6

rsync -varc --del /var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/ {destination}

service plexmediaserver start

1 Like

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