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