]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/bsr-read-test
8f6667e33695a13aab625f7b30ecec6e0a4cf7a9
[bacula/bacula] / regress / tests / bsr-read-test
1 #!/bin/sh
2 #
3 # Run a backup of a small file, then do several other backups
4 #   to expand the size of a volume.  Then do a restore of the first
5 #   file, and make sure it does read to the end of the disk.
6 #
7 TestName="bsr-read-test"
8 JobName=bsr-read
9 . scripts/functions
10
11 scripts/cleanup
12 scripts/copy-test-confs
13 echo "${cwd}/build/configure" >${cwd}/tmp/file-list
14
15
16
17 change_jobname CompressedTest $JobName
18 start_test
19
20 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
21 @$out /dev/null
22 messages
23 @$out ${cwd}/tmp/log1.out
24 label storage=File volume=TestVolume001
25 label storage=File volume=TestVolume002
26 update Volume=TestVolume001 maxvolbytes=120000
27 run job=$JobName yes
28 wait
29 messages
30 list jobs
31 @# print the JobMedia records
32 sql
33 select * from JobMedia;
34
35 quit
36 END_OF_DATA
37
38 run_bacula
39 check_for_zombie_jobs storage=File
40 stop_bacula
41
42 echo "${cwd}/build" >${cwd}/tmp/file-list
43
44 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
45 @$out /dev/null
46 messages
47 @$out ${cwd}/tmp/log1.out
48 run job=$JobName level=Full yes
49 wait
50 messages
51 @# 
52 @# now do a restore
53 @#
54 @$out ${cwd}/tmp/log2.out
55 setdebug level=30 fd     
56 setdebug level=500 storage=File
57 sql
58 @# print the JobMedia records
59 select * from JobMedia;
60
61 restore
62 3
63 1
64 mark *
65 done
66 yes
67 wait
68 messages
69 @$out
70 quit
71 END_OF_DATA
72
73 run_bacula
74 check_for_zombie_jobs storage=File
75 stop_bacula
76
77 check_two_logs
78 # check_restore_tmp_build_diff
79 dstat=0
80 end_test