Plex DB on new machine, can't cat settings.sql | sqlite3 com.plexapp.plugins.library.db

I just migrated from a FreeNAS Jail to ESXi + Ubuntu server.

I followed this guide to try and migrate my database and am running into an issue.

On ubuntu, I have the plex service stopped, I also run Tautulli which is stopped as well. I try and

cat settings.sql | sqlite3 com.plexapp.plugins.library.db

and I get Error: near line (Every line basically) attempt to write a readonly databasee

So, what I have tried:

chmod 777, chown to my user name, I am running cat as sudo. Clearly something doesn’t want to let go of this database. Any ideas?

Is PMS running? If it is, it will hold an exclusive lock on the file. Root permission is insufficient to override a lock.

It is not. PMS and Tautulli are both stopped.

I missed it.

You don’t run ‘cat’ as sudo, run sqlite3 as root (sudo) or both

cat settings.sql | sudo sqlite3 com.plexapp.plugins.library.db

This is the limit of what I know.

You might have a read-only lock somewhere in your allocation / mounts

1 Like

Hmm, well. Progress?

Now I get this:

Error: near line 1845: UNIQUE constraint failed: metadata_item_settings.id

I take it back. I ran it once, thought it was an issue, ran it again and got that error on basically every line.

Looks like it worked the first time.

Thanks man!!!

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