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?
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.
<an eternity later…> Yo yo OP! Here is my sample Preferences.xml, I have nulled out the fields you will need to fill up from the windows registry. After this I still had to reshare the libraries with my friends, unsure which step I botched, but that was easy to re-do.
<?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="####################"/>
Appreciate you!!! Will attempt with this step 🫡🫡