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