|
Hi all,
I have a bash script which I run nightly(via cron)
on my MDK machine. It backs up itself, the Windows partitions on the same
machine, and another Windows machine on the network. The backups are written (as
tgz) to a third machine, also running MDK. It does weekly a full backup,
and daily a diff backup.
It all works fine, except for the weekly full
backup of the other Windows(ME) machine. It runs for about 10 minutes, then
appears to die. The .tgz file is incomplete. When I go to shut down the windows
machine, it warns that my MDK machine is still connected.
The last line of the script is to unmount this
machine, so it's obviously never getting there.
Is this a network time-out problem? If so, any
suggestions on how to get around it?
This is an excerpt of the relevant bits of the
script.
#!/bin/bash
# # creates backups of essential files # backups the Windows partitions on Amanda & Rikki RIKKI_C="/mnt/rikki_c"
RIKKI_D="/mnt/rikki_d" RIKKI_E="/mnt/rikki_e" RIKKI_F="/mnt/rikki_f" RIKKI_G="/mnt/rikki_g" LIST="/tmp/backlist_$$.txt" smbmount "\\\\Server2\\public1" /mnt/public1 -o username=amanda,password=*** smbmount "\\\\Rikki\\rikki-c" /mnt/rikki_c -o password=***
smbmount "\\\\Rikki\\rikki-d" /mnt/rikki_d -o
password=***
smbmount "\\\\Rikki\\rikki-e" /mnt/rikki_e -o password=*** smbmount "\\\\Rikki\\rikki-f" /mnt/rikki_f -o password=*** smbmount "\\\\Rikki\\rikki-g" /mnt/rikki_g -o password=*** # third, backup Rikki
set $(date) # if test "$1" = "Thu" ; then tar cfz "/mnt/public1/Backups/Rikki/backup_rikki_c_full_$6-$2-$3.tgz" $RIKKI_C rm -f /mnt/public1/Backups/Rikki/backup_rikki_c_diff* tar cfz "/mnt/public1/Backups/Rikki/backup_rikki_d_full_$6-$2-$3.tgz" $RIKKI_D rm -f /mnt/public1/Backups/Rikki/backup_rikki_d_diff* tar cfz "/mnt/public1/Backups/Rikki/backup_rikki_e_full_$6-$2-$3.tgz" $RIKKI_E rm -f /mnt/public1/Backups/Rikki/backup_rikki_e_diff* tar cfz "/mnt/public1/Backups/Rikki/backup_rikki_f_full_$6-$2-$3.tgz" $RIKKI_F rm -f /mnt/public1/Backups/Rikki/backup_rikki_f_diff* tar cfz "/mnt/public1/Backups/Rikki/backup_rikki_g_full_$6-$2-$3.tgz" $RIKKI_G rm -f /mnt/public1/Backups/Rikki/backup_rikki_g_diff* else find $RIKKI_C -depth -type f \( -ctime -1 -o -mtime -1 \) -print > $LIST tar cfzT "/mnt/public1/Backups/Rikki/backup_rikki_c_diff_$6-$2-$3.tgz" "$LIST" rm -f "$LIST" find $RIKKI_D -depth -type f \( -ctime -1 -o -mtime -1 \) -print > $LIST tar cfzT "/mnt/public1/Backups/Rikki/backup_rikki_d_diff_$6-$2-$3.tgz" "$LIST" rm -f "$LIST" find $RIKKI_E -depth -type f \( -ctime -1 -o -mtime -1 \) -print > $LIST tar cfzT "/mnt/public1/Backups/Rikki/backup_rikki_e_diff_$6-$2-$3.tgz" "$LIST" rm -f "$LIST" find $RIKKI_F -depth -type f \( -ctime -1 -o -mtime -1 \) -print > $LIST tar cfzT "/mnt/public1/Backups/Rikki/backup_rikki_f_diff_$6-$2-$3.tgz" "$LIST" rm -f "$LIST" find $RIKKI_G -depth -type f \( -ctime -1 -o -mtime -1 \) -print > $LIST tar cfzT "/mnt/public1/Backups/Rikki/backup_rikki_g_diff_$6-$2-$3.tgz" "$LIST" rm -f "$LIST" fi smbumount /mnt/rikki_c
smbumount /mnt/rikki_d smbumount /mnt/rikki_e smbumount /mnt/rikki_f smbumount /mnt/rikki_g |
- Re: [SLUG] backup script, WinME, networked, HELP Amanda Wynne
