Backing Up Your Amanda Enterprise Server

This article is for Amanda Enterprise (AE) v. 3.1 and 3.3

If your Amanda Enterprise installation becomes damaged, you must reinstall and reconfigure the software. Having a backup helps to quickly bring your server back to a working state.

You should store your server backup separate from the Amanda server so that it is readily accessible if the server goes down.

Backing up the Amanda server

The zm-support script will archive a copy of most files necessary to restore an Amanda Enterprise server if invoked as follows:

/opt/zmanda/amanda/bin/zm-support --all-log-files

This creates an archive named zm-logs-*.tar.gz in your current working directory.

Index files

If you have very large index files, you may consider omitting –all-log-files and storing them separately. Because the index files are already gzip compressed, do not compress them a second time:

tar cvf zm-index-$(date "+%Y%m%d%H%M%S").tar -C / etc/amanda/*/index

Server-side encryption

If you use server-side encryption, you will also want to archive the /var/lib/amanda directory particularly the .am_passphrase file. You can create an archive this way:

tar cvzf --one-file-system amandabackup-$(date "+%Y%m%d%H%M%S").tar.gz -C / /var/lib/amanda

Restoring from the backup

Follow this procedure for restoring from your Amanda server backup.

  1. If applicable, reinstall Amanda Enterprise.
  2. Restore the files from backup, but do not overwrite zmc_aee.cnf from the new install:cd / ### for AE 3.3.x tar xvzf /path/to/zm-logs-*-<timestamp>.tar.gz –exclude=”etc/zmanda/zmc/zmc_aee/zmc_aee.cnf” ### for AE 3.1.x tar xvzf /path/to/zm-logs-*-<timestamp>.tar.gz –exclude=”etc/zmanda/zmc_aee.cnf”
  3. Also restore the index files if you archived them separately.cd / tar xvzf /path/to/zm-index-<timestamp>.tar
  4. Ensure that the ZMC service is running and import the archived database dump.cd / ### for AE 3.3.x /opt/zmanda/amanda/mysql/bin/mysql –socket=/opt/zmanda/amanda/mysql/tmp/mysql.sock -uzmc -p$(awk -F\” ‘/^zmc_mysql_zmc_password/ { print $(NF-1)}’ /etc/zmanda/zmc/zmc_aee/zmc_aee.cnf) zmc < mysqldump-<timestamp> ### for AE 3.1.x /opt/zmanda/amanda/mysql/bin/mysql –socket=/opt/zmanda/amanda/mysql/tmp/mysql.sock -uzmc -p8d2112fd65db3a93df641fd7e3fa31754cbc6378 zmc < mysqldump-<timestamp>
  5. If applicable, restore some or all of /var/lib/amanda.cd / tar xvzf /path/to/amandabackup-<timestamp>.tar.gz

Powered by BetterDocs

Leave a Reply