]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/six-vol-test
regress: tweak the message in the update_win32()
[bacula/bacula] / regress / tests / six-vol-test
1 #!/bin/sh
2 #
3 # Create a 60MB file with random bytes. Back it up to 6 Volumes
4 #   each constrained to 10MB using the automatic labeling feature.
5 #
6 TestName="six-vol-test"
7 JobName=SixVol
8 . scripts/functions
9
10 if test ! -c /dev/urandom ; then
11    echo "No random device. Test skipped.\n"
12    exit 0
13 fi
14
15 scripts/cleanup
16 scripts/copy-testa-confs
17 # copy special conf file
18 /bin/cp -f scripts/testb-bacula-dir.conf bin/bacula-dir.conf
19
20 echo "${cwd}/tmp/largefile" >${cwd}/tmp/file-list
21 # Create 56MB file with random data
22 echo "Creating a 56MB file with random data ..."
23 dd if=/dev/urandom of=${cwd}/tmp/largefile bs=1024 count=55000 >/dev/null 2>&1
24 echo "largefile created"
25
26 change_jobname MultiVol $JobName
27 start_test
28
29 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
30 @$out /dev/null
31 messages
32 @$out ${cwd}/tmp/log1.out
33 setdebug level=150 storage=File
34 run job=$JobName storage=File yes
35 run job=$JobName storage=File yes
36 run job=$JobName storage=File yes
37 run job=$JobName storage=File yes
38 run job=$JobName storage=File yes
39 wait
40 list volumes
41 messages
42 @# 
43 @# now do a restore
44 @#
45 @$out ${cwd}/tmp/log2.out
46 sql
47 select * from JobMedia where JobId=4;
48 select * from JobMedia where JobId=5;
49
50 setdebug level=150 storage=File
51 restore where=${cwd}/tmp/bacula-restores select storage=File
52 unmark *
53 mark *
54 done
55 yes
56 wait
57 messages
58 quit
59 END_OF_DATA
60
61 run_bacula
62 check_for_zombie_jobs storage=File
63 stop_bacula
64
65 check_two_logs
66 diff ${cwd}/tmp/largefile  ${cwd}/tmp/bacula-restores${cwd}/tmp/largefile 2>&1 >/dev/null
67 dstat=$?
68 end_test