I am pretty sure I have seen this question before but can’t find it for the life of me…
I have a 3rd party offsite backup service and I backup all of my media both onsite and offsite. I could backup the complete Plex media server folder also but don’t want to if I don’t need to. I want to be able to completely restore my database and all of the settings and all of the curated artwork and changes I have made and not just let Plex go back to the internet and get new data.
What say you?
Everything from Plex Media Server
and down.
If Windows, use zip
If Linux, use tar
Do the backup with PMS shutdown else the DB will get corrupted.
The type of backup service I run is always looking for changes to any folder I point it to and backs that up (think Carbonite, Backblaze, Crashplan, etc.). If I point it to the Plex Media Server and everything everything beneath it, are you saying that I will not be able to restore from those directories because the server is up? I do not, currently, zip the directories, I just backup whatever is there.
Correct. You cannot backup Plex when live because the database is cached in RAM when running. You will end up with an inconsistent / incomplete database (the DB itself). When you restore, the database will be incomplete and appear damaged.
Compressing the files is not required. Backup and restore when not running is the requirement . It is not possible to restore any file which is open (in use). The database (db files) are open whenever PMS is running. Backing up media metadata (static files) is a different matter and can be backed up while running but not the DB.
Thank you for the information. I don’t suppose you know of a script or application or something like that that can be scheduled to take PMS down, zip the files (or even just copy the files to another directory) and then bring PMS back up do you? My PMS just runs and I have family and such that connects to it so finding a set time is always hard unless it is like at 2AM.
I doubt there is but I figured I had to ask. Thank you again for the great info.
In Linux, it is trivial to create a scheduled task to stop PMS, perform the backup, and restart it.
the script in Linux would look like this:
sudo systemctl stop plexmediaserver
sudo tar cf /nas/backup/pms-database.tar /var/lib/plexmediaserver
sudo systemctl start plexmediaserver
This makes a simple copy of everything as quick as network and disk speeds allow, storing it in one ‘tar’ file (an archive format)
Thank you. I will get this to someone who knows Windows and maybe they can do something ithere like it.
On Windows, you will want %APPDATA%\Plex Media Server
and all below it.
OK, I am finally getting back to this after talking with some friends who do this kind of thing and I am trying to teach myself PowerShell :#
The problem I am having now is that I do not see a Plex Media Server in the Windows Services list. There is a Plex Update Service but that is it (and, yes Plex is currently running just fine). Is that the same thing in Windows? I could have sworn I saw one in the past but maybe not.
Thanks. If I ever get this to work, I will definitely paste what I have so that others do not have to figure it out for themselves.
would be very nice to get this “auto” working 