echo "Test results" >>test.out
echo " " >>test.out
./starttime
-nice ./all-non-root-tests
-nice ./all-non-root-tape-tests
+nice ./all-disk-tests
+nice ./all-tape-tests
nice ./all-changer-tests
echo " "
echo "End do_all tests"
slot=`bin/mtx-changer @autochanger@ loaded 0 @tape_drive1@ 1`
- if test x$slot != x2; then
- echo "load slot 2 in drive 1"
- bin/mtx-changer @autochanger@ load 2 @tape_drive1@ 1
+ if test x$slot != x$SLOT2; then
+ echo "load slot $SLOT2 in drive 1"
+ bin/mtx-changer @autochanger@ load $SLOT2 @tape_drive1@ 1
fi
echo "WEOF drive 1"
mt -f @tape_drive1@ rewind
mt -f @tape_drive1@ weof
- echo "unload slot 2 in drive 1"
- bin/mtx-changer @autochanger@ unload 2 @tape_drive1@ 1
+ echo "unload slot $SLOT2 in drive 1"
+ bin/mtx-changer @autochanger@ unload $SLOT2 @tape_drive1@ 1
slot=`bin/mtx-changer @autochanger@ loaded 0 @tape_drive@ 0`
echo "Slot $slot in drive 0"
- if test x$slot != x1; then
- echo "load slot 1 in drive 0"
- bin/mtx-changer @autochanger@ load 1 @tape_drive@ 0
+ if test x$slot != x$SLOT1; then
+ echo "load slot $SLOT1 in drive 0"
+ bin/mtx-changer @autochanger@ load $SLOT1 @tape_drive@ 0
fi
echo "WEOF drive 0"
mt -f @tape_drive@ rewind
mt -f @tape_drive@ weof
- echo "unload slot 1 from drive 0"
- bin/mtx-changer @autochanger@ unload 1 @tape_drive@ 0
+ echo "unload slot $SLOT1 from drive 0"
+ bin/mtx-changer @autochanger@ unload $SLOT1 @tape_drive@ 0
fi
#
# Cleanup left over files -- both before and after test run
#
+
+. scripts/functions
+
scripts/cleanup
if test x@autochanger@ != x/dev/null; then
- drive=`bin/mtx-changer @autochanger@ loaded 0 dummy 0`
- if test x${drive} != x2; then
- bin/mtx-changer @autochanger@ unload 0 @tape_drive@ 0
- bin/mtx-changer @autochanger@ load 2 @tape_drive@ 0
+ slot=`bin/mtx-changer @autochanger@ loaded 0 dummy $DRIVE1`
+ if test "x${slot}" != "x$SLOT2"; then
+ bin/mtx-changer @autochanger@ unload $slot @tape_drive@ $DRIVE1
+ bin/mtx-changer @autochanger@ load $SLOT2 @tape_drive@ $DRIVE1
fi
mt -f @tape_drive@ rewind
mt -f @tape_drive@ weof
# If we have an autochanger always load tape in slot 1
#
if test x@autochanger@ != x/dev/null; then
- drive=`bin/mtx-changer @autochanger@ loaded 0 dummy 0`
- if test x${drive} != x1; then
- bin/mtx-changer @autochanger@ unload 0 @tape_drive@ 0
- bin/mtx-changer @autochanger@ load 1 @tape_drive@ 0
+ slot=`bin/mtx-changer @autochanger@ loaded 0 dummy $DRIVE1`
+ if test "x${slot}" != "x$SLOT1"; then
+ bin/mtx-changer @autochanger@ unload $slot @tape_drive@ $DRIVE1
+ bin/mtx-changer @autochanger@ load $SLOT1 @tape_drive@ $DRIVE1
fi
fi
Write Bootstrap = "@working_dir@/NightlySave.bsr"
}
+Job {
+ Name = "MonsterFileSet"
+ Type = Backup
+ Client=@hostname@-fd
+ FileSet="MonsterFileSet"
+ Storage = File
+ Messages = Standard
+ Pool = Default
+ Maximum Concurrent Jobs = 4
+ Write Bootstrap = "@working_dir@/NightlySave.bsr"
+}
+
+
Job {
Name = "VerifyVolume"
}
}
+FileSet {
+ Name = "MonsterFileSet"
+ Include {
+ Options {
+ signature = MD5
+ noatime = yes
+ ignore case = yes
+ Exclude = yes
+ RegexDir = "Cache"
+ RegexDir = "Windows Defender"
+ RegexDir = "Temporary Internet Files"
+ RegexDir = "bacula"
+ RegexDir = "Temp"
+
+ RegexDir = "ATI Technologies"
+
+ RegexDir = "wmdownloads"
+ RegexDir = "My Music"
+ RegexDir = "iTunes"
+ RegexDir = "Cookies"
+
+ RegexFile = "desktop.ini"
+ RegexFile = "thumbs.db"
+ RegexFile = "acrobat7.exe"
+ RegexFile = "acr6win.exe"
+ RegexFile = "AdbeRdr70_enu_full.exe"
+ RegexFile = "antivirus10_1_5.exe"
+ #thunderbird lock file
+ RegexFile = "parent.lock"
+
+ RegexDir = "Retrospect Restore Points"
+
+ #exclude i386 director of windows installer files
+ WildDir = "[A-Z]:/i386"
+
+ # Exclude Mozilla-based programs' file caches
+ WildDir = "[A-Z]:/Documents and Settings/*/Application Data/*/Profiles/*/*/ImapMail"
+ WildDir = "[A-Z]:/Users/*/Application Data/*/Profiles/*/*/ImapMail"
+
+ # Exclude user's registry files - they're always in use anyway.
+ WildFile = "[A-Z]:/Documents and Settings/*/Local Settings/Application Data/Microsoft/Windows/usrclass.*"
+ WildFile = "[A-Z]:/Users/*/Local Settings/Application Data/Microsoft/Windows/usrclass.*"
+ WildFile = "[A-Z]:/Documents and Settings/*/ntuser.*"
+ WildFile = "[A-Z]:/Users/*/ntuser.*"
+
+ WildDir = "[A-Z]:/Documents and Settings/*/Recent"
+ WildDir = "[A-Z]:/Users/*/Recent"
+
+ WildDir = "[A-Z]:/Documents and Settings/*/Local Settings/History"
+ WildDir = "[A-Z]:/Users/*/Local Settings/History"
+
+ # These are always open and unable to be backed up
+ WildFile = "[A-Z]:/Documents and Settings/All Users/Application Data/Microsoft/Network/Downloader/qmgr[01].dat"
+ WildFile = "[A-Z]:/Users/All Users/Application Data/Microsoft/Network/Downloader/qmgr[01].dat"
+
+ #Exclude all of Windows...
+ WildDir = "[A-Z]:/windows"
+ WildDir = "[A-Z]:/winnt"
+ WildDir = "[A-Z]:/winxp"
+ WildDir = "[A-Z]:/win"
+
+ #symantec antivirus app stuff
+ WildDir = "[A-Z]:/*/Symantec*"
+
+ #system volume information
+ WildDir = "[A-Z]:/System Volume Information"
+
+ WildFile = "*.tmp"
+ # ghost image and spanning files
+ WildFile = "*.gho"
+ WildFile = "*.ghs"
+
+ # Recycle bins
+ WildDir = "[A-Z]:/RECYCLER"
+ WildDir = "[A-Z]:/RECYCLER"
+ WildDir = "[A-Z]:/RECYCLED"
+ WildDir = "[A-Z]:/$RECYCLE.BIN"
+
+ # Swap files
+ WildFile = "[A-Z]:/pagefile.sys"
+
+ # These are programs and are easier to reinstall than restore from
+ # backup
+ WildDir = "[A-Z]:/cygwin"
+ WildDir = "[A-Z]:/Program Files/Adobe/Acrobat 7.0"
+ WildDir = "[A-Z]:/Program Files/Adobe/Acrobat 8.0"
+
+ WildDir = "[A-Z]:/Program Files/Common Files/Software Center"
+ WildDir = "[A-Z]:/Software Center"
+
+ WildDir = "[A-Z]:/Program Files/Grisoft"
+ WildDir = "[A-Z]:/Program Files/Java"
+ WildDir = "[A-Z]:/Program Files/Java Web Start"
+ WildDir = "[A-Z]:/Program Files/JavaSoft"
+ WildDir = "[A-Z]:/Program Files/Microsoft Office"
+ WildDir = "[A-Z]:/Program Files/Mozilla Firefox"
+ WildDir = "[A-Z]:/Program Files/Mozilla Thunderbird"
+ WildDir = "[A-Z]:/Program Files/mozilla.org"
+ WildDir = "[A-Z]:/Program Files/OpenOffice*"
+ }
+ File = <@tmpdir@/file-list
+ }
+}
#
#!/bin/sh
#
-# Create two blank tapes
+# Cleanup left over files -- both before and after test run
#
-# mt status output
-# SunOS No Additional Sense
-# FreeBSD Current Driver State: at rest.
-# Linux ONLINE
-# Note Debian has an inferior mt. When no tape is in the
-# drive it waits 2 minutes. When a tape is in the drive, it
-# prints user unfriendly output.
-#
+. scripts/functions
+
+scripts/cleanup
-OS=`uname`
-case ${OS} in
- SunOS)
- ready="No Additional Sense"
- ;;
- FreeBSD)
- ready="Current Driver State: at rest."
- ;;
- Linux)
- if test -e /etc/debian_version ; then
- ready="drive status"
- else
- ready="ONLINE"
- fi
- ;;
-esac
+if test x@autochanger@ != x/dev/null; then
+ slot=`bin/mtx-changer @autochanger@ loaded 0 dummy $DRIVE1`
+ if test "x${slot}" != "x$SLOT2"; then
+ bin/mtx-changer @autochanger@ unload $slot @tape_drive@ $DRIVE1
+ bin/mtx-changer @autochanger@ load $SLOT2 @tape_drive@ $DRIVE1
+ fi
+ mt -f @tape_drive@ rewind
+ mt -f @tape_drive@ weof
+fi
-wait_for_drive() {
- i=0
- while [ $i -le 300 ]; do # Wait max 300 seconds
- if mt -f $1 status 2>&1 | grep "${ready}" >/dev/null 2>&1; then
- break
- fi
-# debug "Device $1 - not ready, retrying..."
- sleep 1
- i=`expr $i + 1`
- done
-}
#
-# mt -f @tape_drive@ offline
-@changer_path@ -f @autochanger@ unload
-@changer_path@ -f @autochanger@ load 1
-wait_for_drive @tape_drive@
-mt -f @tape_drive@ rewind
-mt -f @tape_drive@ weof
-@changer_path@ -f @autochanger@ unload
-@changer_path@ -f @autochanger@ load 2
-wait_for_drive @tape_drive@
+# If we have an autochanger always load tape in slot 1
+#
+if test x@autochanger@ != x/dev/null; then
+ slot=`bin/mtx-changer @autochanger@ loaded 0 dummy $DRIVE1`
+ if test "x${slot}" != "x$SLOT1"; then
+ bin/mtx-changer @autochanger@ unload $slot @tape_drive@ $DRIVE1
+ bin/mtx-changer @autochanger@ load $SLOT1 @tape_drive@ $DRIVE1
+ fi
+fi
+
mt -f @tape_drive@ rewind
mt -f @tape_drive@ weof
-#@changer_path@ -f @autochanger@ unload
echo " !!!!! Restored files differ !!!!! " >>test.out
fi
echo " "
+ exit 1
else
echo " ===== bsr-opt-test Bacula source OK `date +%R:%S` ===== "
echo " ===== bsr-opt-test OK `date +%R:%S` ===== " >>test.out