Linux Tips

Backup, Restore, or Clone your PMS installation

Backing up your PMS data involves the same steps you’ll need if you were to clone your PMS and take to a new computer, reinstall the operating system, or just want a backup for safe keeping.

Making the Backup (General Steps)

  • Stop PMS
  • Invoke the root shell
  • Create the backup image
  • Copy the image to the new system, perform your OS reinstallation, or whatever task you need

Restoring a backup image (General Steps)

  • (Re)install PMS itself if on a new machine
  • Start and Stop PMS one time (no interaction with it is required)
  • Restore the backup image
  • Start PMS

Make the backup image:

On the source (original) system:

[chuck@lizum ~.74]$ sudo sh
sh-4.4# cd /var/lib/plexmediaserver
sh-4.4# tar cfz /nas/tmp/PlexBackup.tar.gz ./Library
sh-4.4# ls -la /nas/tmp/PlexBackup.tar.gz 
-rw-r--r--. 1 root root 864050144 Oct 29 15:29 /nas/tmp/PlexBackup.tar.gz
sh-4.4# 

Restoring a backup image:

sh-4.4# sudo sh
sh-4.4# systemctl start plexmediaserver
sh-4.4# systemctl stop plexmediaserver
sh-4.4# cd /var/lib/plexmediaserver
sh-4.4# rm -rf Library
sh-4.4# tar xf /nas/tmp/PlexBackup.tar.gz
sh-4.4# chown -R plex:plex ./Library
sh-4.4# systemctl start plexmediaserver

Cloning from one to another:

  • Make a backup image
  • Transport it to the new system
  • Restore the image
  • Remember to decommission (delete) the old Preferences.xml file else you’ll have two servers with the same name and ID.

Back to top

3 Likes
Moving Plex Metadata database between Linux Distros and Plex versions
Regarding Chucks Tips & Trick - Backup
Adding a new server to my account
Seeing 2 folders for drives after upgrade
I have to manually run systemctl daemon-reload everytime my rPi reboots
Plex Media Server becomes unavailable after claim
Buffering with plenty of bandwidth available
Advice on Moving Install to another location with DB
Migrate PMS Ubuntu 18.X to Ubuntu 22.10
'cannot create symbolic link' error when backing up the Plex Media Server folder
WD NAS to Windows
Backup folder/directory Raspberry Pi
Library location on ReadyNAS
Issues accessing duplicated Plex servers
How to import the 1-5 stars of the songs to a new installation?
Migrating Plex Media Library to a New Linux Server Without Losing Metadata
Homelab and Proxmox
2 Plex server on 2 nas boxes with different names
Move Plex Server from Linux to Linux VM
Has anyone done this very specific Linux migration?
New Plex Pass User with a couple of questions
PMS setup wizard broken?
Moving PMS from Ubuntu to new hardware
How to restore DB files with default directory permission Ubuntu?
Save plex media serveur
Restoring a backed up Plex Media Server on Ubuntu
Database Migration
Possible to "clone" a server (not just move it)
Upgrade PMS on Linux
Server Migration with Plex PASS
Migrating to a New PlexServer - Basic strategy
PMS Database backup to external location - Ubuntu
Backup server info
Where is the library setup data stored?
Moving to a new version of the OS
Saving the entire Plex configuration
Moving NAS server to new NAS
Metadaten lokal