Hey guys! Has anyone had success migrating a Plex server from Windows to Linux in recent years? I’m mostly concerned about losing watch history / users (having to reinvite).

I found this Reddit thread on the issue and it seemed like a simple copy and paste of the DB file. I attempted following both the official directions from their guide and from the Reddit post and ran into a SQLite DB error similar to what another user experienced in the Reddit thread:

soci::soci_error() that sqlite3 prepare failed…Error: Unable to set up server: sqlite3_statement_backend::prepare: file is not a database for SQL: PRAGMA cache_size=512 (N4soci10soci_errorE)

Has anyone done a migration in the recent years? Seems like something might have changed within the last few and this copy and paste of the DB file will not work anymore?

  • TedZanzibar@feddit.uk
    link
    fedilink
    English
    arrow-up
    6
    ·
    2 months ago

    Just to add to the info so far: while you’re spending the effort doing a migration it’s worth going the extra few steps and moving to their Docker image. It’ll make any future server moves a doddle, not to mention updates etc.

      • XiberKernel@lemmy.world
        link
        fedilink
        English
        arrow-up
        2
        ·
        2 months ago

        Doodle is a bit more artistic, while jiffie is a bit more poetic. I haven’t found any practical differences in deployment.

    • friend_of_satan@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      2 months ago

      Agreed. I use their docker image, and have migrated servers. Other than copying data it only took a few minutes of cli-fu and everything was back up and running.

  • justlemmyin@lemmy.world
    link
    fedilink
    English
    arrow-up
    4
    ·
    edit-2
    2 months ago

    On the phone right now, but i did this last month OP.

    First of all make sure to keep a backup of the db. Normally Plex does this for you every few days in the db folder. (From your old windows install)

    The missing ingredient most likely is converting all the windows registry entries into preferences.xml

    There was a reddit post where some one had posted a sample XML. I repopulated it with all the settings from the windows registry export. If you can’t find the post then I can post mine here in the morning.

    Also had to create a plex user and group and chown it to all the media. I am a new Linux user so had to fuck around a lot coz of Fedoras SELinux file perms.

  • gazby@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    2
    ·
    2 months ago

    Are you sure the db is identical on the new server (rsync -a or similar)? The error suggests the database is not even being recognized as such.

    • Sl00k@programming.devOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      2 months ago

      Everything was freshly installed and updated including the OS (PopOS as I’m running it on my gaming PC)

      • ragebutt@lemmy.dbzer0.com
        link
        fedilink
        English
        arrow-up
        6
        ·
        2 months ago

        Is the windows side up to date? Most likely culprit would be a db mismatch if one side or the other is on a different version. Similarly, do you by chance have either side running a beta release? If you have plex pass you potentially have access to these

        Shameless moment to plug the idea that you could consider migrating to Jellyfin if you can’t solve the issue

      • CaptainBasculin@lemmy.ml
        link
        fedilink
        English
        arrow-up
        1
        ·
        2 months ago

        Check the database version on both sides to make sure they match.

        Pop OS currently is keeping the next version update on alpha as they’re developing their own compositor display stack called COSMIC to go along with it; so some database dependencies might have outdated versions.