Moving plex to another system problems

Server Version#: latest
Player Version#: NA

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

Got everything copied an in the right directories, but when I try to start up plex on the new system I get an error that the database is malformed. [0x7f352c53fb80] ERROR - Error: Unable to set up server: sqlite3_statement_backend::prepare: database disk image is malformed for SQL: PRAGMA cache_size=2000 (N4soci10soci_errorE)

I tried going through these steps: https://support.plex.tv/articles/201100678-repair-a-corrupt-database/ and sqlite can’t even open the db on the destination system. So I tried running through those steps on the source system and everything was fine there. Re-copied the db to the destination system and still can’t open it.

Both systems are running ubuntu 18.10. I’m running as root on the destination system. Both databases are owned by plex:plex. Both databases have the same permissions. Any ideas?

Hey sorry to hear about that weird problem. As it’s not complaining about perms, let’s approach it at the software level.

Given a db file, you sit at the original ubuntu computer and you apt get yourself the latest SQLITE3. You open the file and find it has no errors. Check.

Now you use sftp to move that file to the new computer. You get on the new computer and apt get yourself the same newest SQLITE3, but it can’t open the db file?

In my example, I’ve used sftp to eliminate any copy paste issues.
I’ve also used the exact same SQLITE3 executable to test.

If all these are true, your new computer has problems with SQLITE3 and it’s associated libraries. I’m wondering how to narrow that down more. Perhaps create a test db with just a couple of records on the old computer. See if the test db will open on the new computer. Youtube has some great introductory videos for that.

lmk.

How about this?

The difference being:

  1. If you’re retiring one then delete the source “Preferences.xml” so you don’t end up with a duplicate using the same name & UUID
  2. If you’re cloning to make a second server, delete the target preferences.xml (avoid duplication as well). and then setup again (but skip library section creation as this is retained in the process)
1 Like

I gave it another go this morning and this time I deleted the whole /var/lib/plexmediaserver/Library/Application Support/Plex Media Server folder on the target and un-tared my backup again. That worked.

1 Like

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