3 # Copyright (C) 2000-2017 Kern Sibbald
4 # License: BSD 2-Clause; see file LICENSE-FOSS
6 # Test and setup the Client Initiated Backup
8 TestName="remote-console-test"
15 change_jobname BackupClient1 $JobName
18 $bperl -e 'add_attribute("$conf/bacula-dir.conf", "Address", "0.0.0.0", "Client")'
19 $bperl -e 'add_attribute("$conf/bacula-dir.conf", "MaximumBandwidthPerJob", "1mb/s", "Client")'
20 $bperl -e 'extract_resource("$conf/bconsole.conf", "Director")' | sed 's/Director/Console/' > $tmp/1
21 cat $tmp/1 >> $conf/bacula-fd.conf
22 pass=`grep -i password $tmp/1`
23 name=`grep -i name $tmp/1`
25 cat <<EOF >> $conf/bacula-dir.conf
29 CommandAcl = run, .api, restore, wait, status, .status, .jobs, .clients, .storages, .pools, .filesets, .defaults
42 cat <<EOF >> $conf/bacula-fd.conf
45 Password = "oi3deith3peeGho4"
50 FDPORT=`expr $BASEPORT + 1`
52 cat <<EOF > $tmp/bconsole-remote.conf
62 Director = remote-cons
63 Password = "oi3deith3peeGho4"
67 cat <<END_OF_DATA >$tmp/bconcmds
71 label volume=TestVolume001 storage=File1 pool=File slot=1 drive=0
77 echo -e "proxy\n.status dir header api=2 api_opts=" | $bin/bconsole -c $tmp/bconsole-remote.conf
78 echo -e ".status header api=2 api_opts=" | $bin/bconsole -c $tmp/bconsole-remote.conf
79 echo -e "proxy\nrun job=backup level=full yes" | $bin/bconsole -c $tmp/bconsole-remote.conf
81 cat <<END_OF_DATA >$tmp/bconcmds
93 if test "$debug" -eq 1 ; then
94 echo -e "proxy\nrestore select all done yes" | $bin/bconsole -c $tmp/bconsole-remote.conf
96 echo -e "proxy\nrestore select all done yes" | $bin/bconsole -c $tmp/bconsole-remote.conf >/dev/null 2>&1
99 sed -i 's/log1.out/log2.out/' $tmp/bconcmds
102 check_for_zombie_jobs storage=File1