3 # Run a simple backup of the Bacula build directory
6 if test ! -d weird-files ; then
8 echo "weird files not configured. Test not run."
12 scripts/copy-test-confs
15 cp -Rp weird-files weird-files2
16 echo "${cwd}/weird-files2" >/tmp/file-list
20 echo " === Starting weird filenames2 test at `date +%R:%S` ==="
21 echo " === Starting weird filenames2 test at `date +%R:%S` ===" >>working/log
24 bin/testls weird-files2 >${cwd}/tmp/original
26 # bin/bacula start 2>&1 >/dev/null
27 bin/bconsole -c bin/bconsole.conf <<END_OF_DATA
31 label storage=File volume=TestVolume001
32 run job=NightlySave yes
38 scripts/check_for_zombie_jobs storage=File
40 # Now mess up the a hard link, and a soft link
44 ln hard-file3 hard-file2
46 ln -s soft-file3 soft-file2
48 bin/bconsole -c bin/bconsole.conf <<END_OF_DATA
55 restore where= storage=File
66 scripts/check_for_zombie_jobs storage=File
67 bin/bacula stop 2>&1 >/dev/null
68 bin/testls weird-files2 >${cwd}/tmp/restored
69 grep "^ Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
71 grep "^ Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
73 diff ${cwd}/tmp/original ${cwd}/tmp/restored 2>&1 >/dev/null
74 if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
77 echo " !!!!! Weird files2 test failed!!! !!!!! "
78 echo " !!!!! Weird files2 test failed!!! !!!!! " >>test.out
79 if [ $bstat != 0 -o $rstat != 0 ] ; then
80 echo " !!!!! Bad Job termination status !!!!! "
81 echo " !!!!! Bad Job termination status !!!!! " >>test.out
83 echo " !!!!! Restored files differ !!!!! "
84 echo " !!!!! Restored files differ !!!!! " >>test.out
88 echo " ===== Weird files2 test OK ===== "
89 echo " ===== Weird files2 test OK ===== " >>test.out