Back Up Your Plex Server: What to Save and How
Published 2026-10-14 · PlexBeam
A Plex server represents hours of configuration — watch history, custom metadata edits, collection organization, poster customization, user accounts, and playback settings. Losing this data means rebuilding from scratch. The media files themselves are replaceable; the Plex configuration is not. This guide covers exactly what to back up, where the files live, and how to automate the process.
What to Back Up
Not everything in the Plex data directory is worth backing up. Some data regenerates automatically, while other data is irreplaceable:
Must Back Up (Irreplaceable)
| Item | Location (relative to Plex data dir) | Contains |
| Database | Plug-in Support/Databases/com.plexapp.plugins.library.db | All metadata, watch history, users, collections, playlists, ratings |
| Database WAL | Plug-in Support/Databases/com.plexapp.plugins.library.db-wal | Write-ahead log (uncommitted transactions) |
| Preferences | Preferences.xml | Server settings, authentication token, library paths |
| Registry/Metadata | Metadata/ | Custom posters, downloaded artwork, local metadata edits |
Optional (Regenerates but Saves Time)
| Item | Location | Notes |
| Media analysis | Media/ | BIF files for timeline thumbnails. Regenerates but takes hours. |
| Intro markers | Stored in the database | Audio fingerprint markers. Reanalysis takes hours for large libraries. |
| Plug-in data | Plug-in Support/ | Third-party plugin configuration. Back up if you use plugins. |
Skip (Large, Regenerates Easily)
- Cache: Temporary transcoder output and image cache. Regenerates on demand. Can be many GB.
- Transcode temp: Active transcode session data. Worthless after a restart.
- Crash reports: Diagnostic data. No operational value for backup.
Plex Data Directory Locations
| OS | Default Path |
| Windows | %LOCALAPPDATA%\Plex Media Server\ |
| macOS | ~/Library/Application Support/Plex Media Server/ |
| Linux | /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/ |
| Docker | Wherever you mapped the /config volume |
| Synology | /volume1/PlexMediaServer/AppData/Plex Media Server/ |
| QNAP | /share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Library/Plex Media Server/ |
Manual Backup Process
- Stop Plex Media Server. The database is a SQLite file — copying it while Plex is writing to it risks corruption. Stop the service first.
- Copy the critical files: Database files (
.dband.db-wal),Preferences.xml, and theMetadata/directory. - Compress: Archive the copied files into a dated zip or tar.gz. The database alone is typically 100 MB to 5 GB depending on library size.
- Store offsite: Copy the archive to a different physical location — a separate drive, NAS, or cloud storage. A backup on the same drive as the server protects against nothing.
- Restart Plex.
Total downtime: typically under 5 minutes for the copy operation on SSD storage.
Automated Backup Script
A cron job or scheduled task automates the process. The script should:
- Stop Plex (or use the SQLite backup API to create a hot copy).
- Copy the database and preferences to a backup directory.
- Compress with a timestamp in the filename.
- Delete backups older than N days (retention policy).
- Restart Plex.
For Linux systems, a minimal backup script:
systemctl stop plexmediaserver
tar -czf /backup/plex-$(date +%Y%m%d).tar.gz -C "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server" Plug-in\ Support/Databases Preferences.xml
systemctl start plexmediaserver
find /backup -name "plex-*.tar.gz" -mtime +30 -delete
Schedule with cron to run nightly during the maintenance window (e.g., 3:00 AM).
Hot Backup Without Stopping Plex
SQLite supports online backup via the .backup command. This creates a consistent snapshot without stopping the server:
sqlite3 "Plug-in Support/Databases/com.plexapp.plugins.library.db" ".backup /backup/plex-db-$(date +%Y%m%d).db"
This is the preferred method for servers that cannot afford downtime. The backup is crash-consistent — equivalent to what the database would look like after a clean recovery from a power failure.
Restoring From Backup
- Stop Plex on the target machine.
- Replace the database files: Copy the backed-up
.db(and.db-walif present) into the Plug-in Support/Databases directory, overwriting the existing files. - Replace Preferences.xml if restoring to the same machine. If migrating to a new machine, keep the new Preferences.xml and only restore the database — the preferences file contains machine-specific paths and tokens.
- Fix library paths: If media paths differ on the new machine, update them in Plex settings after starting the server.
- Start Plex. The server reads the restored database and rebuilds its internal state. A library scan detects any path changes.
Migration Between Machines
Moving Plex to a new server is a restore operation with extra steps:
- Same OS: Copy the entire Plex data directory to the new machine. Update file paths in Preferences.xml if media locations changed. Claim the server under your Plex account.
- Different OS: Copy only the database and Metadata directory. Install Plex fresh on the new OS, stop it, replace the database files, start, and reconfigure library paths.
- Docker migration: Copy the volume mapped to
/configin the container. Point the new container's volume to the copied data. All configuration, including the database, lives in that volume.
Backup Strategy Recommendations
- Minimum viable backup: Weekly automated database backup with 30-day retention. Covers watch history, collections, and all metadata. Restoration requires reinstalling Plex and re-downloading posters from online sources.
- Recommended backup: Nightly database backup plus weekly full backup including the Metadata directory. Covers everything including custom artwork. Retention: 7 daily + 4 weekly.
- Paranoid backup: Nightly hot backup (SQLite online backup), daily compressed archive of database + metadata + preferences, offsite copy to cloud storage, and a tested restore procedure documented and run quarterly.
The database is the single most important file. Everything else can be regenerated or re-downloaded given enough time. Protect the database above all else.