]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/backup-win32-tape
baculum: Add module to check resource dependencies
[bacula/bacula] / regress / tests / backup-win32-tape
1 #!/bin/sh
2 #
3 # Copyright (C) 2000-2015 Kern Sibbald
4 # License: BSD 2-Clause; see file LICENSE-FOSS
5 #
6
7 #
8 # Run a simple backup of the Bacula build directory 
9 #   to a tape then restore it, we do that twice to ensure that
10 #   we can correctly append to a tape.
11 #
12 TestName="backup-win32-tape"
13 JobName=backupwintape
14 . scripts/functions
15
16 require_tape_drive_drive
17
18 scripts/cleanup-tape
19 scripts/copy-win32-confs
20
21 echo "${cwd}/build" >${cwd}/tmp/file-list
22
23 change_jobname $JobName
24 start_test
25
26
27 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
28 @$out /dev/null
29 messages
30 @$out ${cwd}/tmp/log1.out
31 label storage=tape volume=TestVolume001 slot=0 pool=Default
32 run job=NightlySave yes
33 @sleep 10
34 status storage=tape
35 @sleep 30
36 messages
37 wait
38 messages
39 @# 
40 @# now do a restore
41 @#
42 @$outt ${cwd}/tmp/log2.out
43 @#restore where=${cwd}/tmp/bacula-restores select all storage=tape done
44 @#yes
45 @#wait
46 @#messages
47 END_OF_DATA
48
49 run_bacula
50 check_for_zombie_jobs storage=tape
51 stop_bacula
52
53 check_two_logs
54 check_restore_diff
55 end_test