Restoring QNAP from backup - no libraries

Server Version#: 3.104.2
Player Version#:

Before Installing new disks on my QNAP TS-453bt3 I backed up what I thought were the crucial Plex Media server directory folders::

drwxrwxrwx 16 admin administrators 4096 2019-09-26 00:36 Crash Reports/
drwxrwxrwx 2 admin administrators 4096 2019-05-23 02:02 Diagnostics/
drwxrwxrwx 3 admin administrators 4096 2019-10-02 12:56 Logs/
drwxrwxrwx 3 admin administrators 4096 2019-05-07 23:27 Media/
drwxrwxrwx 5 admin administrators 4096 2019-05-22 02:10 Metadata/
-rw-rw-rw- 1 admin administrators 5 2019-10-01 17:53 plexmediaserver.pid
drwxrwxrwx 3 admin administrators 4096 2019-05-07 22:57 Plug-ins/
drwxrwxrwx 7 admin administrators 4096 2019-05-07 22:56 Plug-in Support/
-rw-rw-rw- 1 admin administrators 1606 2019-10-02 13:53 Preferences.xml

Following the article

https://support.plex.tv/articles/201370363-move-an-install-to-another-system/

I reinstalled Plex after the new disks were installed, and then copied over the folders above to

/share/CACHEDEV2_DATA/.qpkg/PlexMediaServer

where Plex was installed.

Unfortunately the new Plex install doesn’t seem to see any of the existing data. When I start it there are no libraries other than the default ones.

Any suggestions would be appreciated.

When you manually install PMS, QNAP forces it to CACHEDEV1_DATA/.qpkg/PlexMediaServer

If you use the App Center Migrate To function first to move to CACHEDEV2_DATA,
stop PMS,
then copy (move preferred) your backup on top of it on CACHEDEV2 (where QTS is now looking for it), it will find it when you restart.

I don’t have a CACHEDEV1_DATA directory. Evidently the firmware remembered the old directory and created a new one when I installed the new disks.

[/share] # ls
CACHEDEV2_DATA/ external/ HDC_DATA/ … homes@ Web@ Databases@ … Multimedia@
Download@ HDB_DATA/ … Public@

When I installed Plex that is where it was installed. Is there any way around the fact that the root directories for the backup and for the store are different?

Thanks for the fast reply!

When you install QTS, the very first volume it creates is CACHEDEV1_DATA

please open a ssh session and type ls -la /share | grep -i data

you should have one for each RAID set

[/share] # ls -la /share | grep -i data
drwxrwxrwx 29 admin administrators 4096 2019-10-04 04:08 CACHEDEV2_DATA/
lrwxrwxrwx 1 admin administrators 24 2019-10-04 04:08 Databases → CACHEDEV2_DATA/Databases/
lrwxrwxrwx 1 admin administrators 23 2019-10-04 04:08 Download → CACHEDEV2_DATA/Download/
drwxrwxrwx 2 admin administrators 40 2005-09-18 20:32 HDA_DATA/
drwxrwxrwx 2 admin administrators 40 2005-12-07 03:41 HDB_DATA/
drwxrwxrwx 2 admin administrators 40 2005-12-07 03:41 HDC_DATA/
drwxrwxrwx 2 admin administrators 40 2005-12-07 03:41 HDD_DATA/
drwxrwxrwx 2 admin administrators 40 2005-12-07 03:41 HDE_DATA/
drwxrwxrwx 2 admin administrators 40 2005-12-07 03:41 HDF_DATA/
drwxrwxrwx 2 admin administrators 40 2005-12-07 03:41 HDG_DATA/
drwxrwxrwx 2 admin administrators 40 2005-12-07 03:41 HDH_DATA/
drwxrwxrwx 2 admin administrators 40 2005-12-07 03:41 HDI_DATA/
drwxrwxrwx 2 admin administrators 40 2005-12-07 03:41 HDJ_DATA/
drwxrwxrwx 2 admin administrators 40 2005-12-07 03:41 HDK_DATA/
drwxrwxrwx 2 admin administrators 40 2005-12-07 03:41 HDL_DATA/
drwxrwxrwx 2 admin administrators 40 2005-12-07 03:41 HDM_DATA/
drwxrwxrwx 2 admin administrators 40 2005-12-07 03:41 HDN_DATA/
drwxrwxrwx 2 admin administrators 40 2005-12-07 03:41 HDO_DATA/
drwxrwxrwx 2 admin administrators 40 2005-12-07 03:41 HDP_DATA/
drwxrwxrwx 2 admin administrators 40 2005-12-07 03:41 HDQ_DATA/
drwxrwxrwx 2 admin administrators 40 2005-12-07 03:42 HDR_DATA/
drwxrwxrwx 2 admin administrators 40 2005-12-07 03:42 HDS_DATA/
drwxrwxrwx 2 admin administrators 40 2005-12-07 03:42 HDT_DATA/
drwxrwxrwx 2 admin administrators 40 2005-12-07 03:42 HDU_DATA/
drwxrwxrwx 2 admin administrators 40 2005-12-07 03:42 HDV_DATA/
drwxrwxrwx 2 admin administrators 40 2005-12-07 03:42 HDW_DATA/
drwxrwxrwx 2 admin administrators 40 2005-12-07 03:42 HDX_DATA/
drwxrwxrwx 2 admin administrators 40 2005-12-07 03:42 HDY_DATA/
drwxrwxrwx 2 admin administrators 40 2005-12-07 03:42 HDZ_DATA/
lrwxrwxrwx 1 admin administrators 20 2019-10-04 04:08 homes → CACHEDEV2_DATA/homes/
lrwxrwxrwx 1 admin administrators 25 2019-10-04 04:08 Multimedia → CACHEDEV2_DATA/Multimedia/
lrwxrwxrwx 1 admin administrators 21 2019-10-04 04:08 Public → CACHEDEV2_DATA/Public/
lrwxrwxrwx 1 admin administrators 18 2019-10-04 04:08 Web → CACHEDEV2_DATA/Web/

