3 # Copyright (C) 2000-2015 Kern Sibbald
4 # License: BSD 2-Clause; see file LICENSE-FOSS
8 # Run a simple backup of the Bacula build directory
11 TestName="weird-files2-test"
15 if test ! -d weird-files ; then
17 echo "weird files not configured. Test not run."
22 scripts/copy-test-confs
24 cp -Rp weird-files weird-files2
25 echo "${cwd}/weird-files2" >${cwd}/tmp/file-list
27 #perl socket.pl # we no longer restore sockets
30 change_jobname NightlySave $JobName
33 #bin/testls weird-files2 | grep -v sock-file >${cwd}/tmp/original
34 bin/testls weird-files2 >${cwd}/tmp/original
36 cat <<END_OF_DATA >tmp/bconcmds
40 label storage=File volume=TestVolume001
49 check_for_zombie_jobs storage=File
51 # Now mess up the a hard link, and a soft link
55 ln hard-file3 hard-file2
57 ln -s soft-file3 soft-file2
59 cat <<END_OF_DATA >tmp/bconcmds
66 restore where= storage=File
78 check_for_zombie_jobs storage=File
81 bin/testls weird-files2 >${cwd}/tmp/restored
84 diff -u ${cwd}/tmp/original ${cwd}/tmp/restored 2>&1 >/dev/null
85 #diff -u ${cwd}/tmp/original ${cwd}/tmp/restored
87 if test $dstat -ne 0; then
88 diff -u ${cwd}/tmp/original ${cwd}/tmp/restored