How do I run a manual data backup in AIX?

Sometimes it is useful to run a manual backup outside of the normal schedule:

The validity of the data backup is determined by the state at which the database was backed up. If your system uses a snapshot-based backup script, the backup can be run at any point in the day — regardless of system activity. If you are not using a snapshot-based backup, you must ensure there are no user or phantom processes running on the system.
To run the backup process in foreground:
  • Log in as root
  • At the root prompt (#), run:
/bin/save
  • When the backup has completed, you will return to the root prompt (#)

 

To run the backup process in background:

  • Log in as root
  • At the root prompt (#), run:
at now
/bin/save

  • Hold Control and d (Ctr-d) to submit the background job
  • Review the /tmp/backup* files to check the backup status

 

How do I troubleshoot tape drive errors on my AIX server?

Most tape drive errors are caused by defective media or dirty read/write heads. Here are a few simple steps that IBM provides to rule out these potential problems:

  1. Run a non-expired cleaning cartridge through the cleaning cycle three times
  2. Place a brand new tape in the drive
  3. Run a manual backup or wait for the next automatic backup to occur
  4. If errors persist, contact IBM for service

How do I create a mksysb tape backup on AIX?

These instructions are for AIX 7.1. If you are on AIX 6.1, the steps will be similar. If you are on a previous version of AIX, you should upgrade as soon as possible.

Use Eterm, the local console or HMC to log into the server as root.

At the root command prompt (#), run:

smit mksysb

At the “Back Up This System” screen, press ESC-4 or F4 to change the highlighted fields:

* Backup DEVICE or FILE                              [/dev/rmt0]
  Create MAP files?                                   no
  EXCLUDE files?                                      yes
  List files as they are backed up?                   no 
  Verify readability if tape device?                  no 
  Generate new /image.data file?                      yes
  EXPAND /tmp if needed?                              yes
  Disable software packing of backup?                 yes
  Backup extended attributes?                         yes
  Number of BLOCKS to write in a single output       []  
     (Leave blank to use a system default)
  Location of existing mksysb image                  []
  File system to use for temporary work space        []  
     (If blank, /tmp will be used.)
  Back up encrypted files?                            yes
  Back up DMAPI filesystem files?                     yes

When the fields have been correctly set, press Enter to begin the backup.

A progress indicator will indicate when the backup is running, and when it has completed, you will receive either an OK or Failed completion status message.

After creating the mksysb, you should verify the tape. The verification consists of reading the information stored on the tape back into the system.

Verifying the mksysb Tape – AIX

To verify the mksysb tape:

1. At the command prompt (#), enter the following command:
# smit lsmksysb

2. Leave the tape in the drive and press Esc-4 to select the device name in the second field on this screen.

The default for this field is /dev/rmt0.
If your primary tape drive is another device, press Esc-4 to select the name in this field.

Leave all other fields at their default values

The verification process begins.
You can let it run to completion or stop it by using Ctrl-C. It will take quite a while to stop, so be patient. If you stop the verification it will eventually give you an error message of “failed,” which in this case only means that you stopped the verification.
An “OK” in the upper left corner of the screen indicates a successful readback.

3. Press Esc-3 until you are back at the # prompt to get out of mksysb process.

4. Eject your mksysb tape.