this post was submitted on 27 Jan 2025
48 points (100.0% liked)

Selfhosted

41554 readers
591 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 2 years ago
MODERATORS
 

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?

you are viewing a single comment's thread
view the rest of the comments
[–] justlemmyin@lemmy.world 5 points 3 days ago* (last edited 3 days ago) (2 children)

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.

[–] justlemmyin@lemmy.world 2 points 2 days ago (1 children)
<?xml version="1.0" encoding="utf-8"?>
<Preferences
OldestPreviousVersion="1.18.3.2156-349e9837e"
MachineIdentifier="####################"
ProcessedMachineIdentifier="####################"
AnonymousMachineIdentifier="####################"
MetricsEpoch="1"
AcceptedEULA="1"
PublishServerOnPlexOnlineKey="1"
PlexOnlineToken="####################"
PlexOnlineUsername="####################"
PlexOnlineMail="####################"
LastAutomaticMappedPort="0"
CertificateVersion="3"
PubSubServer="####################"
PubSubServerRegion="fmt"
PubSubServerPing="485"
LanguageInCloud="1"
FriendlyName="####################"
TranscodeCountLimit="3"
TranscoderQuality="0"
TranscoderH264BackgroundPreset="medium"
ButlerUpdateChannel="0"
DlnaEnabled="0"
CinemaTrailersFromTheater="1"
CinemaTrailersType="0"
WanPerUserStreamCount="2"
LanNetworksBandwidth=""
allowedNetworks="192.168.1.0/24"
customConnections=""
ManualPortMappingMode="1"
ManualPortMappingPort="####################"
FSEventLibraryPartialScanEnabled="0"
FSEventLibraryUpdatesEnabled="0"
GenerateBIFBehavior="never"
OnDeckWindow="52"
ScannerLowPriority="0"
ScheduledLibraryUpdateInterval="86400"
ScheduledLibraryUpdatesEnabled="1"
watchMusicSections="1"
CloudSyncNeedsUpdate="0"
ButlerTaskRefreshLibraries="1"
MinutesAllowedPaused="30"
DlnaReportTimeline="0"
ButlerEndHour="7"
ButlerStartHour="3"
PlexOnlineHome="0"
DvrIncrementalEpgLoader="0"
EnableIPv6="0"
WebHooksEnabled="0"
CinemaTrailersPrerollID=""
TranscoderCanOnlyRemuxVideo="0"
PushNotificationsEnabled="0"
LogVerbose="0"
MergedRecentlyAdded="0"
ButlerTaskCleanOldBundles="1"
ButlerTaskCleanOldCacheFiles="1"
ButlerTaskDeepMediaAnalysis="1"
ButlerTaskGenerateAutoTags="0"
ButlerTaskOptimizeDatabase="1"
ButlerTaskRefreshLocalMedia="1"
ButlerTaskRefreshPeriodicMetadata="1"
ButlerTaskReverseGeocode="0"
ButlerTaskUpgradeMediaAnalysis="1"
GenerateChapterThumbBehavior="never"
GenerateIntroMarkerBehavior="never"
LoudnessAnalysisBehavior="never"
MusicAnalysisBehavior="never"
WanTotalMaxUploadRate="20000"
autoEmptyTrash="1"
GlobalMusicVideoPathMigrated="1"
CertificateUUID="####################"
secureConnections="1"
DatabaseCacheSize="4000"
ButlerTaskBackupDatabase="1"
customCertificatePath=""
PreferredNetworkInterface="eno1"
CinemaTrailersFromBluRay="1"
ButlerDatabaseBackupPath="/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-in Support/Databases"
sendCrashReports="1"
HardwareDevicePath="####################"/>
[–] Sl00k@programming.dev 2 points 2 days ago

Appreciate you!!! Will attempt with this step 🫡🫡