Backup Plex

Server Version#: 1.30.2.6563

I would like to create a backup of my Plex metadata- specifically when I add or modify the metadata associated with stored videos, I want to preserve that metadata and be able to upload it if I have to wipe my Synology NAS (I’ve been burned by this in the past).

The data (video, music, photos, etc.) are backed up and stored on external USB drives using Synology’s Hyper Backup, so I’m not concerned with that, just the metadata for the films.

This site states that I just need to copy the preferences.xml file (simple drag and drop???). My preferences.xml is located here:

So then, is it true I just need to copy that file and store it on my NAS? And then when needed after a wipe, simply drag and drop it back?

That is incorrect. You missed the part about backing up the main Plex Media Server data.

You want to backup the entire Plex Media Server data directory, including preferences.xml. You can leave out the cache directory if needed.

You should stop Plex Media Server before performing the backup. The database files need to be closed. If they are not, the backed up versions may be corrupt.

If you do not wish to stop PMS during the backup, a) enable Backup database every three days in Settings → Scheduled Tasks, and b) backup the specified location (default is the PMS data diretory). If you have to restore, restore one of the backups made by Plex. It will be a few days out of date, but will be valid, as PMS closes the database before making the backup.

If I may add to FordGuy ?

  1. HyperBackup will, with PMS stopped, make a perfect Compressed Image Backup of the entire PlexMediaServer shared folder.

  2. Should you need to restore from it, EVER customization you had will be restored, It’s a perfect snapshot of everything.

Thanks to you and @FordGuy61- backed all PMS folders to Synology using Hyper Backup.

Q- how do I stop Plex short of going to Apps => Package Center => Plex and stoping Plex there? Is that a more direct way to do so?

That is the way I do it.

Some of the Synology services can be started/stopped via the CLI. However, I do not know if the same is true for Plex. I’ll see if I can find out anything.

@david.weinberg @FordGuy61

There’s a way to do it from the command line.

systemctl isn’t official.

However,

synopkg stop PlexMediaServer
-and-
synopkg start PlexMediaServer

Are officially supported

Capitalization is required.

There are other options beyond start/stop. resume/pause are interesting.

bash-4.4# synopkg
usage: synopkg <command> [...]

command:
  start <package>                                                 Start a package.
  stop <package>                                                  Stop a package.
  restart [--service] <package|searvice>                          Restart one package/one or more services.
  resume <package>                                                Start a package without change its systemd enable status.
                                                                  It will do nothing if package is disable or already active.
  pause <package>                                                 Stop a package without change its systemd enable status.
                                                                  It will do nothing if package is already inactive.
  start-depend <service>                                          Start all packages depend on specific service.
  stop-depend <service>                                           Stop all packages depend on specific service.
  onoffall start|stop [event] [param]                             Start or stop all the packages.
  install <spk>                                                   Install a package through local spk.
  install_from_server <package> [volume] [user] [beta]            Install a package from server.
  uninstall <package>...                                          Uninstall one or more package.
  upgradeall [limitonly] [lang] [user]                            Upgrade all upgradable package.
  chkupgradepkg [lang]                                            Find all upgradable packages from server, and decide whether to
                                                                  upgrade accorting to user settings.
  checkupdateall [lang] [user]                                    Find all upgradable packages from server (use cache first), and
                                                                  decide whether to upgrade accorting to user settings.
  status <package>                                                Get status of an installed package.
  is_onoff <package>                                              Check if a package is installed and active.
  version <package>                                               Get version of an installed package.
  query <spk>                                                     Get a package's basic information from the spk.
  list [--name] [--depend-on <package>]                           List installed package.
  checkupdate <package> [lang]                                    Check if a package is updatable.

bash-4.4# 
1 Like

Way to deep in the weeds for me (I’ve never been comfortable with command lines since messing around with Fortran long ago…)

I’ll just stick with package center :slight_smile:

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