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="etc-test-root"
15 scripts/copy-test-confs
16 echo "/etc" >${cwd}/tmp/file-list
20 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
23 @$out ${cwd}/tmp/log1.out
33 @$out ${cwd}/tmp/log2.out
34 restore where=${cwd}/tmp/bacula-restores select
45 check_for_zombie_jobs storage=File
48 # more cleanup needed below
51 ${cwd}/bin/testls -e ${cwd}/scripts/exclude-etc-test etc >${cwd}/tmp/1
52 cd ${cwd}/tmp/bacula-restores
53 ${cwd}/bin/testls -e ${cwd}/scripts/exclude-etc-test etc >${cwd}/tmp/2
54 sort <${cwd}/tmp/1 >${cwd}/tmp/original
55 sort <${cwd}/tmp/2 >${cwd}/tmp/restored
56 rm -f ${cwd}/tmp/1 ${cwd}/tmp/2
58 diff ${cwd}/tmp/original ${cwd}/tmp/restored 2>&1 1>/dev/null
62 echo " ===== !!!! etc-test-root failed !!!! ===== "
63 echo " ===== !!!! etc-test-root failed !!!! ===== " >>test.out
66 echo " ===== etc-test-root OK ===== "
67 echo " ===== etc-test-root OK ===== " >>test.out