# Moving MacOS to Linux - errors

**URL:** <https://forums.plex.tv/t/moving-macos-to-linux-errors/883794>\
**Category:** Plex Media Server\
**Tags:** server-mac, server-linux\
**Created:** [July 28, 2024, 10:03pm UTC](https://forums.plex.tv/t/moving-macos-to-linux-errors/883794 "2024-07-28T22:03:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hutchwilco](https://avatars.discourse-cdn.com/v4/letter/h/ecb155/32.png) [@hutchwilco](https://forums.plex.tv/u/hutchwilco)\
**Post date:** [July 28, 2024, 10:03pm UTC](https://forums.plex.tv/t/moving-macos-to-linux-errors/883794/1 "2024-07-28T22:03:23Z")

</div>

Server Version#: 1.0.3  
Player Version#:  
\<If providing [server logs](https://support.plex.tv/articles/200250417-plex-media-server-log-files/) please do NOT turn on verbose logging, only [debug logging](https://support.plex.tv/articles/201643703-reporting-issues-with-plex-media-server/#toc-1) should be enabled\>

Hi all and hi @ChuckPa

I am reasonably confident Linux admin. But am stuck migrating Plex from Mac to Linux.  
I have followed the official guide to move PlexMS App Dir to a new system - in my case from a very old but perfectly functioning MacOS Catalina install (with uptodate PMS) to an Ubuntu LXC. The actual media remains on a NAS.

I have copied the Application Data folder over using rsync.  
I have opted to leave out the uploaded media folder as this was 90GB.  
I have chowned the folder and contents to plex:plex  
I have updated the Preferences.xml file with the identifiers from the Mac Install. (I note that this file is very brief compared to the mac PLIST/defaults output, but still, I copied over the identifiers)  
After seeing db errors starting plex, I followed [another forum post](https://forums.unraid.net/topic/124023-plex-unable-to-set-up-server-sqlite3_statement_backendprepare-database-disk-image-is-malformed/) that suggested eliminating all db files except

```auto
com.plexapp.plugins.library.blobs.db
com.plexapp.plugins.library.db

```

I tried ChuckPa’s automatic DBrepair script (cool!) -  
and restarted plex - no dice, same error as below:

The systemctrl/journalctl output I get is:

```auto
Jul 29 10:00:34 plex systemd[1]: Starting Plex Media Server...
Jul 29 10:00:34 plex systemd[1]: Started Plex Media Server.
Jul 29 10:00:35 plex Plex Media Server[154]: Error: Unable to set up server: sqlite3_statement_backend::loadOne: attempt to write a readonly da>
Jul 29 10:00:35 plex systemd[1]: plexmediaserver.service: Main process exited, code=exited, status=255/EXCEPTION
Jul 29 10:00:35 plex systemd[1]: plexmediaserver.service: Failed with result 'exit-code'.
Jul 29 10:00:40 plex systemd[1]: plexmediaserver.service: Scheduled restart job, restart counter is at 1.
Jul 29 10:00:40 plex systemd[1]: Stopped Plex Media Server.
Jul 29 10:00:40 plex systemd[1]: Starting Plex Media Server...
Jul 29 10:00:40 plex systemd[1]: Started Plex Media Server.
Jul 29 10:00:40 plex Plex Media Server[350]: Error: Unable to set up server: sqlite3_statement_backend::loadOne: attempt to write a readonly da>
Jul 29 10:00:40 plex systemd[1]: plexmediaserver.service: Main process exited, code=exited, status=255/EXCEPTION
Jul 29 10:00:40 plex systemd[1]: plexmediaserver.service: Failed with result 'exit-code'.
Jul 29 10:00:45 plex systemd[1]: plexmediaserver.service: Scheduled restart job, restart counter is at 2.
Jul 29 10:00:45 plex systemd[1]: Stopped Plex Media Server.
Jul 29 10:00:45 plex systemd[1]: Starting Plex Media Server...
Jul 29 10:00:45 plex systemd[1]: Started Plex Media Server.
Jul 29 10:00:46 plex Plex Media Server[370]: Error: Unable to set up server: sqlite3_statement_backend::loadOne: attempt to write a readonly da>
Jul 29 10:00:46 plex systemd[1]: plexmediaserver.service: Main process exited, code=exited, status=255/EXCEPTION
Jul 29 10:00:46 plex systemd[1]: plexmediaserver.service: Failed with result 'exit-code'.
Jul 29 10:00:51 plex systemd[1]: plexmediaserver.service: Scheduled restart job, restart counter is at 3.
Jul 29 10:00:51 plex systemd[1]: Stopped Plex Media Server.
Jul 29 10:00:51 plex systemd[1]: plexmediaserver.service: Start request repeated too quickly.
Jul 29 10:00:51 plex systemd[1]: plexmediaserver.service: Failed with result 'exit-code'.
Jul 29 10:00:51 plex systemd[1]: Failed to start Plex Media Server.

```

I have removed the old folder and let plex start fresh again, and repeated the process - obviously I could just clean slate it, but after 10 years at least of being a lifetime subscriber and accruing a lot of library metadata and shared access, I do not wish to let this go lightly.  
Really appreciate it if anyone can help - @ChuckPa , I have seen your replies to others migrating to look for you other posts, but honestly I have not been able to find one that is relevant or surpasses what I have already read and tried.

---

<div class="post-metadata">

**Author:** ![FordGuy61](https://avatars.discourse-cdn.com/v4/letter/f/22d042/32.png) [@FordGuy61](https://forums.plex.tv/u/FordGuy61)\
**Post date:** [July 28, 2024, 10:46pm UTC](https://forums.plex.tv/t/moving-macos-to-linux-errors/883794/2 "2024-07-28T22:46:56Z")

</div>

> [@hutchwilco](#):
>
> `attempt to write a readonly da`

Plex cannot write to the database.

Verify permissions for the [Plex Data Folder](https://support.plex.tv/articles/202915258-where-is-the-plex-media-server-data-directory-located/).

See Linux Tips: [Migration from another OS to Linux](https://forums.plex.tv/t/linux-tips/276247/23).

Specifically (adjusting if needed for running in an LXC):

- Change the ownership of the files to the Plex user on the Linux host.

```auto
# chown -R plex:plex "/var/lib/plexmediaserver"

```

- Make certain Linux file permissions are set correctly

```auto
# find /var/lib/plexmediaserver -type d -exec chmod 755 {} \;
# find /var/lib/plexmediaserver -type f -exec chmod 644 {} \;

```

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [October 26, 2024, 10:47pm UTC](https://forums.plex.tv/t/moving-macos-to-linux-errors/883794/3 "2024-10-26T22:47:37Z")

</div>

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