15 # How to use this test
16 # --------------------
19 TestName="remote-fd-test"
24 scripts/copy-test-confs
26 change_jobname NightlySave $JobName
27 change_jobname MonsterSave AccurateTest
31 echo $REMOTE_FILE/save > $tmp/file-list
33 ssh $REMOTE_ADDR test -x /opt/bacula/bin/bacula-fd
35 print_debug "ERROR: Need to install bacula on $REMOTE_ADDR"
36 echo "ERROR: Need to install bacula on $REMOTE_ADDR"
42 $bperl -e remote_config
43 cfg=$conf/bacula-dir.conf
44 $bperl -e "add_attribute('$cfg', 'clientrunbeforejob', '$REMOTE_FILE/save/test.sh', 'Job', 'CompressedTest')"
45 $bperl -e "add_attribute('$cfg', 'accurate', 'yes', 'Job', 'AccurateTest')"
46 $bperl -e "add_attribute('$cfg', 'address', '$REMOTE_ADDR', 'Client')"
47 $bperl -e "add_attribute('$cfg', 'password', '$REMOTE_PASSWORD', 'Client')"
48 $bperl -e "add_attribute('$cfg', 'address', '$REMOTE_STORE_ADDR', 'Storage')"
50 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
53 @$out ${cwd}/tmp/log4.out
55 @$out ${cwd}/tmp/log1.out
56 label storage=File volume=TestVolume001
57 run job=$JobName storage=File yes
63 @$out ${cwd}/tmp/log2.out
64 restore where=$REMOTE_FILE/restore select all done storage=File
68 @$out ${cwd}/tmp/log3.out
70 @# make some runscript tests
72 run job=CompressedTest storage=File yes
75 @$out ${cwd}/tmp/log1.out
77 @# make some accurate tests
79 run job=AccurateTest storage=File yes
82 run job=AccurateTest storage=File yes
90 check_for_zombie_jobs storage=File
95 version=`$bin/bacula-dir -? | awk '/Version:/ { print $2 }'`
96 version_fd=`awk '/Version:/ { print $3 }' $tmp/log4.out`
98 if [ "$version" != "$version_fd" ]; then
99 print_debug "ERROR: client version doesn't match $version ($version_fd)"
103 grep 'this is a script' $tmp/log3.out > /dev/null
105 print_debug "ERROR: Can't find runscript output"
109 $bperl -e remote_diff
114 $bperl -e remote_stop