> For the complete documentation index, see [llms.txt](https://docs.percona.com/percona-monitoring-and-management/3/llms.txt).

# Upgrade PMM Server on AWS

Keep your PMM Server up to date with the latest features, security patches, and performance improvements.

## Prerequisites

Before upgrading your PMM Server, ensure you have:

- a current backup of your PMM data volume
- scheduled maintenance window for potential downtime

## Upgrade process

To upgrade PMM Server on AWS:

1. Create a backup snapshot of your PMM data volume:

   ```sh
   aws ec2 create-snapshot --volume-id vol-xxxxxxxxx --description "Pre-upgrade backup $(date)"
   ```

1. Connect to your PMM Server instance via SSH using the `admin` user.

1. If your current version is PMM 3.9.1 or earlier and you use the built-in database, this upgrade also migrates your PMM Server data from PostgreSQL 14 to PostgreSQL 18, so the first start takes longer than usual. [Prepare for the PostgreSQL migration](https://docs.percona.com/percona-monitoring-and-management/3/pmm-upgrade/prepare_postgresql_14_removal.md#check-whether-this-affects-you).

1. Update the PMM Server image in the environment file. Replace `X.Y.Z` with your target version:

   ```sh
   sed -i "s|PMM_IMAGE=.*|PMM_IMAGE=docker.io/percona/pmm-server:X.Y.Z|g" ~/.config/systemd/user/pmm-server.env
   ```

1. Pull the new image, then restart PMM Server. The `&&` operators stop the commands if the pull fails, so PMM Server keeps running the current version:

   ```sh
   source ~/.config/systemd/user/pmm-server.env && \
   podman pull "${PMM_IMAGE}" && \
   systemctl --user restart pmm-server
   ```

## Post-upgrade tasks

After upgrading PMM Server:

1. Go to **All dashboards > PMM Health > PMM Health** and check that all services are running.
1. Go to **Inventory > Services** and verify that all monitored nodes and services are listed, their status is **Up**.
1. Test monitoring functionality to ensure data collection continues normally.

## Rollback procedure

If issues occur after upgrade:

1. Stop the new PMM container:

   ```bash
   systemctl --user stop pmm-server
   ```

1. Restore using your pre-upgrade snapshot. Create a volume from the snapshot, attach it to the instance, and start the previous PMM version.

## Troubleshooting upgrades

If the container won’t start after the upgrade:

```bash
# Check container logs
podman logs pmm-server

# Check systemd service logs
journalctl -u pmm-server.service

# Verify volume mounts
podman inspect pmm-server
```
