How to move viewstate on Plex on TrueNAS via SQLite?

ChaosBlades

Contributor
Joined
Jul 4, 2015
Messages
137
Tried to follow the plex support article but the database is blank.
Tried...
pkg install sqlite3
echo ".dump metadata_item_settings" | sqlite3 com.plexapp.plugins.library.db | grep -v TABLE | grep -v INDEX > settings.sql
but I only get this in the settings.sql
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
COMMIT;
Anyone with some knowledge of SQLite know what is going on here?

I am moving my install from TrueNAS Core to Ubuntu Server until I can migrate to TrueNAS SCALE.
 

Neznix

Cadet
Joined
Nov 30, 2015
Messages
4
I am doing the same and also had some problems. I found some steps in another posts that worked https://www.truenas.com/community/threads/flexget-and-sqlite.24009/post-146980

What I did:
SSH to TrueNAS
iocage console plex
pkg install py27-sqlite3
pkg install python
service plexmediaserver_plexpass stop
cd /Plex\ Media\ Server/Plug-in\ Support/Databases/
echo ".dump metadata_item_settings" | sqlite3 com.plexapp.plugins.library.db | grep -v TABLE | grep -v INDEX > settings.sql
 

ChaosBlades

Contributor
Joined
Jul 4, 2015
Messages
137
Ah, so I didn't install python and I needed to be in a certain directory.

I ended up setting up the libraries and server settings on the new server, saving the plex server settings .xml file. Then copying over the entire config directory. Everything just worked. Seems some shows / movies got unassigned out of there custom collection and a few needed to re-make preview thumbnails. Other than those minor issues everything just worked. If you do it this way don't forget to change all the files / directories back to the plex user and group.
 
Top