There are some posts on QNAP forums complaining about how QNAP increments the number and breaks some installs/restores.

One suggestion that they had was:

just create a symlink from /share/CACHEDEV2_DATA to CACHEDEV1_DATA

but I assume that would not work as the root directory is in the Plex Metadata?

https://forum.qnap.com/viewtopic.php?t=143022&p=681594

I filtered mine out (I have a ton of shares)

drwxrwxrwx 40 admin administrators 4096 2019-09-02 02:58 CACHEDEV1_DATA/
drwxrwxrwx 90 admin administrators 4096 2019-10-03 16:52 CACHEDEV2_DATA/
drwxrwxrwx  7 admin administrators 4096 2019-08-05 17:28 CACHEDEV3_DATA/
drwxrwxrwx 13 admin administrators 4096 2019-09-16 17:00 CACHEDEV4_DATA/
drwxrwxrwx  3 admin administrators 4096 2019-09-16 23:11 CACHEDEV5_DATA/
.
.
.
drwxrwxrwx  2 admin administrators   40 2005-09-18 23:32 HDA_DATA/
drwxrwxrwx  2 admin administrators   40 2005-12-07 06:41 HDB_DATA/
drwxrwxrwx  2 admin administrators   40 2005-12-07 06:41 HDC_DATA/
drwxrwxrwx  2 admin administrators   40 2005-12-07 06:41 HDD_DATA/
drwxrwxrwx  2 admin administrators   40 2005-12-07 06:41 HDE_DATA/
drwxrwxrwx  2 admin administrators   40 2005-12-07 06:41 HDF_DATA/
drwxrwxrwx  2 admin administrators   40 2005-12-07 06:41 HDG_DATA/
drwxrwxrwx  2 admin administrators   40 2005-12-07 06:41 HDH_DATA/
drwxrwxrwx  2 admin administrators   40 2005-12-07 06:41 HDI_DATA/
drwxrwxrwx  2 admin administrators   40 2005-12-07 06:41 HDJ_DATA/
drwxrwxrwx  2 admin administrators   40 2005-12-07 06:41 HDK_DATA/
drwxrwxrwx  2 admin administrators   40 2005-12-07 06:41 HDL_DATA/
drwxrwxrwx  2 admin administrators   40 2005-12-07 06:41 HDM_DATA/
drwxrwxrwx  2 admin administrators   40 2005-12-07 06:41 HDN_DATA/
drwxrwxrwx  2 admin administrators   40 2005-12-07 06:41 HDO_DATA/
drwxrwxrwx  2 admin administrators   40 2005-12-07 06:41 HDP_DATA/
drwxrwxrwx  2 admin administrators   40 2005-12-07 06:41 HDQ_DATA/
drwxrwxrwx  2 admin administrators   40 2005-12-07 06:42 HDR_DATA/
drwxrwxrwx  2 admin administrators   40 2005-12-07 06:42 HDS_DATA/
drwxrwxrwx  2 admin administrators   40 2005-12-07 06:42 HDT_DATA/
drwxrwxrwx  2 admin administrators   40 2005-12-07 06:42 HDU_DATA/
drwxrwxrwx  2 admin administrators   40 2005-12-07 06:42 HDV_DATA/
drwxrwxrwx  2 admin administrators   40 2005-12-07 06:42 HDW_DATA/
drwxrwxrwx  2 admin administrators   40 2005-12-07 06:42 HDX_DATA/
drwxrwxrwx  2 admin administrators   40 2005-12-07 06:42 HDY_DATA/
drwxrwxrwx  2 admin administrators   40 2005-12-07 06:42 HDZ_DATA/

