Use the icic-backup command to back up your essential IBM® Cloud Infrastructure Center data. You can then restore your system to a working state if you encounter data corruption or data loss.
The icic-backup command is optimized in the IBM Cloud Infrastructure Center 1.2.1 stand-alone deployment environment. It dumps mysql data instead of copying database files.
If you want to run the backup process as a non-root user, configure the sshd setting for the non-root user before you start the back up process. For more information, see Preparing the management and compute node.
The icic-backup command is in the /opt/ibm/icic/bin/ directory. For syntax and options, run
The following data is backed up:
The IBM Cloud Infrastructure Center databases, such as the nova database where information about your registered hosts is stored
The IBM Cloud Infrastructure Center configuration data, such as /etc/nova
SSH private keys that are provided by the administrator
Glance image repositories
SSH key pairs generated for software-defined storage
The following data is NOT backed up:
The virtual server instances created by the IBM® Cloud Infrastructure Center
The OpenStack policy.json files
The version.properties file in folder /opt/ibm/icic/
The certificate files or directory of LDAP server
Complete the following steps to back up the IBM Cloud Infrastructure Center data:
Open a command-line interface to the operating system on the virtual machine on which the IBM Cloud Infrastructure Center is installed.
Navigate to the /opt/ibm/icic/bin/ directory.
Run the icic-backup command with any needed options. If prompts are not suppressed, respond to them as needed. The following example runs the command with no prompts and backs up data to a nondefault mounted file system's target directory:
icic-backup --noprompt --targetdir=/tmp/backups
Make sure that it has enough disk space in target directory
/tmp/backupsbefore you run the backup command.
The previous example only back ups the data on the IBM Cloud Infrastructure Center management node. The following example runs the command that uses the all option to back up the data on the management node and all compute nodes. The backup file of the management node and all backup files from compute nodes are zipped into one .tar.gz backup file in the target directory.
icic-backup --all --targetdir=/tmp/backups
When the backup operation completes, the new archive file
icic_backup_<timestamp>.tar.gzis stored in the dynamically created
<timestamp>subdirectory of the target directory, for example, a potential file path is
icic_backup_20200208210343451220.tar.gz.shaarchive file is stored in the same directory. This file is used to process SHA256 checksum verification for this backup file. You can leave the archive files in the directory or you can move or copy them to another directory as needed. The following example runs the command that uses the noimagedata option to back up the data excluding the image data in folder
icic-backup --all --targetdir=/tmp/backups --noimagedata
This backup with noimagedata option is called a lightweight backup because the size of the backup file is only a few megabytes and the backup takes little time.
The following example runs the command that uses the hosts option to back up the data on all compute nodes.
icic-backup --hosts all --targetdir=/tmp/backups
The following example runs the command that uses the hosts option to back up the data on some specific compute nodes. Name list of available hosts can be fetched by running command
icic-services remote liston the management node.
icic-backup --hosts hostname1,hostname2,...,hostnameN --targetdir=/tmp/backups
When you apply hosts argument, the new archive files
hostnameN_icic_backup_20230604234816709931.tar.gzare directly stored in the target directory.
The following table shows the CLI of backup service in the IBM Cloud Infrastructure Center standalone deployment environment:
|Only backup the management node and the backup file is stored in the default folder /var/opt/ibm/icic/backups
|icic-backup --targetdir backup_folder
|Backup to a specific target directory, that can be a mounted file path
|Backup the management node and all compute nodes and the backup files are zipped into one .tar.gz file
|icic-backup --hosts host1,host2,hostn
|Only backup the specified compute nodes
|icic-backup --hosts all
|Backup all compute nodes
|A lightweight backup without image data, that is usually used in Running periodic active backups case
|Backup without prompt message, that is usually called from bash or ansible script
Note: If an error occurs while you run icic-backup, check for errors in the icic-backup logs in
/opt/ibm/icic/log. The log file name contains the same timestamp as the one in the backup file. For example, the log file name is
Note: Forced termination of a backup action is not suggested. In the console where the
icic-backup command is run, the program prompts what the backup's next action is. Now, The user can cancel the backup action. If the user agrees to continue, it is not suggested exiting forcibly. It might cause resource leak.
Note: This step is only necessary if you turn on the monitoring services (ceilometer, gnocchi) to collect the metrics. In order to retain the meter data before backing, you need to manually pack the
/var/lib/gnocchi directory to one local store directory. When you need to check historical meter data before backing, you can restore it from the local store directory manually.
Consider backing up your IBM Cloud Infrastructure Center data regularly, for example, daily, as part of a broader system backup and recovery strategy. If you want to regularly back up your data, use your operating system's scheduling tool to set the icic-backup --all command with no prompt option to run on a schedule. Target off-peak intervals when few or no other operations are running in the IBM Cloud Infrastructure Center.
Refer to Running periodic active backups for more details.