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
16 bin/drop_sqlite_tables
17 bin/make_sqlite_tables
21 echo " === Starting weird filenames test ==="
22 echo " === Starting weird filenames test ===" >>working/log
25 bin/bacula start 2>&1 >/dev/null
26 bin/console -c bin/console.conf <<END_OF_DATA
40 restore where=${cwd}/tmp/bacula-restores current all
47 bin/bacula stop 2>&1 >/dev/null
48 ${cwd}/bin/testls weird-files >${cwd}/tmp/original
49 cd tmp/bacula-restores${cwd}
50 ${cwd}/bin/testls weird-files >${cwd}/tmp/restored
52 grep "^Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
54 grep "^Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
56 diff ${cwd}/tmp/original ${cwd}/tmp/restored 2>&1 >/dev/null
57 if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
60 echo " !!!!! Weird files test failed!!! !!!!! "
61 echo " !!!!! Weird files test failed!!! !!!!! " >>test.out
64 echo " ===== Weird files test OK ===== "
65 echo " ===== Weird files test OK ===== " >>test.out