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
14 echo "${cwd}/weird-files" >/tmp/file-list
15 bin/bacula stop 2>&1 >/dev/null
17 ./drop_bacula_tables >/dev/null 2>&1
18 ./make_bacula_tables >/dev/null 2>&1
19 ./grant_bacula_privileges 2>&1 >/dev/null
24 echo " === Starting weird filenames test ==="
25 echo " === Starting weird filenames test ===" >>working/log
28 bin/bacula start 2>&1 >/dev/null
29 bin/bconsole -c bin/bconsole.conf <<END_OF_DATA
43 restore where=${cwd}/tmp/bacula-restores select all storage=File
50 bin/bacula stop 2>&1 >/dev/null
51 ${cwd}/bin/testls weird-files >${cwd}/tmp/original
52 cd tmp/bacula-restores${cwd}
53 ${cwd}/bin/testls weird-files >${cwd}/tmp/restored
55 grep "^Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
57 grep "^Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
59 diff ${cwd}/tmp/original ${cwd}/tmp/restored 2>&1 >/dev/null
60 if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
63 echo " !!!!! Weird files test failed!!! !!!!! "
64 echo " !!!!! Weird files test failed!!! !!!!! " >>test.out
67 echo " ===== Weird files test OK ===== "
68 echo " ===== Weird files test OK ===== " >>test.out