Cisco Headend System Release 2.7 用户指南
Appendix C
Setting Up an Automated Database Backup
66
4013779 Rev C
Configure the DNCS for an Automatic Database
Backup
Copying the Backup/Restore Scripts to the DNCS
Complete the following steps to copy the backup and restore scripts from the CD to
the DNCS/ISDS.
1 Insert the DBDS Maintenance CD into the CD drive of the DNCS/ISDS.
2 Type cp -pr /cdrom/cdrom0/s3/backup_restore /usr/local and then press Enter.
1 Insert the DBDS Maintenance CD into the CD drive of the DNCS/ISDS.
2 Type cp -pr /cdrom/cdrom0/s3/backup_restore /usr/local and then press Enter.
Editing the crontab
Complete the following steps to configure your nightly backup of the Informix
database on the DNCS.
1 From an xterm window on the DNCS, log in as root user.
2 Type crontab -l > /tmp/root.crontab and then press Enter. The system redirects
1 From an xterm window on the DNCS, log in as root user.
2 Type crontab -l > /tmp/root.crontab and then press Enter. The system redirects
the contents of the crontab into root.crontab.
Note: The ‘l’ in crontab -l is a lowercase L.
Important: While you can edit the crontab directly, we recommend that you first
Note: The ‘l’ in crontab -l is a lowercase L.
Important: While you can edit the crontab directly, we recommend that you first
redirect the contents of the crontab to root.crontab so you can recover the
original crontab if necessary.
3 Type vi /tmp/root.crontab and then press Enter. The system opens root.crontab
for editing using the UNIX vi editor.
4 Add the following lines to the end of root.crontab, based upon your tape drive
configuration:
If you have a standard tape drive configuration, add the following entry to the
end of the root.crontab file:
#cron to automatically back up the database
#cron to automatically back up the database
0 2 * * * (. /dvs/dncs/bin/dncsSetup;
/usr/local/backup_restore/backupDatabase -n)
If you have a custom tape drive configuration, add the following entry to the
end of the root.crontab file:
#cron to automatically back up the database
#cron to automatically back up the database
0 2 * * * (. /dvs/dncs/bin/dncsSetup;
/usr/local/backup_restore/backupDatabase -n -b [blocksize] -s [tapesize])
Note: This command will back up the DNCS database at 2 a.m. everyday. To
learn more about the various fields in the command you just entered, type man
crontab and then press Enter at an xterm window on the DNCS.