Get Early Access

← Blog

Plex Backup Strategy: Protect Your Server Data

How to back up your Plex database, preferences, and metadata. Automated scripts, Docker backups, offsite sync, and recovery testing for media server operators.

Your Plex database contains years of watch history, custom collections, user preferences, metadata edits, and library configurations. If your server drive fails, a bad update corrupts the database, or you’re migrating to new hardware, a good backup strategy is the difference between a 10-minute restore and rebuilding everything from scratch.

What Actually Needs Backing Up

Not everything in your Plex data directory is equally important:

Backup Methods

1. Scheduled Database Backup (Recommended)

Plex has a built-in scheduled backup under Settings → Scheduled Tasks. It creates compressed backups of the database on a configurable schedule. The default keeps 3 backups in the Plug-in Support/Databases directory.

The problem: these backups are stored on the same drive as the database. If the drive fails, you lose both. Always copy them offsite.

2. Manual SQLite Backup

For a clean backup while Plex is running, use SQLite’s built-in backup command:

sqlite3 "com.plexapp.plugins.library.db" ".backup '/path/to/backup/plex-$(date +%Y%m%d).db'"

This creates a consistent snapshot without stopping the server. Never just copy the .db file while Plex is running — you’ll get a corrupted backup if a write is in progress.

3. Full Data Directory Snapshot

For complete disaster recovery, back up the entire Plex data directory:

Stop Plex first for a clean snapshot, or use filesystem-level snapshots (ZFS, Btrfs, LVM) for zero-downtime backups.

Automated Offsite Backup Script

A minimal cron-based approach that covers most setups:

#!/bin/bash
# Daily Plex backup to remote storage
PLEX_DB="/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-in Support/Databases"
BACKUP_DIR="/mnt/backup/plex"
DATE=$(date +%Y%m%d)

# SQLite safe backup
sqlite3 "$PLEX_DB/com.plexapp.plugins.library.db" ".backup '$BACKUP_DIR/plex-$DATE.db'"

# Copy preferences
cp "$PLEX_DB/../../Preferences.xml" "$BACKUP_DIR/Preferences-$DATE.xml"

# Sync to remote (rclone, rsync, or S3)
rclone sync "$BACKUP_DIR" remote:plex-backups --max-age 30d

# Keep 14 days locally
find "$BACKUP_DIR" -name "plex-*.db" -mtime +14 -delete

Docker-Specific Backup

If you run Plex in Docker, your config volume is the backup target. The cleanest approach:

docker stop plex
tar czf /backup/plex-config-$(date +%Y%m%d).tar.gz /path/to/plex/config
docker start plex

Downtime is typically under 60 seconds. For zero-downtime, use the SQLite backup method above instead of stopping the container.

Testing Your Backups

A backup you haven’t tested is not a backup. Verify regularly:

More from the Blog

Plex in Docker with GPU Passthrough

Complete setup guide for Docker with hardware transcoding.

Plex Server Security Best Practices

Network isolation, reverse proxy, and access control.

Tautulli Setup: Monitor Plex Like a Pro

Analytics, notifications, and user monitoring.

Ready to offload your transcodes?

Join the pre-beta waitlist and lock in 50% off for life.

Claim My Early-Adopter Spot →