1. Knowledge Base
  2. Backend Operations

How to Perform Backups and Restores through SSH

This article is for Amanda Enterprise (AE)

Info Description:

Amanda Enterprise Server can be configured to back up all backup sets, a specific backup set, or even backup entries for a specific host via SSH authentication for secure data transfer. This support is available only on Linux/Solaris/Mac OS X clients and is not available for Windows clients.

How to back up All Linux/Unix clients using SSH

  1. Please see How to enable SSH authentication in Amanda Enterprise for instructions to back up all UNIX and Linux clients via SSH.

How to back up specific Linux/UNIX clients or a specific backup set that backs up only Linux/UNIX clients via SSH

  1. Please see section "Configuring SSH keys on the Amanda server" of How to enable SSH authentication in Amanda Enterprise for instructions on setting up SSH public key authentication for the amandabackup user between the Amanda server and
  2. To back up all backup objects for a specific UNIX or Linux host, edit the /etc/amanda/<your-backup-set>/disklist.conf file for the backup set in which the objects are configured and for which you wish to use SSH.  Add "zmc_ssh_auth" to the section that configures a backup for every object of that host.  This is an example of adding this line to the section for one object:myclientmachine.company.com "/home" "/home" { zmc_unix_base zmc_ssh_auth encrypt none compress none estimate calcsize server .... }Please note that this must be done for all objects backed up on that host otherwise it will cause errors with during host check and backup.
  3. If all hosts in a backup set are UNIX and/or Linux clients and you wish to back up all of them via SSH, edit the /etc/amanda/<your-backup-set>/zmc_backupset_dumptypes file for the backup set for which you wish to use SSH.  Add "zmc_ssh_auth" to the zmc_backupset_dumptype dumptype section in this file as such:define dumptype zmc_backupset_dumptype { zmc_device_attached_storage zmc_ssh_auth_ record on # maxpromoteday 1 days }

How to restore a backup image using SSH (only applicable for AE 3.1 and earlier):

Note: This only applies to restoring backups via ZMC in AE 3.1 and earlier.  All backups restored via ZMC in AE 3.3 and later do not fall back to using SSH even if the restore service is not running on the restore host and thus are never performed as an encrypted transfer. In AE 3.1 and earlier, the password of the root user on the target restore host will be required on the ZMC Restore| Restore page when the restore is run as directed below.  Root privileges arerequired to set the original permissions and ownership of the restored file(s).

  1. On the backup Linux client, edit the /etc/xinetd.d/zmrecover file and replace "disable = no" with "disable = yes"; Otherwise, recovery will be performed in a non-secure manner via ZMC without using SSH.
  2. On the backup client, reload the xinetd service as the root user/etc/init.d/xinetd reload
  3. Follow the normal procedure to restore file(s) through the Zmanda Management Console (see documentation for the Restore|  What page).
  4. Keep the root user as the "Destination User Name" on ZMC's Restore| Where page.
  5. After clicking the Restore button on the Restore| Restore page, the root password of the target restore host will be requested. Enter the root password.  Upon successful authentication via SSH, the restore process will be started.