]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/migration-jobspan-test
Tweak correct English in debug output of regress tests
[bacula/bacula] / regress / tests / migration-jobspan-test
1 #!/bin/sh
2 #
3 # Run a simple backup of the Bacula build directory then migrate it
4 #   to another device.
5 #
6 # Test migrating a job that spans two Volumes
7 #
8 # This script uses the virtual disk autochanger
9 #
10 TestName="migration-jobspan-test"
11 JobName=MigrationJobSpanSave
12 . scripts/functions
13
14
15 scripts/cleanup
16 scripts/copy-migration-confs
17 scripts/prepare-disk-changer
18 echo "${cwd}/build" >${cwd}/tmp/file-list
19 cp ${cwd}/bin/bacula-sd.conf ${cwd}/tmp/1
20 sed "s%# Maximum File Size%  Maximum File Size%" ${cwd}/tmp/1 >${cwd}/bin/bacula-sd.conf
21
22
23 change_jobname NightlySave $JobName
24 start_test
25
26 #
27 # Note, we first backup into Pool Default, 
28 #          then Migrate into Pool Full. 
29 #              Pool Default uses Storage=File
30 #              Pool Full    uses Storage=DiskChanger
31
32 # Write out bconsole commands
33 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
34 @output /dev/null
35 messages
36 @$out ${cwd}/tmp/log1.out
37 @#setdebug level=10 dir
38 @#setdebug level=100 storage=File
39 label storage=File volume=FileVolume001 Pool=Default
40 label storage=File volume=FileVolume002 Pool=Default
41 update Volume=FileVolume001 MaxVolBytes=3000000 pool=Default
42 label storage=DiskChanger volume=ChangerVolume001 slot=1 Pool=Full drive=0
43 label storage=DiskChanger volume=ChangerVolume002 slot=2 Pool=Full drive=0
44 list volumes
45 @#
46 run job=$JobName yes
47 @#run job=$JobName yes
48 wait
49 list volumes
50 @#setdebug level=200 dir
51 @# should migrate both Volumes
52 run job=migrate-job yes
53 wait
54 purge volume=FileVolume001
55 purge volume=FileVolume002
56 list volumes
57 list jobs
58 messages
59 wait
60 @# 
61 @# now do a restore
62 @#
63 @$out ${cwd}/tmp/log2.out
64 setdebug level=500 storage=File
65 restore where=${cwd}/tmp/bacula-restores select storage=DiskChanger
66 unmark *
67 mark *
68 done
69 yes
70 wait
71 messages
72 quit
73 END_OF_DATA
74
75 run_bacula
76 check_for_zombie_jobs storage=File
77 stop_bacula
78
79 check_two_logs
80 check_restore_diff
81 end_test