Table Of Contents
Database Backup and Restore Procedure
Overview
Backed-Up Content
Backup Procedure
Changing Periodic Backup Time
Restore Procedure
Database Backup and Restore Procedure
About this appendix:
This appendix describes the database backup and restore procedure.
Overview, provides an overview of the backup procedure.
Backed-Up Content, briefly 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 following 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) executes 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
/200504130404/ is created on 13 April 2005 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 the Cisco ANA Gateway with sheer user.
Step 2
Edit the cron table as follows:
crontab -e
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
Refer to crontab(1) in the Solaris documentation for a detailed explanation about the cron table format.
The user can activate the backup procedure on the spot.
To activate the backup procedure on the spot:
Step 1
Telnet the Cisco ANA Gateway with sheer
user.
Step 2
Change the directory to sheer/Main by executing the following command:
cd ~/Main
Step 3
At prompt execute 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 chapter Installing the Cisco ANA Gateway in the Cisco Active Network Abstraction Servers Installation Guide. Note 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:
cd ~sheer/Main/scripts
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
/200504130404/ is created on 13 April 2005 at 4:04 AM.
Step 3
Once the restoration is successful, initialize the Cisco ANA Gateway by executing the following command:
su - sheer
cd Main
./mvm.csh
Note
The default password for the user sheer is sheer.