Imported Upstream version 3.1.0
[debian/amanda] / ndmp-src / ShakeOut.sh
1 #!/bin/sh
2
3
4 set -v
5
6 #
7 # Show the build info for NDMJOB
8 #
9 ndmjob -v
10
11
12 #
13 # Query the DATA and TAPE agents, force NDMPv2 and NDMv3
14 #
15 ndmjob -q -D./2
16 ndmjob -q -D./3
17
18 ndmjob -q -T./2
19 ndmjob -q -T./3
20
21 # ndmjob -q -Tconexus/2,,
22 # ndmjob -q -Tconexus/3,,
23
24
25 #
26 # Set up FakeTape, a disk file used by the
27 # tape simulator.
28 #
29 rm -f /usr/tmp/FakeTape FakeTape
30 touch /usr/tmp/FakeTape
31 ln -s /usr/tmp/FakeTape FakeTape
32
33
34 #
35 # Test the TAPE agent
36 #
37
38 ndmjob -o test-tape  -T. -fFakeTape -v
39 ndmjob -o test-mover -T. -fFakeTape -v
40
41
42 #
43 # Label the tape, read back
44 #
45 ndmjob -o init-labels -T. -fFakeTape -mMyTape
46 ndmjob -l -T. -fFakeTape
47
48
49 #
50 # Make sure tape label checking is working
51 #
52 ndmjob -c -D. -C /tmp/tough -I so-c.nji -fFakeTape -mMyTapeXXX
53
54 #
55 # Make a backup of the "tough" directory tree
56 #
57 ndmjob -cvv -D. -C /tmp/tough -I so-c.nji -fFakeTape -mMyTape
58 wc so-c.nji
59
60 #
61 # Recover file history using sequential access method
62 #
63 ndmjob -tvv -D. -I so-t-seq.nji -fFakeTape -mMyTape -E DIRECT=No
64 wc so-t-seq.nji
65 diff so-c.nji so-t-seq.nji
66
67 #
68 # Recover file history using direct access method
69 #
70 ndmjob -tvv -D. -I so-t.dir.nji -fFakeTape -mMyTape -E DIRECT=Yes
71 wc sso-t-dir.nji
72 diff so-c.nji so-t-dir.nji
73
74
75 #
76 # Recover entire backup
77 #
78 rm -rf /tmp/tough-x
79 mkdir /tmp/tough-x
80 ndmjob -xvv -D. -C /tmp/tough-x -fFakeTape -mMyTape
81 diff -r /tmp/tough /tmp/tough-x
82