[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: tape eject
- From: Nigel Wade <nmw ion le ac uk>
- To: redhat-install-list redhat com
- Subject: Re: tape eject
- Date: Thu, 01 May 2003 09:37:04 +0100
Andrew Robinson wrote:
At 08:24 AM 4/30/2003 +0100, you wrote:
any reason why the command needs to be at the end of the backup line? or
can it be appended to the end of the crontab file?
Well, you want it at the end of the backup file so the tape isn't
ejected before the backup is made. Ok, ok, I'll stop being silly. I can
think of two reasons to append it to the crontab line, neither hard and
fast. I do it because my backup command is a compiled program that I
cannot edit. Also, ejecting the tape is a separate operation from making
the backup. The semicolon makes this apparent. Bottom line, if you want
in your script, go right ahead.
but now that I have your interest .......
I would like to keep a record of all files which are backed up.
I can produce a list of files which are on the tape to the screen but not
get them sent to a file.
Now what I would LOVE to do is have a changing filename eg by adding the
date (yymmdd or just mmdd would do) to the backup filename
You can use the date command to build a filename. Say something like
backuplogname=backup_$(date +"%y%m%d")
tar -cvf /dev/sd0 /usr > $backuplogname 2>&1
By putting the year first in the backup log name, the files will sort in
chronological order with the ls command.
Hope this helps.
Andrew
Just an additional note to this. If your backup mechanism doesn't have any
automatic verification procedure then reading back the tape contents *after*
the backup to get the list of files backed up is a good way to verify that
the tape is readable.
--
Nigel Wade, System Administrator, Space Plasma Physics Group,
University of Leicester, Leicester, LE1 7RH, UK
E-mail : nmw ion le ac uk
Phone : +44 (0)116 2523548, Fax : +44 (0)116 2523555
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]