Bash script questions.
- From: Longfellow <not@xxxxxxxxxxxx>
- Date: Tue, 27 Mar 2007 05:44:03 -0000
I've got rsync backing the partitions of one drive to another, and they
all work find. Now I want a shell script to run all the backups.
I began with mount checks:
if [ ! -d {some directory in backup partition} ]; then
mount -t ext2 {backup partition} /mnt/{backup mount}
fi
for each backup partition.
Then I list all the backup scripts with sleep 60 between each to let
things cool down a bit.
1) In each backup script: I've yet to trust the backup log to record
any error messages because I don't know whether or not '2>&1' works with
'>>' (append). I gather that the '2>&1' should be at the end of the
command rather than following or preceeding the append operator. Does
this work with append, and if so, where should it be?
2) In the master script, I want each backup script to be able to write
any problems to the log file. I gather that rsync gracefully exits with
an error message in any case, but I'm not certain. I don't want each
script to depend on the success of the previous one, so I'm not using
'&&' between scripts. What, if anything, should follow the script
executable?
If all this gets to work dependably, it will become a cron job, so I
won't be around to intervene if things screw up.
Thanks
Longfellow
.
- Follow-Ups:
- Re: Bash script questions.
- From: birre
- Re: Bash script questions.
- From: Longfellow
- Re: Bash script questions.
- From: Unruh
- Re: Bash script questions.
- From: Handover Phist
- Re: Bash script questions.
- Prev by Date: four Level Paging
- Next by Date: Re: Bash script questions.
- Previous by thread: four Level Paging
- Next by thread: Re: Bash script questions.
- Index(es):
Relevant Pages
|