# Something wrong happened.
rm $TARFILE
echo `date`" $computer: $TARFILE empty. $backuplevel backup of $computer:$filesystem failed and deleted"
-
- # We don't want to return 0
die
fi
# Try to SSH to the computer without entering a password.
if ! `ssh -n -o NumberOfPasswordPrompts=0 root@$computer /bin/true`; then
echo `date`" $computer: Could not use passwordless SSH."
-
- # We don't want to return 0
die
fi
compressor=gzip
fi
- filesystems=""
-
# Check dump bit in fstab
filesystems=`ssh -n root@$computer "cat /etc/fstab" \
| grep -v nfs \
# Clean up our dir at this client
if ! ssh root@$computer "rm -r ~/.backup ; mkdir -m 700 ~/.backup"; then
- echo `date`" $computer: Could not create backup staging area at $computer:~/.backup - skipping backup of $computer"
+ echo `date`" $computer: Could not create backup staging area at $computer:~/.backup"
die
fi
# Try to copy $exclude to $computer
if ! scp $exclude root@$computer:~/.backup/exclude > /dev/null; then
- echo `date`" $computer: Could not copy exclude.txt to $computer - skipping backup of $computer"
+ echo `date`" $computer: Could not copy exclude.txt to $computer"
die
fi
# Try to copy preeexec and postexec if they exist
if [ -f $confdir/preexec.$computer ]; then
if ! scp $confdir/preexec.$computer root@$computer:~/.backup/preexec >&2; then
- echo `date`" $computer: Could not copy preexec.$computer to $computer:~/.backup/preexec - skipping backup of $computer"
+ echo `date`" $computer: Could not copy preexec.$computer to $computer:~/.backup/preexec"
die
fi
fi
if [ -f $confdir/postexec.$computer ]; then
if ! scp $confdir/postexec.$computer root@$computer:~/.backup/postexec >&2; then
- echo `date`" $computer: Could not copy postexec.$computer to $computer:~/.backup/postexec - skipping backup of $computer"
+ echo `date`" $computer: Could not copy postexec.$computer to $computer:~/.backup/postexec"
die
fi
fi
# Try to run preexec if it exist
if ! ssh root@$computer "[ ! -f ~/.backup/preexec ] || /bin/bash -x ~/.backup/preexec" >&2; then
- echo `date`" $computer: Could not run $computer:~/.backup/preexec - skipping backup of $computer"
+ echo `date`" $computer: Could not run $computer:~/.backup/preexec"
die
fi
echo $DATEs > $storagedir/$computer/$sfilesystem/.date
fi
- # Check if we want a full backup - Debug statement that causes noise in cron mail:
- # printf " $computer $filesystem: $confdir/fastfullbackupdag.$computer.$sfilesystem\n"
+ # Check if we want a full backup
if [ -f $confdir/fastfullbackupdag.$computer.$sfilesystem ]; then
fullbackup_min_for_this_machine=$dagermellomfulleforfast
if [ "$DAY_OF_MONTH" = "`cat $confdir/fastfullbackupdag.$computer.$sfilesystem`" ]; then