Restore PMM Server Docker container¶
You can restore PMM Server either from a manual backup or from an automated backup volume that was created during migration to PMM v3.
Before you begin¶
Before proceeding with restoration, ensure you have one of the following:
- a manual backup you previously created
- an automated backup volume created during migration from PMM V3
Restore methods¶
To restore the container from a manual backup:
-
Stop the current PMM Server container:
docker stop pmm-server
-
Remove the container (preserving volumes):
docker rm pmm-server
-
Revert to the saved image:
docker rename pmm-server-backup pmm-server
-
Navigate to the backup directory (e.g.
pmm-data-backup
):cd pmm-data-backup
-
Copy the backed-up data to the PMM data volume:
docker run --rm -v $(pwd)/srv:/backup -v pmm-data:/srv -t percona/pmm-server:3 cp -r /backup/* /srv
-
Fix ownership of the restored files to ensure the PMM Server can access and manage the files correctly:
docker run --rm -v pmm-data:/srv -t percona/pmm-server:3 chown -R pmm:pmm /srv
-
Start the restored PMM Server container:
docker start pmm-server
To restore from an automated backup volume created during migration to PMM v3:
- Stop the current PMM v3 container:
docker stop pmm-server
- Remove the container (optional):
docker rm pmm-server
-
Start a PMM v2 container using your backup volume, replacing
<backup-volume-name>
with your PMM v2 backup volume name (e.g.,pmm-data-2025-01-16-165135
):docker run -d \ -p 443:443 \ --volume <backup-volume-name>:/srv \ --name pmm-server \ --restart always \ percona/pmm-server:2.44.0
-
Verify that your PMM v2 instance is running correctly and all your data is accessible.
Finding your backup volume name¶
If you’re restoring from an automated migration backup and don’t know the volume name:
- Your backup volume name was displayed during the automated upgrade process.
-
To list all available Docker volumes, use the following command and look for volumes with names like
pmm-data-YYYY-MM-DD-HHMMSS
:docker volume ls
Next steps¶
- Create a backup of your PMM Server
- Upgrade your PMM Server to a newer version
- Migrate from PMM v2 to v3 if restoring to upgrade