Backup plex library

DLNA, AirPlay, Chromecast, PS3, XBOX, iTunes, & other media players
Post Reply
paolozac
New here
Posts: 2
Joined: Thu Dec 31, 2015 3:01 pm

Backup plex library

Post by paolozac »

Hello to everybody,
on my QNAP TS-451 8TB raid 5 I've recently installed PLEX Server to which I fed about 100,000 media files (photos, movies, and tvseries).
All data folder of QNAP where I keep the media files are already copied to another USB drive attached to the QNAP and I would do the same thing with the library PLEX Server.
Where is located the PLEX library?
How do I map the library to a folder visible from my computer to then copy?
I hope it was clear.
Thanks in advance for your help.
Paul
paolozac
New here
Posts: 2
Joined: Thu Dec 31, 2015 3:01 pm

Re: Backup plex library

Post by paolozac »

Hi Philippe,
I thank you for the answer but i'm not an expert and so your message is not very clear.
The cd.... is a command? where have i have to type this command?
I use the qnap nas from a mac OS X computer.
Thanks again
Paolo
guitarburke
New here
Posts: 6
Joined: Wed Dec 02, 2009 8:49 pm

Re: Backup plex library

Post by guitarburke »

Hello,
I was able to successfully back up my Plex library following the steps above. I'm having trouble using the 'cp' command specified in 'in case of restore'
- drive saved to: USBDisk1/Databases/Plex Media Library
- Plex Install Path: /share/CHACHEDEV1_DATA/.qpkg/PlexMediaServer
any help with the specific commands is greatly appreciated
guitarburke
New here
Posts: 6
Joined: Wed Dec 02, 2009 8:49 pm

Re: Backup plex library

Post by guitarburke »

Thanks for the reply. This is what I have back from my NAS after ssh admin login:

[~] # cd "USBDisk1/Databases/Plex Media Library"
-sh: cd: USBDisk1/Databases/Plex Media Library: No such file or directory
[~] # cd "/USBDisk1/Databases/Plex Media Library"
-sh: cd: /USBDisk1/Databases/Plex Media Library: No such file or directory
[~] # cd /USBDisk1/Databases\Plex\ Media\ Library
-sh: cd: /USBDisk1/DatabasesPlex Media Library: No such file or directory
[~] #

I know it's a pretty basic command, I think I'm missing one little piece to make it work.
guitarburke
New here
Posts: 6
Joined: Wed Dec 02, 2009 8:49 pm

Re: Backup plex library

Post by guitarburke »

I was able to cp to the drive:
cp "/USBDisk1/Databases/Plex Media Library"
cp: missing destination file operand after `/USBDisk1/Databases/Plex Media Library'
Try `cp --help' for more information.

but I'm not sure how to string the command back to the NAS at
/share/CHACHEDEV1_DATA/.qpkg/PlexMediaServer
guitarburke
New here
Posts: 6
Joined: Wed Dec 02, 2009 8:49 pm

Re: Backup plex library

Post by guitarburke »

It took a couple of tries, but it amounted to doing smaller steps each time to verify result was working. This one worked, now that I look at your original solution, makes sense perfectly.

[~] # cd /share/USBDisk1
[/share/USBDisk1] # cd Databases
[/share/USBDisk1/Databases] # cd Plex_Media_Server
<a_Server] # cd $(getcfg PlexMediaServer install_path -f /etc/config/qpkg.conf)
<iaServer] # cp -pPR /share/USBDisk1/Databases/Plex_Media_Server/* Library/
User avatar
OneCD
Guru
Posts: 12039
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: Backup plex library

Post by OneCD »

guitarburke wrote:It took a couple of tries, but it amounted to doing smaller steps each time to verify result was working.
Nicely done. ;)

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage
jknight2
Starting out
Posts: 11
Joined: Thu Dec 31, 2015 11:16 am

Re: Backup plex library

Post by jknight2 »

Backup and Restore of Plex Media Server for QNAP (Linux) for fellow Noobs with CLI - Original post by Philippe from QNAP Forum

You need to open a console to access the QNAP system Command Line Interface (CLI) I can not see how to do it with the QNAP Web Page file copy interface
... you can use telnet client (PUTTY for PC)
... after validating telnet server in QNAP's admin menu (Telnet access must be Turned On for this to work)
... you can use SSH (best) client ... also after validating in Web admin (same menu as telnet)
... REMEMBER commands for file and folder name, in Linux, are case dependent ... so Plex is not plex
... cd command is to change the working directory ... $(........) is to use the result of the command in parentheses ... here I get the path used by the QNAP to install Plexmediaserver ... On house keeping, if you share your old Plex with friends and family you may need to get those emails prior to full deletion of old plex
... Assumption: You have already installed through the web interface the SAME version of PLEX APP on the new QNAP system to create ALL the right folders for you

From: Console on FIRST (Source) QNAP

At this point you should be looking at the screen of PUTTY or other Terminal program and have the "[~] #" Prompt after logging in

[~] # mkdir /share/Public/my_plex_library (this will create a folder for a save of your Library that you can easly access)
then each time you want to save your Library (Future steps for doing a REAL full backup of PLEX Files (This is NOT a quick process depending on PLEX size)
[~] # cd {to installation path for Plex} should be /share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/
[~] # cp -pPR Library/* /share/Public/my_plex_library (this will copy all file and folder in Library folder to a visible folder in Public share)
... after do a save, using this accessible folder ... as you want (archive, zip, cp, FileStation, etc.)

Because I have both QNAPs on the same network, for me I used FileStation 5 (QNAP Utility to Remote Mount the Public Share on the New QNAP then Drag and Drop copy)

To: Console on SECOND (Destination) QNAP

[~] # cp {from folder, archive, usb ... to} /share/Public/my_plex_library (or what ever)
[~] # cd {to installation path for Plex, should be} /share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/
Now you can cp {copy} back to the new Library folder
[~] # cp -pPR /share/Public/my_plex_library/* Library/

-pPR said : p = preserve the access right ; P preserve the link (if some exist inside) ; R copy also all sub-folder and contents (recursive).

My copy took hours - 22GBs and 500K Objects! I also found that since I have upgraded PLEX over 20 times that I just needed to rebuild from scratch (Days to get all the Metadata)!

Original post by Philippe
Post Reply

Return to “Media Streaming”