How do i Backup metadata from my synology NAS and migrate to a new synology NAS using a new HDD?
any official procedure …step by step ?
and how do i perform backup
Just so I give you the easiest method; Are you migrating your DSM installation, as a whole, to a new NAS or only moving PMS from one Synology NAS to another?
Sorry i should clarify here . I will have chance to buy a new synology server and also i am considering to build a new PLEX server on windows platform . May i know how to do them both? THANKS
Of course you can know both
The difference between the two is where your media (movies,tv, and music) is located between NAS’s. If the locations (share names) are the same on both, it will not matter at all. As example, I use /volume1/movies, /volume1/tv, and /volume1/music (very simple).
Here is where the procedure changes depending on what you do.
-
If you perform a “Synology migration”, where you move all the disks from the old NAS to the new NAS and reinstall DSM, all your media will still be there and intact with the same names it had before. The Synology migration process only re-installs DSM. It does not erase the entire volume. All you need to do is reinstall PMS in Package Center. Your PMS Library will be intact because Plex keeps the software and your Library in different locations (
/volume1/@appstore
versus/volume1/Plex/Library
). -
If you are moving to a new NAS, and your media isn’t in shares with the same names we have to adjust for this. Your Library will still be in Plex share but it will be looking for your media in different share names.
Here is the full procedure to copy from one to another. Since this does make a mirror copy, you’ll have to do minor editing of settings (Server name, etc) in addition to correcting the media locations (which I detail below).
-
Open PMS.
-
Go to Settings - Server - Library. Uncheck EVERYTHING and save the changes. This puts PMS in fully manual library mode.
-
Enable SSH on your existing Synology and ssh to it. log in as ‘admin’ with the admin password.
-
Be certain to stop PMS in Package Center
sudo -su root cd /volume1/Plex tar cf SynoLibrary.tar ./Library chown your_username:users SynoLibrary.tar
-
When this step is done
SynoLibrary.tar
contains the entire Library and all information. It also is the perfect backup of your PMS Library and all configuration information. -
Take this file (SynoLibrary.tar) to the new NAS. Now reverse the process with a minor deviation.
-
Install PMS and let it start once
-
Wait 1 minute (until NAS quiets down) and then stop PMS.
-
Copy the file
SynoLibrary.tar
into the new Plex share -
SSH into the new NAS
sudo -su root
cd /volume1/Plex
mv Library Library.unused
tar xf SynoLibrary.tar
chown -R Plex:users ./Library -
Start PMS and open it in your browser as always
-
For each Library section you have defined,
12a ‘Edit Library - Add Folders’
12b. Add the new location where your media is now. Do not delete the old location yet.
12c. Save the change
12d. Update that single Library only (upper right corner ‘Update’)
12e. PMS might start tagging all your media with a ‘2’ indicating it thinks you have two copies. This is normal because there now are two locations in the database. -
With all libraries edited and updated:
13a. Settings - Server - Library: Re-enable all the settings you had before, just the way you had them and Save,
13b. Edit each library one last time, removing the old folder locations. -
Now we’ll clean up. Left Panel: Update Libraries and let all libraries update. Empty Trash when it’s complete. Clean Bundles.
-
When the NAS is quiet again (may take a while) “Optimize database”
That’s it. Go check your connectivity and make any other changes you wish with the new NAS.
Edit: major typo up top.
@ChuckPA said:
Of course you can know bothThe difference between the two is where your media (movies,tv, and music) is located between NAS’s. If the locations (share names) are the same on both, it will not matter at all. As example, I use /volume1/movies, /volume1/tv, and /volume1/music (very simple).
Here is where the procedure changes depending on what you do.
If you perform a “Synology migration”, where you move all the disks from the old NAS to the new NAS and reinstall DSM, all your media will still be there and intact with the same names it had before. The Synology migration process only re-installs DSM. It does not erase the entire volume. All you need to do is reinstall PMS in Package Center. Your PMS Library will be intact because Plex keeps the software and your Library in different locations (
/volume1/@appstore
versus/volume1/Plex/Library
).If you are moving to a new NAS, and your media isn’t in shares with the same names we have to adjust for this. Your Library will still be in Plex share but it will be looking for your media in different share names.
Here is the full procedure to copy from one to another. Since this does make a mirror copy, you’ll have to do minor editing of settings (Server name, etc) in addition to correcting the media locations (which I detail below).
Open PMS.
Go to Settings - Server - Library. Uncheck EVERYTHING and save the changes. This puts PMS in fully manual library mode.
Enable SSH on your existing Synology and ssh to it. log in as ‘admin’ with the admin password.
Be certain to stop PMS in Package Center
sudo -su root cd /volume1/Plex tar cf SynoLibrary.tar ./Library chown your_username:users SynoLibrary.tar
When this step is done
SynoLibrary.tar
contains the entire Library and all information. It also is the perfect backup of your PMS Library and all configuration information.Take this file (SynoLibrary.tar) to the new NAS. Now reverse the process with a minor deviation.
Install PMS and let it start once
Wait 1 minute (until NAS quiets down) and then stop PMS.
Copy the file
SynoLibrary.tar
into the new Plex shareSSH into the new NAS
sudo -su root
cd /volume1/Plex
mv Library Library.unused
tar xf SynoLibrary.tar
chown -R Plex:users ./LibraryStart PMS and open it in your browser as always
For each Library section you have defined,
12a ‘Edit Library - Add Folders’
12b. Add the new location where your media is now. Do not delete the old location yet.
12c. Save the change
12d. Update that single Library only (upper right corner ‘Update’)
12e. PMS might start tagging all your media with a ‘2’ indicating it thinks you have two copies. This is normal because there now are two locations in the database.With all libraries edited and updated:
13a. Settings - Server - Library: Re-enable all the settings you had before, just the way you had them and Save,
13b. Edit each library one last time, removing the old folder locations.Now we’ll clean up. Left Panel: Update Libraries and let all libraries update. Empty Trash when it’s complete. Clean Bundles.
When the NAS is quiet again (may take a while) “Optimize database”
That’s it. Go check your connectivity and make any other changes you wish with the new NAS.
Edit: major typo up top.
Hi there
I have Plex PMS Version 1.13.2.5102 on my OLD Synology NAS (DS1815+) with a huge library I bought a new Synology NAS (RS36118xs) with new HDD for greater capacity and better processor
I just finished 90% of Copying the Video Directory ( i have all of my Libray as subdirectories under volume1\video… \TV Shows Video\MOVIES etc ) from the old Synology nas to the new NAS (used Folder Re-sync) 23TB !!
I did A BACKUP AND restore from the old Synology NAS to the NEW Synology NAS (Users and folders etc)
I will follow this procedure (I did not install plex 1.13.2.5102 yet on the new Synology NAS YET waiting for library to be copied))
Is there any procedure that I should do (which is new than your post dated October 2016) for instance
1-should the Old NAS Synology PMS plex be Stopped before tar the Plex directory ?
2-Should the New NAS synology PMS be stopped before untar the copied TAR file ?
3-Should any of the settings of the OLD or NEW PMS be unchecked (like empty trash upon scan … etc)
4-Should I sign out of my plex account on PMS on the OLD or the NEW PMS before doing any of this ?
thanks for your advice
- Always stop PMS before making a copy of the files
- On the new, yes you must stop PMS
- Do not forget to move the ‘empty’
LIbrary
directory out of the way before untar - Turn off a. automatically update, and b. empty trash. This allows PMS to keep the existing metadata until you add the new media path names (if they have changed)
@ChuckPA said:
- Always stop PMS before making a copy of the files
- On the new, yes you must stop PMS
- Do not forget to move the ‘empty’
LIbrary
directory out of the way before untar- Turn off a. automatically update, and b. empty trash. This allows PMS to keep the existing metadata until you add the new media path names (if they have changed)
thanks ChuckPA
however at the last step in the new NAS after I executed tar xf SynoLibrary.tar
I started chown -R Plex:users ./Library
I got an error
invalid user" Plex:users’
what did I do wrong ?
GACK!
plex:users
That one’s on me. SORRY! <facepalm>
Adjust for maximum smoke (start the package)
@ChuckPA said:
GACK!
plex:users
That one’s on me. SORRY!
<facepalm>
Your the MAN thanks im not very familiar with linux but i know its case senstive didnt want to try anything untill i got your feedback
the funny thing i have all my libraries exactly as my old NAS now with everything intact (is it because i have tha same name volume1/Plex … ?) should i proceed with the written procedure of adding each folder from 12 onward ?
For each Library section you have defined,
12a ‘Edit Library - Add Folders’
12b. Add the new location where your media is now. Do not delete the old location yet.
12c. Save the change
12d. Update that single Library only (upper right corner ‘Update’)
12e. PMS might start tagging all your media with a ‘2’ indicating it thinks you have two copies. This is normal because there now are two locations in the database.
With all libraries edited and updated:
13a. Settings - Server - Library: Re-enable all the settings you had before, just the way you had them and Save,
13b. Edit each library one last time, removing the old folder locations.
Now we’ll clean up. Left Panel: Update Libraries and let all libraries update. Empty Trash when it’s complete. Clean Bundles.
When the NAS is quiet again (may take a while) “Optimize database”
@ChuckPA said:
Adjust for maximum smoke (start the package)
A Cigar smoke
thanks a lot u saved me a lot of time migrating
I didn’t say what kind of smoke, did I? Hope it’s a good one!
If you’re satisfied this is answered, please check the boxes for those which answer it so as to help others
@ChuckPA said:
I didn’t say what kind of smoke, did I? Hope it’s a good one!If you’re satisfied this is answered, please check the boxes for those which answer it so as to help others
I selected insightful is that what you mean by checking the boxes
thanks man i walso want to add that i didnt need to add each folder in my library step 12 as i mentioned i found every thing working now perfect
![]()
The “Yes” / “No” boxes. Those are what mark the thread as resolved. If not marked, it remains ‘unanswered’
Sorty> @ChuckPA said:
The “Yes” / “No” boxes. Those are what mark the thread as resolved. If not marked, it remains ‘unanswered’
Sorry chuck it might be me but I don’t c any yes/no boxes on my computer chrome or iPhone safari can u please post a pic where should I mark those boxes ?
Right Chair
I’ll go mark it if you want.
Please do
There is something maybe bitdefender on my computer does not show those buttons
Strange that even safari doesn’t show them