]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/sparse-test
Pull regression truncate-test from Branch-9.1
[bacula/bacula] / regress / tests / sparse-test
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 using the Sparse option
9 #   then restore it.
10 #
11 TestName="sparse-test"
12 JobName=SparseTest
13 . scripts/functions
14
15 scripts/cleanup
16 scripts/copy-test-confs
17 echo "${cwd}/build" >${cwd}/tmp/file-list
18
19 start_test
20
21 cat >${cwd}/tmp/bconcmds <<END_OF_DATA
22 @output /dev/null
23 messages
24 @$out ${cwd}/tmp/log1.out
25 label storage=File volume=TestVolume001
26 run job=$JobName yes
27 wait
28 messages
29 @# 
30 @# now do a restore
31 @#
32 @$out ${cwd}/tmp/log2.out
33 restore where=${cwd}/tmp/bacula-restores select storage=File
34 unmark *
35 mark *
36 done
37 yes
38 wait
39 messages
40 quit
41 END_OF_DATA
42
43 run_bacula
44 check_for_zombie_jobs storage=File 
45 stop_bacula
46
47 check_two_logs
48 check_restore_diff
49 end_test