Table Of Contents
Backing Up and Restoring the Registry
Backing Up the Cisco ANA Registry
Overview of the Registry Backup Procedure
Before You Begin Backing Up the Registry
Performing a Manual Backup
Changing the Periodic Backup Time
Restoring the Cisco ANA Registry
Backing Up and Restoring the Registry
These topics describe how to backup and restore the Cisco ANA registry:
•
Backing Up the Cisco ANA Registry
•
Restoring the Cisco ANA Registry
Note
The procedures described in these topics do not back up the Oracle database. Refer to your Oracle documentation for instructions on how to back up the Oracle software.
Backing Up the Cisco ANA Registry
These topics describe the Cisco ANA registry backup procedure:
•
Overview of the Registry Backup Procedure
•
Before You Begin Backing Up the Registry
•
Performing a Manual Backup
•
Changing the Periodic Backup Time
These procedures do not back up the Oracle database. Refer to your Oracle documentation for instructions on how to back up the database.
Overview of the Registry Backup Procedure
Cisco ANA backs up its registry data, encryption key, and crontab files once a week using the UNIX cron mechanism. By default, the Cisco ANA integrity service performs backups every 12 hours at 11:00 a.m. and 11:00 p.m, as defined in the crontab file.
To restore data, you must execute the restore.csh command manually.
The backup files are stored in the directory ANAHOME/db/db_backup/[date+time] where:
•
ANAHOME is the installation directory, normally /export/home/ana37.
•
[date+time] is a directory name composed of the date and time of the backup.
For example, /export/home/ana37/db/db_backup/200904130404/ is created on 13 April 2009 at 4:04 a.m. By default, the cron table executes the backup procedure every Sunday at 1:00 a.m.
Note
If you reinstall the server using the install.pl script, the ana37 user and the content under it is deleted; this includes the default backup directory. You can change the location, but the user ana37 must be able to write to the location. For example, the default directory permissions are:
("drwx------ 2 ana37 ana37 512 Sep 24 02:54")
We recommend that you do not locate the backup directory under /tmp, since this directory is deleted whenever the server is rebooted, and the backed-up content lost.
To maximize data safety, we recommend that you copy the backed-up directory to an external storage location, such as a DVD or a disk on a different server.
Before You Begin Backing Up the Registry
Cisco ANA uses SSH to connect to the machine on which you will back up your data. Even if you copy files to a local drive, the SSH connection must be established for the procedure to succeed. To avoid any possible SSH errors, perform the following procedure, which makes sure the SSH hosts file (ANAHOME/.ssh/known_hosts) will accept connections from all hosts. (ANAHOME is the installation directory, normally/export/home/ana37.)
Step 1
Make sure the SSH daemon is running.
Step 2
Log in to the gateway server as user ana37.
Step 3
Enter the following command:
If Cisco ANA returns a list of files, you are done. Otherwise (if SSH informs you that it did not find a fingerprint), proceed to Step 4.
Step 4
Enter yes after the following output:
The authenticity of host '127.0.0.1 (127.0.0.1)' can't be established.
DSA key fingerprint is 33:dc:5a:39:20:48:5f:5d:7d:94:63:dc:83:1a:1d:13.
Are you sure you want to continue connecting (yes/no)?
Step 5
Repeat Step 3. Cisco ANA returns a list of files, indicating that the system was updated.
Performing a Manual Backup
As described in Overview of the Registry Backup Procedure, Cisco ANA automatically performs a registry backup every week. You can also perform manual backups using the following procedure.
Step 1
Perform the procedure described in Before You Begin Backing Up the Registry, to make sure Cisco ANA can communicate over SSH.
Step 2
Open an SSH session to the Cisco ANA gateway and log in as ana37.
Step 3
Change the directory to the installation directory:
# cd ANAHOME
Step 4
Start the backup:
# mc.csh localhost 8011 integrity.executeTest backup
Note
It is normal for null to appear in response to this command.
Changing the Periodic Backup Time
Registry backups are controlled according to commands in the crontab file. The crontab file consists of lines, where each line contain six fields:
min hour day-of-month month-of-year day-of-week command
The fields are separated by spaces or tabs. The first five are integer patterns that can contain the following values:
Field
|
Acceptable Values
|
min
|
Minute in range 0-59
|
hour
|
Hour in range 0-23
|
day-of-month
|
Day in range 1-31
|
month-of-year
|
Month in range 1-12
|
day-of-week
|
Day in range 0-6 (0=Sunday).
|
command
|
Command
|
To specify days using only one field, set the other fields to *.
For example, 0 0 * * 1 runs a command only on Mondays.
In the following example, core files are cleaned up every weekday morning at 3:15 a.m.:
15 3 * * 1-5 find $HOME -name core 2>/dev/null | xargs rm -f
The sequence 0 0 1,15 * 1 runs a command on the first and fifteenth of each month as well as every Monday.
Use this procedure to change when Cisco ANA backs up its registry (this command also changes when Cisco ANA will run integrity tests; see Purging Old Data Using the Integrity Service, page 13-1).
Step 1
Perform the procedure described in Before You Begin Backing Up the Registry, to make sure Cisco ANA can communicate over SSH.
Step 2
Log into the Cisco ANA gateway machine as user ana37.
Step 3
Edit the cron table as follows:
crontab -e
Step 4
Make your changes to the crontab file.
Step 5
Restart the gateway server.
Restoring the Cisco ANA Registry
Before you begin, the Cisco ANA gateway must be installed as described in the Cisco Active Network Abstraction 3.7 Installation Guide. You need to log in as root.
To restore from a backup:
Step 1
Stop the gateway server and all units:
# cd ANAHOME/Main
# ./anactl stop
Step 2
From the ANAHOME/Main directory, change to the directory ANAHOME/Main/scripts:
# cd scripts
Step 3
Execute the restoration script:
# chmod 700 restore.csh
# restore.csh backup-files-location sheer-home-location
Note
By default, backup-files-location is ANAHOME/db/db_backup/date+time (as configured through the registry). The filler date+time is a directory name composed of a date and backup time. For example, /export/home/ana37/db/db_backup/200904130404/ is created on 13 April 2009 at 4:04 a.m.
Step 4
Once the restoration is successful, initialize the Cisco ANA gateway by running the following commands:
# su - ana37
# cd Main
# ./anactl restart