# Linux Tips

**URL:** <https://forums.plex.tv/t/linux-tips/276247>\
**Category:** Tips, Tricks & How-Tos\
**Tags:** server-linux-tips, server-linux, tipstricks\
**Created:** [June 26, 2018, 5:11pm UTC](https://forums.plex.tv/t/linux-tips/276247 "2018-06-26T17:11:57Z")\
**Posts on this page:** 1\
**Showing post:** 7

<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:** [June 26, 2018, 8:29pm UTC](https://forums.plex.tv/t/linux-tips/276247/7 "2018-06-26T20:29:12Z")

</div>

## **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:

```nohighlight
[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:

```nohighlight
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](https://forums.plex.tv/t/linux-tips/276247)

---

_[View the full topic](https://forums.plex.tv/t/linux-tips/276247)._
