On Fri, 15 Sep 2000, Eileen Orbell wrote:

> I am trying to schedule a backup of a directory to run every hour on a 
> directory.  I want to modify crontab to include my listing.. the backup is 
> to a tapedrive.. Can someone direct me how to do this??
> I am trying to learn how to do backups and starting with 1 directory only..

To edit your crontab, use

crontab -e

You may want to set the EDITOR env to your favorite editor before running
it though (think it defaults to vi.

Then add this header to it. If you don't do this often you will forget
(like I do)

#       The time and date fields are:
#
#              field          allowed values
#              -----          --------------
#              minute         0-59
#              hour           0-23
#              day of month   1-31
#              month          1-12 (or names, see below)
#              day of week    0-7 (0 or 7 is Sun, or use names)
#
#       A  field  may  be an asterisk (*), which always stands for
#       ``first-last''.

Now using the header as a guide, formulate your entry

0 * * * * /full/path/to/your/backup/script

Where /full/path/to/your/backup/scriptis the script you are about to
create. Assuming you will be doing a full backup, using tar to append to a
tape using scsi tape drive called /dev/st0 your script would look
something like

#!/bin/sh

# advance to end of last archive
/bin/mt -f /dev/nst0 fsf 1
tar cf /dev/st0  /your/dir/to/backup

Now there were a lot of assumption made, so if you need more help, you
will have to tell us what kind of tape drive etc.

I hope this gets you started. Read the man pages for cron, tar, and mt for
details

charles



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to