When you moved things around, did you reset it to factory?

I ask because initially, my HDD array was CACHEDEV1.
In order to move it to the M.2 SSDs, I need to pull all the drives and factory reset it.
When I then installed QTS, it rooted itself on the M.2’s
Inserting the HDDs automatically assigned them as CACHEDEV2

You might need to to the same basic procedure to get your devices renumbered
-or-
teamviewer session with QNAP support while they dismount the pools and reassociate them with lv’s . Those logical volumes are what lvm_init look for when mapping to CACHEDEV_DATA

This is what lvm_init accomplishes at boot time.

[/dev] # mount | grep cache
/dev/mapper/cachedev1 on /share/CACHEDEV1_DATA type ext4 (rw,usrjquota=aquota.user,jqfmt=vfsv0,user_xattr,data=ordered,data_err=abort,nodelalloc,nopriv,nodiscard,noacl)
/dev/mapper/cachedev2 on /share/CACHEDEV2_DATA type ext4 (rw,usrjquota=aquota.user,jqfmt=vfsv0,user_xattr,data=ordered,data_err=abort,nodelalloc,nopriv,nodiscard,noacl)
/dev/mapper/cachedev3 on /share/CACHEDEV3_DATA type ext4 (rw,usrjquota=aquota.user,jqfmt=vfsv0,user_xattr,data=ordered,data_err=abort,nodelalloc,nopriv,nodiscard,noacl)
/dev/mapper/cachedev4 on /share/CACHEDEV4_DATA type ext4 (rw,usrjquota=aquota.user,jqfmt=vfsv0,user_xattr,data=ordered,data_err=abort,nodelalloc,nopriv,nodiscard,noacl)
/dev/mapper/cachedev5 on /share/CACHEDEV5_DATA type ext4 (rw,usrjquota=aquota.user,jqfmt=vfsv0,user_xattr,data=ordered,data_err=abort,nodelalloc,nopriv,nodiscard,noacl)
[/dev] # 

The support guys can change which pool gets assigned to which /dev/mapper device entry.

Created a support ticket with QNAP. Will try to update with results.

This is what QNAP support said during multiple exchanges:

"You will not be able to restore the previous configurations from plex. Its saving on the new volume because that was created as a system volume. If you were to upgrade you should have individually done the replace disk one by one feature then once all disks were replaced/rebuilt then you can simply expand the capacity.

Resetting it back to factory defaults will not change the system volume …

[To wipe the system volume]

The best method to perform this would be to reinitialize the unit. You can perform this by going into Backup/Restore > Restore to factory default > Reintiailize > input your password. Keep in mind this will completely wipe everything on the QNAP device. "

OK, so I did that. I restored from my Plex backup the following directories:

Crash Reports/ Logs/ Metadata/ Plug-ins/ Preferences.xml
Diagnostics/ Media/ plexmediaserver.pid Plug-in Support/

But Plex is still not seeing my libraries. I look in

/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Media/localhost/(0-9,a-f)

and there is a lot of stuff there.

Is there a way to backup all of the plex data on QNAP? Most of the QNAP utilities don’t give access to the .qpkg directory. My workaround is to ssh to the QNAP, cp -r * to one of the shared directories which is viewable, and then copy that to my iMac.

Only suggestion I’ve received is to setup a cron job to do the task …

Dane22 wrote this. It creates a share which FileStation can access to give you easy access.

1 Like

Darn. Forgot about that. Thanks!

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.