Database Backup/Restore function

Hi,

Would it be an idea to add an official backup/restore functionality on the Plex Server, so that it is possible to click BACKUP for instance from Server Settings and generate a complete, compressed backup file of all the metadata and related information needed on the server in case of a crash or server migration?

And a corresponsing restore function that can either replace or merge existing data?

Would be especially good for PlexPass users who may run "experimental" builds and may be concerned about downgrading after database upgrades. With a complete backup at the push of a button, one could relatively easily backup, upgrade, revert and then restore the old data in case of trouble.

Food for thought? What do you think?

Raising my hand to this one! +1

+1!!!

+1!!!

Please avoid posts like this, and do the followiing and in this order:

Press the "Like this" on the top post in this thread.

Read the pinned post named rules found here: http://forums.plexapp.com/index.php/topic/46128-rules-for-this-forum-inc-how-to-vote/?p=290064

Best regards

Tommy

+1 would love to see this feature! 

+1 would love to see this feature! 

Close to giving up here :angry:

Could you please read the darn pinned posts in a fora, as well as ALL posts in a thread before responding, like this: http://forums.plexapp.com/index.php/topic/71687-database-backuprestore-function/?p=450729 found just before yours!

/T

:mellow: :) :D

I survive from seeing the frustration in others, Tommy! I can't read the F&BV with any regularity -- seems too much like a cheerleader camp.

Here's my attempt to be the Good Shepherd, and I am laughing in advance at its ineffectiveness.

This would be a great function. I know my database gets backed up regularly by Backblaze but I wouldn't mind knowing there's a nice zip film regularly exported with everything in it.

+1

+1

Must resist...must......

http://forums.plexapp.com/index.php/topic/71687-database-backuprestore-function/?p=450729

/T

Seems like a pretty popular request. Would be super cool to learn what the developers think about this. Feasible, on the roadmap, or way off? Anyone up to grabbing the bait? ;-)

Seems like a pretty popular request. Would be super cool to learn what the developers think about this. Feasible, on the roadmap, or way off? Anyone up to grabbing the bait? ;-)

It is definitely possible, someone could easily do it themselves.  As to popularity, it is currently far below many other requests. 

It is definitely possible, someone could easily do it themselves.  As to popularity, it is currently far below many other requests.

Is there a page in the Wiki that explains this? Personally, I don't care if it comes off the shelf or that I manually have to add a Cron job to backup every night. But I do want to know for sure that I have all the locations and dependencies of the database files. I haven't seen any official statement on how to backup an entire database, artwork etc. included, so that it can be restored after a huge crash.

I am interested in this, since I am going to implement remote backup on a much less powerful NAS (unfortunately blocking a full system backup). Ideally I can include a zip-file along with all the media files to be backed up to the other site, allowing a quick restore after a significant crash/problem.

Jaap

Is there a page in the Wiki that explains this? Personally, I don't care if it comes off the shelf or that I manually have to add a Cron job to backup every night. But I do want to know for sure that I have all the locations and dependencies of the database files. I haven't seen any official statement on how to backup an entire database, artwork etc. included, so that it can be restored after a huge crash.

I am interested in this, since I am going to implement remote backup on a much less powerful NAS (unfortunately blocking a full system backup). Ideally I can include a zip-file along with all the media files to be backed up to the other site, allowing a quick restore after a significant crash/problem.

Jaap

this is my cron script, it runs weekly.

#!/bin/bash
 
# consts
SOURCEDIR=/var/lib/plexmediaserver/
BACKUPDIR=/Volumes/Dump/PlexBackup
FINALDIR=/Volumes/Data/Backups/Media
FILENAME=/Volumes/Dump/Backups/PlexBackup.$(date +%Y%m%d)
KEEPDAYS=15
USER=abc
 
# Create dirs and rsync stuff 
test -d $BACKUPDIR || mkdir -p $BACKUPDIR
test -d $FINALDIR || mkdir -p $FINALDIR
rsync -a --delete $SOURCEDIR $BACKUPDIR 
 
# bundle it all up, and move it somewhere safe
tar -cjf ${FILENAME}.tar.bz2 $BACKUPDIR
su $USER -c "cp $FILENAME.tar.bz2 $FINALDIR"
 
#delete the really old stuff
find /Volumes/Dump/Backups -name 'PlexBackup.*' -atime +$KEEPDAYS -delete
su $USER -c "find $FINALDIR -name 'PlexBackup.*' -atime +$KEEPDAYS -delete"

needs some simplifying, $SOURCEDIR is everything you need. (my .bz2 is 101Gb which is why I don't do this daily - I rarely make a large amount of manual changes to metadata/art, if do, I just manually run the script)

Is there a page in the Wiki that explains this? Personally, I don't care if it comes off the shelf or that I manually have to add a Cron job to backup every night. But I do want to know for sure that I have all the locations and dependencies of the database files. I haven't seen any official statement on how to backup an entire database, artwork etc. included, so that it can be restored after a huge crash.

I am interested in this, since I am going to implement remote backup on a much less powerful NAS (unfortunately blocking a full system backup). Ideally I can include a zip-file along with all the media files to be backed up to the other site, allowing a quick restore after a significant crash/problem.

Jaap

I use this on a QNAP:

http://forums.plexapp.com/index.php/topic/70739-plex-backup/?p=408636

+1

Thanks!

I already tried the usual Zip-approach, only to find out that it started complaining about the zip-size :slight_smile: Now I know why :).

Jaap

Updated original post to also include an option to backup only the seen/unseen and how far into each item watched data. Seems like a good way to start fresh without losing the important stuff of which episodes/movies have been seen, and how far into each one..

Any chance of a comment from the developers?

May i contribute to this one

1) backup 

2) restore / migrate

3) change section path (an easy way. its just a sql query i guess)

4) store/read metadata to media folder (for easier migration)

5) autobackup data every NN hours to a predifined unc path

+1 Yes definitely.. my database is growing and I am planning on creating backup of it manually, but would be a plus when PMS has its own backup feature.

May i contribute to this one

1) backup 

2) restore / migrate

3) change section path (an easy way. its just a sql query i guess)

4) store/read metadata to media folder (for easier migration)

5) autobackup data every NN hours to a predifined unc path

That's a good summary. With the decreasing stability in newer Plex Media Server releases I believe the need for proper backup/resture is now more relevant than ever. I am especially worried about the seen/unseen status throughout the libraries. Doing a re-scan of most metadata is time consuming and a hassle, but losing track of what has been watched and how far is simply impossible. For these reasons I would really appreciate some sort of comment on this from the Plex team

1 Like