# Backup Plex

**URL:** <https://forums.plex.tv/t/backup-plex/829903>\
**Category:** Plex Media Server\
**Tags:** server-synology\
**Created:** [February 7, 2023, 2:43pm UTC](https://forums.plex.tv/t/backup-plex/829903 "2023-02-07T14:43:19Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![david.weinberg](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/david.weinberg/32/272731_2.png) [@david.weinberg](https://forums.plex.tv/u/david.weinberg)\
**Post date:** [February 7, 2023, 2:43pm UTC](https://forums.plex.tv/t/backup-plex/829903/1 "2023-02-07T14:43:19Z")

</div>

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](https://support.plex.tv/articles/201539237-backing-up-plex-media-server-data/) states that I just need to copy the preferences.xml file (simple drag and drop???). My preferences.xml is located here:

 ![Screenshot 2023-02-07 at 9.37.17 AM](https://global.discourse-cdn.com/plex/original/4X/0/b/2/0b25ce9cc1d19ccea3920e23b207692d65d34349.jpeg)

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?

---

<div class="post-metadata">

**Author:** ![FordGuy61](https://avatars.discourse-cdn.com/v4/letter/f/22d042/32.png) [@FordGuy61](https://forums.plex.tv/u/FordGuy61)\
**Post date:** [February 7, 2023, 6:42pm UTC](https://forums.plex.tv/t/backup-plex/829903/2 "2023-02-07T18:42:23Z")

</div>

> [@david.weinberg](#):
>
> [This site](https://support.plex.tv/articles/201539237-backing-up-plex-media-server-data/) states that I just need to copy the preferences.xml file (simple drag and drop???). My preferences.xml is located here:

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.

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [February 7, 2023, 11:33pm UTC](https://forums.plex.tv/t/backup-plex/829903/3 "2023-02-07T23:33:34Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![david.weinberg](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/david.weinberg/32/272731_2.png) [@david.weinberg](https://forums.plex.tv/u/david.weinberg)\
**Post date:** [February 9, 2023, 1:46pm UTC](https://forums.plex.tv/t/backup-plex/829903/4 "2023-02-09T13:46:55Z")

</div>

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

 ![Screenshot 2023-02-09 at 8.41.53 AM](https://global.discourse-cdn.com/plex/original/4X/5/2/4/5248b88f4d88e51a08584983a758cdb1a4ca31a7.png)

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?

---

<div class="post-metadata">

**Author:** ![FordGuy61](https://avatars.discourse-cdn.com/v4/letter/f/22d042/32.png) [@FordGuy61](https://forums.plex.tv/u/FordGuy61)\
**Post date:** [February 9, 2023, 4:19pm UTC](https://forums.plex.tv/t/backup-plex/829903/5 "2023-02-09T16:19:40Z")

</div>

> [@david.weinberg](#):
>
> 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.

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [February 9, 2023, 5:22pm UTC](https://forums.plex.tv/t/backup-plex/829903/7 "2023-02-09T17:22:15Z")

</div>

@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.

```auto
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# 

```

---

<div class="post-metadata">

**Author:** ![david.weinberg](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/david.weinberg/32/272731_2.png) [@david.weinberg](https://forums.plex.tv/u/david.weinberg)\
**Post date:** [February 9, 2023, 7:02pm UTC](https://forums.plex.tv/t/backup-plex/829903/8 "2023-02-09T19:02:09Z")

</div>

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 🙂

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [May 10, 2023, 7:02pm UTC](https://forums.plex.tv/t/backup-plex/829903/9 "2023-05-10T19:02:47Z")

</div>

Closed on May 10, 2023, 7:02pm UTC

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