HP-UX System Administrator's Guide: Routine Management Tasks
NOTE: If you schedule fbackup using the crontab utility, be aware that fbackup
is an interactive utility. If fbackup needs attention (tape change, device not online,
and so on), it will prompt for input. If the input is not provided, an automated backup
may fail or not complete.
Creating an Automated Backup Schedule
Use the crontab utility to specify an input file containing information about the backup
procedures you want to automate. The crontab utility allows you to specify an input
file containing the date, time, and run-strings of the backup procedures (processes)
that you want to automate. This file (the input to the crontab utility) contains lines
that have six required fields each. The fields are separated by spaces or tabs. Each entry
in this file has the following format:
minutes hours dates months days runstring
where:
minutes
Specifies the minutes of the hour (0-59)
hours
Specifies the hours of the day (0-23)
dates
Specifies particular dates of the month (1-31)
months
Specifies particular months of the year (1-12)
days
Specifies particular days of the week (0-6 with 0 representing Sunday)
runstring
Specifies the command line or script file to execute
NOTE: Specify multiple values in a field by separating them with commas (no spaces),
as in 10,20,30.
The value * in any field represents all legal values.
Therefore, to schedule the ps command (see ps(1)) to execute at 5:10 p.m. (17:10) on
every Friday and Monday during June, July, and August, you would make an entry
in your crontab input file that looks like this:
10 17 * 6,7,8 1,5 ps >> /tmp/psfile 2>&1
When using crontab, redirect any output that is normally sent to the terminal to a
file. In this example, 2>&1 redirects any error messages to the file psfile.
An example backup strategy may consist of a full backup (performed once per week)
and an incremental daily backup. Assume that the backups are to be performed at
4:03am and the media is DDS (DAT) tape. The following crontab file implements the
example backup strategy:
3 4 * * 1 incrback >> monbackup
3 4 * * 2 incrback >> tuebackup
3 4 * * 3 incrback >> wedbackup
3 4 * * 4 incrback >> thubackup
Backing Up Data 135