I have a backup of the all the files from the soon to be retired PMS, also 1.22. However, even as admin (root), I can’t copy them into the destination directory and I suspect its a rights issue. I’m not sure if I change something, I’ll break something, and would I be able to repair myself. Seeking help here.
As these files are owned by user plex, and others can only read them, you’ll have to use sudo to perform any actions which will modify the files. Likewise, if the directory to which you are copying the files doesn’t allow you to write to it, you’ll also need to use sudo.
As an example, if you wanted to copy all of these files to a directory owned by plex on your new server, you’d do something like (from the directory where the database files are stored; ensure Plex Media Server is stopped when you do this): sudo cp * /path/to/new/server/data/directory/
But do you really only want to copy the database files to the new installation? Or are you attempting to recreate your existing server on the new system? If the latter, have a look at this forum post for a procedure to move your entire Plex data directory:
I just want to fully recreate what I have running on a qnap NAS on a more powerful ubuntu PC. What seems to not be explained, and I’ve noticed others have asked over the years, getting a backup of the DVR schedule. I’m not trying to figure out how to copy the recorded media (I’ve got that done), I just want the schedule of the DVR to be exactly as it is on the new ubuntu system. I don’t want to recreate manually the schedule. It just seems so odd that there is a backup routine within the plex program, but I’ve not found a restore routine… So I am left with trying work at command line to put DB files in a destination directory.
Your DVR schedule is stored in the main Plex database (the actual guide data is in the tv.*.db database). When you restore those, your new server will reflect your existing server’s configuration.
Regarding the command line to execute to move your data, my first link above is the probably the best documented example of which I’m aware. But assuming you’re using default paths, the following should work. Make sure Plex Media Server is stopped on both servers.
On the source server:
cd /var/lib/plexmediaserver
sudo tar cvzf plexdata.tgz ./Library/* # This will take a while to complete
Copy plexdata.tgz to your new server.
On the new server:
cd /var/lib/plexmediaserver
rm -rf Library # This step is optional; it’s just to ensure you’re starting clean
sudo tar xvzf /path/to/plexdata.tgz. # This will also take a while to complete
sudo chown -R plex:plex Library/ # This is likely unnecessary, but ensures proper ownership
Start Plex Media Server.
After performing these steps, don’t start Plex Media Server on your old server again.
The above steps assume:
Your existing Plex Media Server uses the default paths and user.
You’ve already install Plex Media Server on the new server, but not configured it. If you have configured it just be aware that these steps will completely overwrite anything you’ve done.
You could also perform a direct copy without tar’ing/gzipping the data first, though it would likely take longer to complete.