From 8bb356865f86bf61a2d9aba0baa26af8290a5058 Mon Sep 17 00:00:00 2001 From: Catalina A <94133018+catalinaadam@users.noreply.github.com> Date: Fri, 10 Jan 2025 14:13:27 +0200 Subject: [PATCH] added script option (#3438) --- .../docs/pmm-upgrade/migrating_from_pmm_2.md | 37 ++++++++++++++----- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/documentation/docs/pmm-upgrade/migrating_from_pmm_2.md b/documentation/docs/pmm-upgrade/migrating_from_pmm_2.md index 3c6966ef05..035c1986e9 100644 --- a/documentation/docs/pmm-upgrade/migrating_from_pmm_2.md +++ b/documentation/docs/pmm-upgrade/migrating_from_pmm_2.md @@ -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 @@ -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 -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} @@ -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 chown -R pmm:pmm /srv + docker exec -t chown -R pmm:pmm /srv ``` 3. List and note down your Docker volume: @@ -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} @@ -73,7 +90,7 @@ Before upgrading to PMM 3, ensure your PMM 2 Server is running the latest versio docker exec -t 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" @@ -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 @@ -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 @@ -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 @@ -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.