]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/migration-test
Update
[bacula/bacula] / regress / tests / migration-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-test"
9 JobName=MigrationSave
10 . scripts/functions
11 set_debug 1
12
13 . config.out
14
15 scripts/cleanup
16 scripts/copy-migration-confs
17 scripts/prepare-two-disks
18 echo "${cwd}/build" >/tmp/file-list
19
20 change_jobname NightlySave $JobName
21 start_test
22
23 #
24 # Note, we first backup into Pool Default, then Migrate into
25 #  Pool Full.  Pool Default uses Storage=File
26 #              Pool Full    uses Storage=DiskChanger
27
28 # Write out bconsole commands
29 cat <<END_OF_DATA >tmp/bconcmds
30 @$out /dev/null
31 messages
32 @$out tmp/log1.out
33 label storage=File volume=FileVolume001 Pool=Default
34 label storage=DiskChanger volume=ChangerVolume001 slot=1 Pool=Full drive=0
35 label storage=DiskChanger volume=ChangerVolume002 slot=2 Pool=Full drive=0
36 list volumes
37 run job=$JobName yes
38 list volumes
39 run job=migrate
40 list volumes
41 @# 
42 @# now do a restore
43 @#
44 @$out tmp/log2.out
45 restore where=${cwd}/tmp/bacula-restores select storage=DiskChanger
46 unmark *
47 mark *
48 done
49 yes
50 wait
51 messages
52 @output
53 quit
54 END_OF_DATA
55
56 run_bacula
57 check_for_zombie_jobs storage=File
58 stop_bacula
59
60 check_two_logs
61 check_restore_diff
62 end_test