Backing up

Use the powervc-opsmgr backup command to back up your essential PowerVC data. You can then restore to a working state in the event of data corruption or a disaster.

About this task

The powervc-opsmgr backup command is the subcommand of powervc-opsmgr. For syntax and options, run powervc-opsmgr backup --help.

The following data is backed up:
  • PowerVC databases, such as the nova database where information about your registered hosts is stored
  • PowerVC configuration data, such as /etc/nova
  • SSH private keys that are provided by the administrator
  • Glance image repositories
Notes:
  • Before performing any operation, make sure that the VM hostname is the same as the hostname that you used to create the inventory.
  • If you are performing backup and restore of PowerVC version 2.1.1 and later, any scheduled tasks which are not yet processed in the backup environment might get impacted. Also, the root user ID changes after backup and restore operation. Perform these steps to makes sure that the scheduled tasks resume after successful restore of PowerVC.
    • Login to ibm-default or one of the projects.
    • Navigate to Dashbard > Tasks > Scheduled tasks, and then click Update trusts.
  • After a successful restore, if another restore is triggered on the same system make sure /var/opt/ibm/powervc/backups/<powervc_release>/ is removed or moved to a different location to avoid conflicts.
  • If you are performing backup and restore from PowerVC 2.1.1 or later, copy the LDAP cert file from backup PVC to restore PVC in the /etc/pki/tls/certs directory if PVC is configured with LDAP in secure mode.

Complete the following steps to back up PowerVC data.

Procedure

  1. Ensure that the user has sufficient sudo privileges configured to perform execution of this command and read access to the files.
    Open a command-line interface to the operating system on the virtual machine on which IBM® PowerVC is installed.
  2. Run the powervc-opsmgr backup command with any needed options.
    If prompts are not suppressed, respond to them as needed.
    [root@vm-2097 ~]# powervc-opsmgr backup --help
    usage: powervc-opsmgr backup [-h] -c CLUSTER [-p BACKUP_PATH]
    optional arguments:
      -h, --help            show this help message and exit
      -c CLUSTER, --cluster CLUSTER
                            Specify cluster to backup
      -p BACKUP_PATH, --backup-path BACKUP_PATH
                            Use this option to provide path of backup. Default
                            path:/var/opt/ibm/powervc/backups/   
    

Results

When the backup operation completes, new file powervc_backup-2.2.1.tar.gz is placed in a new time stamp subdirectory of the target directory. For example, a potential file path is /var/opt/ibm/powervc/backups/powervc_backup_<time stamp>/powervc_backup-2.2.1.tar.gz. You can then leave the archive there or move or copy it to another directory as needed.
Notes:
  • If an error occurs while running powervc-opsmgr backup, check for errors in the powervc-opsmgr backup logs in /opt/ibm/powervc/log.
  • If you are using -p BACKUP_PATH, a separate timestamp is not created to store the backup as it happens without -p option . Old backup tar is overwritten if you retry backup using the same path with -p option in powervc-opsmgr backup command.
  • Make sure to manually copy the archive to the /var/opt/ibm/powervc/backups directory for other nodes after you run the powervc-opsmgr backup command in PowerVC 2.2.1.

What to do next

When using a single node of PowerVC, consider regularly, for example on a daily basis, backing up your PowerVC data as part of a broader system backup and recovery strategy. If you want to regularly back up, use your operating system's scheduling tool to set the powervc-opsmgr backup command to run on a schedule. Target off-peak intervals when few or no other operations are running in PowerVC.