Quote:
Originally Posted by borngunners I am still stuck with the email issues and the DAR issue with the -A option. Can someone help me resolve these issues. I have successfully created the ssh setup to a remote location, but becauise of the DAR issue the backup is not being transfered to the remote location. Below is the error message: |
OK - I'm not an expert on this stuff. I am quite new to shell scripting too myself. But trying out the various commands in the script, I think I can see some of what the OP was trying to do.
The -A option error on the DAR command line would indicate that there was a problem with the final section of
Code:
nice -19 $DAR_BIN -J bf:$KEY -s $ARCHIVESIZE -z$COMPRESS -Z "*.gz" -Z "*.zip"\
-Z "*.bz2" -Z "*.tgz" -Z "*.zgz" -Z "*.jar" -Z "*.tiff" \
-Z "*.jpg" -Z "*.png" -Z "*.gif" -Z "*.jpeg" -R `pwd` \
-c "$ARCHIVEDIR""$ARCHIVENAME" -Q\
-A "$CURRENTFULL" -Q
so DAR did not like what it saw in the $CURRENTFULL variable.
Looking back up to where $CURRENTFULL gets it's value - it is set from
Code:
CURRENTFULL=`ls -A -1 "$ARCHIVEDIR""$BACKUPWEEK"*$FULL_PREFIX*dar 2>/dev/null | cut -d . -f1 `
It seems that there are two reasons for this (and correct me if I am wrong someone) is to
(1) to verify that there is a FULL backup in the current week's folder on which to base a DIFF
(2) get the Base Name of the FULL backup in the current backups folder in order to pass it to the DAR command
If you run this command with just one ....FULL.1.dar file in the folder it returns a single base file name. However, if your backup goes onto a second file and you have a ....FULL.2.dar the command returns 2 lines, etc.
I believe changing the *dar in the command to .1.dar would actually fix this problem, and allow the script to continue. By definition every backup will always have exactly one .1.dar - so it will either exist or not, and it will only exist once - so will not supply multiple base filenames to the -A option on the DAR command line
Code:
CURRENTFULL=`ls -A -1 "$ARCHIVEDIR""$BACKUPWEEK""$FULL_PREFIX".1.dar 2>/dev/null | cut -d . -f1 `
Will look further into the media section to see if can see anything else that might go wrong afterwards.
Hope this helps