Skip to main content

Moving Plex Library

Moving Plex Library to a Different Drive

If you need to move your Plex library to a different drive to free up space, follow these steps. This guide will ensure a smooth transfer without losing your data.

1. Stop the Plex Service

To prevent changes to the database while moving the files, stop the Plex Media Server service:

sudo systemctl stop plexmediaserver

2. Create the New Library Location

Make sure your new drive is mounted, and create a directory for the Plex library:

sudo mkdir -p /new/mount/plex_library

Replace /new/mount/plex_library with the path to the new location on your drive.

3. Copy the Plex Library

Use rsync to copy the library files to the new location:

sudo rsync -av --progress /var/lib/plexmediaserver/Library /new/mount/plex_library/
  • -a: Archive mode to preserve permissions and attributes.
  • -v: Verbose mode to show file names being copied.
  • --progress: Shows progress during the copy.

4. Backup the Old Library (Optional)

Keep a backup of the original library just in case:

sudo mv /var/lib/plexmediaserver/Library /var/lib/plexmediaserver/Library_backup

Create a symbolic link from the original library path to the new one:

sudo ln -s /new/mount/plex_library/Library /var/lib/plexmediaserver/Library

This allows Plex to continue accessing the library as if it were in the original location.

6. Adjust Permissions

Make sure the new directory has the correct permissions for Plex to access it:

sudo chown -R plex:plex /new/mount/plex_library/Library

7. Start the Plex Service

Restart the Plex Media Server to verify the move:

sudo systemctl start plexmediaserver

8. Verify the Move

Open Plex in your browser and verify that your media library is intact. If everything works properly, you can delete the old backup to free up space:

sudo rm -rf /var/lib/plexmediaserver/Library_backup

Summary

  • Stop Plex.
  • Copy the library to the new drive.
  • Create a symlink to the new location.
  • Restart Plex and verify.

Using these steps ensures a safe move while keeping Plex operational without reconfiguration. If you encounter issues, feel free to ask for help!