Under Construction

hmc bkconsdata

The command “hmc bkconsdata” can be used to back up critical data from an HMC. The backup can be used to restore an HMC after an installation using a recovery CD.

hmc bkconsdata [-f] [-k <private_key_file>] [-o <mount_options>] [-p <password>] <hmc> [<location>|<filename>|none|usb]
   -f : force overwriting existing data
   -k : path to SSH private key file for SFTP
   -o : mount options for NFS
   -d : remote directory for FTP, SFTP and NFS
   -h : hostname or IP address of FTP, SFTP or NFS server
   -p : password for FTP or SFTP
   -t : the type of location
      ftp - FTP server
      sftp - SFTP server
      nfs - NFS filesystem
      usb - USB storage device
      none - remove backup task lock
   -u : user to use for FTP or SFTP

The location where the backup should be saved can be specified in one of the following forms:

   ftp://user[:password]@host[/directory][/filename] - FTP server
   sftp://user[:password]@host[/directory][/filename] - SFTP server
   nfs://host/directory[/filename] - NFS filesystem
   usb - USB storage device
   none - remove backup task lock (does not perform a backup)

If a file name is specified for the backup, it must begin with “HMCBackup_”!

If FTP or SFTP is used and no password or passphrase is specified on the command line, the password or passphrase is requested interactively.

For example, to create a backup of the HMC hmc01 and save it via SFTP as user fwtrans on the system with the IP address 172.16.199.107, the following command can be used:

$ hmc bkconsdata hmc01 sftp://fwtrans@172.16.199.107//export/hmc/hmc01/HMCBackup_20231103
INFO: using sftp://fwtrans@172.16.199.107//export/hmc/hmc01/HMCBackup_20231103
Enter the current password for user fwtrans: XXXXXXXX
Offloading archive file....

Shared connection to hmc01 closed.
$

The backup is saved under the name HMCBackup_20231103.tgz in the directory /export/hmc/hmc01. Since no password was specified on the command line, an interactive query is made.

If no target is specified, the value of the ConsoleDataArchive parameter from /opt/pwrcmps/etc/lpar.cfg or ~/.lpar.cfg is used as the location. Parts of this default location can be changed using the options “-d“, “-h“, “-p“, “-t” and “-u“. If the ConsoleDataArchive parameter is set to the value sftp://fwtrans@172.16.199.107//export/hmc/%h (%h is replaced by the name of the HMC), the above backup can be started by just specifying the file name:

$ hmc bkconsdata hmc01 HMCBackup_20231103
INFO: using sftp://fwtrans@172.16.199.107//export/hmc/hmc01/HMCBackup_20231103
Enter the current password for user fwtrans: XXXXXXXX
Offloading archive file....

Shared connection to hmc01 closed.
$

To prevent more than one backup from being created at the same time, a “Backup Task Lock” is created. If a second backup is started in parallel, an error message is displayed:

HSCLA50F A backup task is already in progress. Please wait and try again later.

In case such a “Backup Task Lock” has not been deleted after completing a backup, it can be deleted manually by specifying the target “none”:

$ hmc bkconsdata hmc01 none
INFO: using none

Shared connection to hmc01 closed.
$