1. Knowledge Base
  2. Zmanda Enterprise

How to Migrate Amanda Enterprise From One Server to Another

This article outlines the process for migrating Zmanda from one server to another. It is applicable for versions 3.3, 3.5 and 3.6.

Pre-Migration Checks:

Before you begin the migration process, it is important to perform these checks to ensure a smooth transfer.

  • Ensure that all the steps involved in the migration are performed as the ‘root’ user.

  • Install the same version of Amanda Enterprise (AE) on the new server.

  • Make sure that any patches present on the old AE server are installed on the new AE server.

  • Temporarily deactivate all backup schedules before initiating the migration process.

  • Confirm that no ongoing backup or restore operations are in progress during the migration.

  • The migration involves collecting and transferring configurations and data from your existing setup to the new server. You have the flexibility to migrate either configurations only or both data and configurations.

Migration from Old AE Server:

For a successful migration, the following configuration files and directories need to be migrated to the new server.

  • /etc/amanda

  • /etc/zmanda/zmc/zmc_ags/device_profiles

  • /etc/zmanda/zmc/zmc_aee/zmc_user_dumptypes

  • /etc/zmanda/zmanda_license

  • /var/lib/amanda/.am_passphrase

  • Dump of the ZMC database.

Migrating Backup Data:

If the backups are stored on the Zmanda server and you wish to migrate the backup data, you can include the storage paths in the 'tar' command mentioned below in Step 3. The storage locations can be found on the Admin > Devices page in ZMC.

If the backup data is migrated separately, make sure that the same storage paths are created on the new AE server with the same permissions. The storage directories should be owned by amandabackup user and disk group.

If you are using any attached storage devices like NAS or SAN, you need to reattach the storage device to the new server on the same path where it was mounted on the old AE server. The permissions on the mount points should also remain the same.

Steps for Migration:

  1. Create a new directory to temporarily store the data to be migrated. Make sure this directory has enough free space to store the data collected during the migration. Run the following commands from this directory.

  2. Generate a mysqldump of the ZMC database using the packaged mysql utilities. Make sure the output file has an extension of '.sql'.
    /opt/zmanda/amanda/mysql/bin/mysqldump -uroot "-p$(awk -F\" '/^zmc_mysql_root_password/ {print $(NF-1)}' /etc/zmanda/zmc/zmc_aee/zmc_aee.cnf)" zmc > dbbackup.sql
  3. Create a tar archive of all the configuration files.

    tar czpf old_config.tar.gz /etc/amanda /etc/zmanda/zmc/zmc_ags/device_profiles /etc/zmanda/zmc/zmc_aee/zmc_user_dumptypes /etc/zmanda/zmanda_license /var/lib/amanda/.am_passphrase
  4. Copy the files to the new AE server.

    scp old_config.tar.gz dbbackup.sql root@new-AE:

Configuring the New AE Server:

  1. Go to the directory where the migrated files are stored and extract the config archive.
    tar xzvf old_config.tar.gz -C /
  2. Import the mysqldump.

    /opt/zmanda/amanda/mysql/bin/mysql -uroot "-p$(awk -F\" '/^zmc_mysql_root_password/ {print $(NF-1)}' /etc/zmanda/zmc/zmc_aee/zmc_aee.cnf)" zmc < dbbackup.sql
  3. Login to Zmanda Management Console and verify that all the data is migrated correctly.

  4. Reactivate your backup schedules.

Post-Migration Checks:

After completing the migration process, it's necessary to perform the following post-migration checks to ensure a successful transition.

  • Make sure all your Backupsets, Storages and Licenses are migrated successfully.

  • After logging into ZMC, check the permissions of the storage directories if you notice any permission-related issues on the welcome screen.

  • Perform a Hostcheck on all the DLEs before running any backups.

  • Perform a test restore to ensure the ability to recover data from the migrated backups.

  • You can decommission the old AE server after monitoring the backups for a couple of weeks.

The migration process is now complete, providing smooth operations on the new server.