Skip to content

Restore container

Summary
  • Stop and remove the container.
  • Restore (rename) the backup container.
  • Restore saved data to the data volume.
  • Restore permissions to the directories.
  • Start the container.

Important

You must have a backup to restore from.

To restore the container:

  1. Stop the container.

    docker stop pmm-server
    
  2. Remove it.

    docker rm pmm-server
    
  3. Revert to the saved image.

    docker rename pmm-server-backup pmm-server
    
  4. Change directory to the backup directory (e.g. pmm-data-backup).

    cd pmm-data-backup
    
  5. Copy the data.

    docker run --rm -v $(pwd)/srv:/backup -v pmm-data:/srv -t perconalab/pmm-server:3.0.0-beta cp -r /backup/* /srv
    
  6. Restore permissions.

    docker run --rm -v pmm-data:/srv -t perconalab/pmm-server:3.0.0-beta chown -R pmm:pmm /srv
    
  7. Start the image.

    docker start pmm-server
    

Get expert help

If you need assistance, visit the community forum for comprehensive and free database knowledge, or contact our Percona Database Experts for professional support and services.