Table Of Contents
Database Backup and Restore
Overview
Backed-Up Content
Backup Procedure
Changing Periodic Backup Time
Restore Procedure
Database Backup and Restore
This appendix describes the database backup and restore procedure.
•
Overview—Provides an overview of the backup procedure.
•
Backed-Up Content—Describes the data that is backed up.
•
Backup Procedure—Describes how to activate the backup procedure.
•
Changing Periodic Backup Time—Describes how to change the backup time.
•
Restore Procedure—Describes the restore procedure.
Overview
The backup procedure is used to perform data backup once a week. It operates through the UNIX cron mechanism. The factory settings entry in the cron table (crontab) runs the backup procedure every Sunday at 1:00 AM. To activate the backup procedure, the user needs to remove the comment for the relevant line in the cron table.
The restoration is done manually by executing the restore.pl script.
Backed-Up Content
The data that has been backed-up is:
•
Cisco ANA database
•
Cisco ANA registry (Golden Source)
•
cron table (crontab)
Backup Procedure
The backup script is a scheduled task. It operates through cron.
The backup files are stored in the following directory, ~sheer/db/db_backup/[date+time].
Note
The filler [date+time] is a directory name composed of a date and time of the backup. For example, ~sheer/db/db_backup/200604130404/ is created on 13 April 2006 at 4:04 AM. By default the cron table executes the backup procedure every Sunday at 1:00AM.
The location is configurable through the registry. For more information, refer to registry path, avm11/agents/integrity/backup.
The figure below displays the backup registry entries.
Figure A-1 Backup Registry Entries
The backup is disabled by default.
To enable the backup:
Step 1
Telnet to the Cisco ANA gateway as sheer user.
Step 2
Edit the cron table as follows:
Step 3
Add the following line to the file, and save the change:
0 1 * * 0 cd Main;./mc.csh localhost 8011 integrity.executeTest backup > /dev/null 2>&1
Note
Refer to crontab(1) in the Solaris documentation for a detailed explanation about the cron table format.
The user can activate the backup procedure immediately.
To activate the backup procedure immediately:
Step 1
Telnet to the Cisco ANA gateway as sheer user.
Step 2
Change the directory to sheer/Main by executing the following command:
Step 3
At the prompt, run the following command line:
./mc.csh localhost 8011 integrity.executeTest backup
Changing Periodic Backup Time
A crontab file consists of lines of six fields each. The fields are separated by spaces or tabs. The first five are integer patterns that specify the following:
•
minute (0-59)
•
hour (0-23)
•
day of the month (1-31)
•
month of the year (1-12)
•
day of the week (0-6 with 0=Sunday)
To specify days using only one field, the other field should be set to *.
For example, 0 0 * * 1 would run a command only on Mondays.
Another example cleans up core files every weekday morning at 3:15 am:
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.
Restore Procedure
Install the Cisco ANA gateway. For more information, refer to the Cisco Active Network Abstraction Servers Installation Guide. Note that you will need to login as root.
To restore from a backup:
Step 1
Change the directory /export/home/sheer/Main/scripts by executing the following command:
Step 2
Execute the restoration script:
restore.pl [backup-files-location]
Note
By default the [backup-files-location] is ~sheer/db/db_backup/[date+time] (this is configurable through the registry). The filler [date+time] is a directory name composed of a date and time backup time. For example, ~sheer/db/db_backup/200604130404/ is created on 13 April 2006 at 4:04 AM.
Step 3
Once the restoration is successful, initialize the Cisco ANA gateway by running the following command:
Note
The default password for the user sheer is sheer.