Most articles on backing up AIX partitions approach the subject tend to focus on database archiving and more sexier subjects like high availability or disaster recovery/business continuity solutions. It’s important to make a distinction between failover systems, disaster-recovery (DR) systems and archival systems. Having either a failover or DR server in no way precludes you from the responsibility of backing up your data. That’s because neither a failover or DR server allows you to selectively restore specific files, directories or an entire partition from a given point in time. In this article I’ll discuss different options, including a discussion on some third-party tools that may fit your needs. These tools must have a strong focus on IBM’s AIX OS, meaning that they aren’t just the by-product of a quick port or a developer that’s been instructed to come out with an AIX version of their software just so they can say they have a cross-platform solution.
As most systems administrators can attest, there is absolutely nothing wrong with using the utilities that come preloaded with your OS to perform standard backup and recovery. While it’s true that in most cases you do get what you pay for, these tools work very well, though they might not scale as well off-the-shelf products you must purchase. I should also point out that using standard OS tools usually means having to rely on several backup utilities in order to properly safeguard all your system data.
There are three ways in which to kick-off AIX utilities for backup: the System Management Interface Tool (known as SMIT or smitty), WebSM and the command line. I strongly suggest you use the command line for utilities such as tar, cpio and even mksysb, though I usually have no problems using SMIT for most of the other utilities.
Some of the archiving commands available to you include:
Let’s look at some of these tools.
If you don’t need to perform a backup of the rootvg but only backup a filesystem or directory, use this syntax:
# tar -cvf /dev/rmt0 /yourdata
This command creates a new archive at the beginning of the /dev/rmt0 tape device and each file is listed during backup.
Restore using the x flag:
# tar xvf /dev/rmt0 /yourdata
In the AIX OS, perhaps the single most important command is mksysb. A little known bit of trivia is that IBM was the first vendor who came up with a utility which provided for a full system restore—mksysb. Its purpose isn’t to back up user data, but to create an installable image of the root volume group (rootvg). To reiterate, user data should be kept out of the rootvg. The format of a mksysb includes:
It’s important to note that any user-defined paging spaces, unmounted filesystems and raw devices aren’t backed up in a mksysb, so they need to be recreated. Interestingly enough, the mksysb command uses the backup command to create its archive image:
# mksysb -i /dev/rmt0
This command also creates an /image.data file, which is generated by the mkszfile command. The mkszfile command overwrites the existing /image.data file with new information. The information includes system installation information, logical volume information for the root volume group and filesystem information.
The syntax in using mkszfile is:
# mkszfile -f
With mksysb you can do a complete restore or alternatively selectively restore files. To perform a manual restore of file from a mksysb archive:
# restore -xqvf /dev/rmt0 /myrestorationfile
In this example I’ll use savevg to backup an entire filesystem:
savevg -f /dev/rmt0 oravg
To restore the filesystem on to one of the physical disks:
restvg -f /dev/rmt0 hdisk6
I love Tivoli Storage Manager For System Backup and Recovery, though I admit I liked it more before it was swallowed up by TSM. Among other features it handles multiple volume groups and backups striped over multiple backup devices. It can even restore to a different platform—in this sense it’s more useful than mksysb and savevg. You can even run this tool using SMIT. It also allows you to choose between varying types of backups including full system (installation image), volume group, filesystem, file or directory, and raw logical volumes. It can also backup and restore non-rootvg data.
SBAdmin from Storix is a turnkey solution which lets you rebuild your entire AIX system from the ground up, including LVM. It can individually back up and restore files, directories, filesystems, raw partitions, volume groups, raw logical volumes or the entire system in case of a disaster. Backups can be archived to local or remote tape or disk on any AIX or Linux system. It also has full support for AIX 6.1. SBAdmin records your system and storage configuration with each system backup, allowing you to restore your data to different hardware.
I’ll reiterate that while there are some strong third-party tools available to you, don’t be afraid of the standard AIX toolset to archive your data. If the complexity of your environment requires you to have more options available to you in a more simplistic manner, look into third-party tools, which in many cases function as more of a turn-key backup solution that using standard AIX commands. Whatever you decide to use, make sure you perform daily backups of your critical data. While backing up your data can be tedious, there’s no larger responsibly you have than to back up your data.
source: http://ibmsystemsmag.com/aix/administrator/backuprecovery/backup-and-restore-with-aix/
Article Number: 3
Posted: Sat, May 19, 2018 11:46 PM
Last Updated: Mon, May 21, 2018 9:46 PM
Online URL: http://kb.ictbanking.net/article.php?id=3