Skip to content

Commit

Permalink
added script option (#3438)
Browse files Browse the repository at this point in the history
  • Loading branch information
catalinaadam authored Jan 10, 2025
1 parent be419d1 commit 8bb3568
Showing 1 changed file with 27 additions and 10 deletions.
37 changes: 27 additions & 10 deletions documentation/docs/pmm-upgrade/migrating_from_pmm_2.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Migrate PMM 2 to PMM 3

PMM 3 introduces significant architectural changes that require gradual transition from PMM 2:
PMM 3 introduces significant architectural changes that require gradual transition from PMM 2.
You can migrate to PMM 3 either automatically using the upgrade script (recommended), or manually by following step-by-step instructions.

To graduallly migrate to PMM 3:

## Step 1: Upgrade PMM 2 Server to the latest version

Expand All @@ -13,7 +16,21 @@ Before upgrading to PMM 3, ensure your PMM 2 Server is running the latest versio

## Step 2: Migrate PMM 2 Server to PMM 3

=== "PMM 2 with Docker volume"
=== "Automated upgrade (Recommended)"
Use this upgrade script for a simplified migration process:

1. Download and run the following script to start the upgrade. The `-b` flag ensures your data is backed up before the upgrade.

```sh
./get-pmm.sh -n <container-name> -b
```

2. Check additional script options:
```sh
./get-pmm.sh -h
```

=== "Manual upgrade from PMM 2 with Docker volume"

Follow these manual steps to upgrade your PMM 2 Server to PMM 3:
{ .power-number}
Expand All @@ -27,7 +44,7 @@ Before upgrading to PMM 3, ensure your PMM 2 Server is running the latest versio
2. Transfer `/srv` directory ownership:

```sh
docker exec -t <pmm-server> chown -R pmm:pmm /srv
docker exec -t <pmm-server> chown -R pmm:pmm /srv
```

3. List and note down your Docker volume:
Expand All @@ -50,13 +67,13 @@ Before upgrading to PMM 3, ensure your PMM 2 Server is running the latest versio
docker pull percona/pmm-server:3
```

6. Run new container with existing volume:
6. Run new new version of PMM Server with the existing volume:

```sh
docker run -d -v pmm-server-data:/srv -p 443:8443 --name pmm-server --restart always percona/pmm-server:3
```

=== "PMM 2 with data container"
=== "Manual upgrade from PMM 2 with data container"

Follow these manual steps to upgrade your PMM 2 Server to PMM 3:
{ .power-number}
Expand All @@ -73,7 +90,7 @@ Before upgrading to PMM 3, ensure your PMM 2 Server is running the latest versio
docker exec -t <pmm-server> chown -R pmm:pmm /srv
```

3. Identify data container using either:
3. Identify the data container using either:

```sh
docker ps -a --filter "status=created"
Expand All @@ -87,7 +104,7 @@ Before upgrading to PMM 3, ensure your PMM 2 Server is running the latest versio
{% endraw %}
```
4. Stop and remove existing container:
4. Stop and remove the existing container:

```sh
docker stop pmm-server && docker rm pmm-server
Expand All @@ -99,7 +116,7 @@ Before upgrading to PMM 3, ensure your PMM 2 Server is running the latest versio
docker pull percona/pmm-server:3
```

6. Run new container with existing data container:
6. Run the new version of PMM Server with the existing data container:

```sh
docker run -d --volumes-from pmm-server-data -p 443:8443 --name pmm-server --restart always percona/pmm-server:3
Expand All @@ -110,7 +127,7 @@ Before upgrading to PMM 3, ensure your PMM 2 Server is running the latest versio
!!! caution alert alert-warning "Important"
PMM 3 Server provides limited support for PMM 2 Clients (metrics and Query Analytics only). This support will be removed in PMM 3.3.

Depending on your initial installation method, update PMM Clients using your operating system's package manager or by updating from a tarball.
Depending on your initial installation method, update PMM Clients using your operating system's package manager or using a tarball.
For detailed instructions, see the [Upgrade PMM Client topic](../pmm-upgrade/upgrade_client.md).

### Post-migration steps
Expand All @@ -120,4 +137,4 @@ After you finish migrating:

1. Verify that all PMM Clients are up to date by checking **PMM Configuration > Updates**.
2. Confirm all previously monitored services are reporting correctly to the new PMM 3 Server by reviewing **Configuration > PMM Inventory > Services**.
3. Check the dashboards to make sure you're receiving the metrics information and QAN data.
3. Check the dashboards to make sure you're receiving the metrics and QAN data.

0 comments on commit 8bb3568

Please sign in to comment.