Upgrading Percona Backup for MongoDB

Similar to installing, the recommended and most convenient way to upgrade Percona Backup for MongoDB is from the Percona repository.

You can upgrade Percona Backup for MongoDB to the latest version or to a specific version. Since all packages of Percona Backup for MongoDB are stored in the same repository, the following steps apply to both upgrade scenarios:

  1. Enable Percona repository.
  2. Stop pbm-agent.
  3. Install new version packages (the old ones are automatically removed).
  4. Start pbm-agent.

Important notes

  1. Backward compatibility between data backup and restore is supported for upgrades within one major version only (e.g. from 1.1.x to 1.2.y). When you upgrade Percona Backup for MongoDB over several major versions (e.g. from 1.0.x to 1.2.y), we recommend to make a backup right after the upgrade.
  2. Upgrade Percona Backup for MongoDB on all nodes where it is installed.

Enable Percona repository

Install the percona-release utility or update it to the latest version as described in Percona Software Repositories Documentation.

Enable the repository running the command as root or via sudo

$ sudo percona-release enable tools

Note

For apt-based systems, run apt-get update to update the local cache.

Upgrade Percona Backup for MongoDB using apt

Important

Run all commands as root or via sudo.

Upgrade to the latest version

  1. Stop pbm-agent

    $ sudo systemctl stop pbm-agent
    
  2. Install new packages

    apt-get install percona-backup-mongodb
    
  3. Start pbm-agent

    $ sudo systemctl start pbm-agent
    

Upgrade to a specific version

  1. List available options:

    $ sudo apt-cache madison percona-backup-mongodb
    

    Sample output

    percona-backup-mongodb | 1.2.0-1.stretch | http://repo.percona.com/tools/apt stretch/main amd64 Packages
    percona-backup-mongodb | 1.1.3-1.stretch | http://repo.percona.com/tools/apt stretch/main amd64 Packages
    percona-backup-mongodb | 1.1.1-1.stretch | http://repo.percona.com/tools/apt stretch/main amd64 Packages
    percona-backup-mongodb | 1.0.0-1.stretch | http://repo.percona.com/tools/apt stretch/main amd64 Packages
    percona-backup-mongodb | 1.0-1.stretch | http://repo.percona.com/tools/apt stretch/main amd64 Packages
    
  2. Stop pbm-agent:

    $ sudo systemctl stop pbm-agent
    
  3. Install a specific version packages. For example, to upgrade to Percona Backup for MongoDB 1.1.3, run the following command:

    $ sudo apt-get install percona-backup-mongodb=1.1.3-1.stretch
    
  4. Start pbm-agent:

    $ sudo systemctl start pbm-agent
    

Upgrade Percona Backup for MongoDB using yum

Important

Run all commands as root or via sudo.

Upgrade to the latest version

  1. Stop pbm-agent

    $ sudo systemctl stop pbm-agent
    
  2. Install new packages

    $ sudo yum install percona-backup-mongodb
    
  3. Start pbm-agent

    $ sudo systemctl start pbm-agent
    

Upgrade to a specific version

  1. List available versions

    $ sudo yum list percona-backup-mongodb --showduplicates
    

    Sample output

    Available Packages
    percona-backup-mongodb.x86_64    1.0-1.el7            tools-release-x86_64
    percona-backup-mongodb.x86_64    1.0.0-1.el7          tools-release-x86_64
    percona-backup-mongodb.x86_64    1.1.1-1.el7          tools-release-x86_64
    percona-backup-mongodb.x86_64    1.1.3-1.el7          tools-release-x86_64
    percona-backup-mongodb.x86_64    1.2.0-1.el7          tools-release-x86_64
    
  2. Stop pbm-agent:

    $ sudo systemctl stop pbm-agent
    
  3. Install a specific version packages. For example, to upgrade Percona Backup for MongoDB to version 1.1.3, use the following command:

    $ sudo yum install percona-backup-mongodb-1.1.3-1.el7
    
  4. Start pbm-agent:

    $ sudo systemctl start pbm-agent