Automatically backup VIOS configuration changesThe latest release of the VIOS provides a way to automatically backup your virtual device configuration whenever it changes. From the IBM Knowledge Center for POWER8:
http
"The viosbr command
automatically creates a backup, whenever there are any configuration
changes. This functionality is known as the autoviosbr backup. It is
triggered every hour, and checks if there are any configuration changes,
or any other changes. If it detects any changes, a backup is created.
Otherwise, no action is taken. The backup files resulting from the
autoviosbr backup are located under the default path /hom
The -autobackup flag is provided for the autoviosbr backup functionality. By default, autoviosbr backup is enabled on the system. To disable the autoviosbr backup, use the stop parameter and to enable it you can use the start parameter. When the autoviosbr backupis disabled, no autoviosbr related tar.gz file is generated.
To check if the autoviosbr backup file, present in the default path is up to date, you can use the status parameter. To access the cluster-level backup file on any node of the cluster, use the save parameter. This action is necessary as the cluster-level backup file is present in the default path of the database node only.
If the node is a part of cluster, you can use the -type flag to specify the parameter. The parameter can be either cluster or node, depending on if it is a cluster-level or a node-level backup. Flags""
On your VIOS, under oem_setup_env (as root), you'll find the following new entry in root's crontab:
# crontab -l | grep autoviosbr 0 * * * * /usr
This entry will check for any configuration changes and generate a new backup if necessary. Here's an example from my VIOS, running 2.2.5.10.
$ ioslevel 2.2.5.10
I create a new virtual optical device, which should trigger a new backup the next time the autoviosbr script runs (once per hour). Prior to creating the device, viosbr shows the autobackup status as Complete (no changes). I ensure that autobackup is configured by stopping and starting it with the viosbr command.
$ viosbr -autobackup stop -type node Autobackup stopped successfully.
$ viosbr -autobackup start -type node Autobackup started successfully.
$ viosbr -autobackup status -type node Node configuration changes:Complete.
$ mkvdev -fbo -vadapter vhost34 vtopt13 Available
Immediately after the vtopt device is created, the autobackup status displays as Pending (something has changed but has not yet been backed up).
$ viosbr -autobackup status -type node Node configuration changes:Pending.
The autoviosbr file is created in /hom
$ r oem oem_setup_env
# cd /hom # ls -tlr total 72 -rw-r--r-- 1 root staff 12189 May 10 14:00 auto
On the hour, the autoviosbr script runs, notices that the configuration has changed and generates a new viosbr backup file. The viosbr autobackup status changes to Complete.
$ viosbr -autobackup status -type node Node configuration changes:Complete.
# ls -ltr total 88 -rw-r--r-- 1 root staff 12218 May 10 15:00 auto
What's inside the tar file?
# cp /hom # cd /tmp/cg # gzip -d auto # tar -xvf auto x Arte x auto # ls -ltr total 888 -rw-r--r-- 1 root staff 198554 May 10 15:00 autoviosbr_s824vio2 -rw-r--r-- 1 root staff 20549 May 10 15:00 Arte -rw-r--r-- 1 root staff 225280 May 10 15:00 auto
The ArtexRules file contains device specific configuration attributes.
# head Arte <?xml version="1.0" encoding="UTF-8"?> <Profile origin="get" version="3.0.0" date <Catalog id=" <Parameter name <Target class="device" inst </Parameter> </Catalog> <Catalog id=" <Parameter name <Target class="device" inst #
The autoviosbr file contains virtual device configuration information. In this file I can confirm that the configuration of my new virtual optical device (vtopt13) has been backed up.
# grep vtopt13 autoviosbr_s824vio2 <nam # vi autoviosbr_s824vio2 ... <virtDevOPT> <nam <sta <loc <uni <typ <fbOpt> </fbOpt> <CuA <CuAt name <CuAt name="udid" valu </virtDevOPT> ...
If you want to force a backup to run, before the next hour, manually run the following as root (oem_setup_env):
$ oem_setup_env # /usr
|