How To:Build a Test Environment With Virtual Tapes
Here is a Quick Setup for a test configuration with a virtual tape changer, emulating tapes on disk.
A test environment is very handy to experiment with the more obscure features of amanda, or get more familiar with all the possible options in amanda.conf and the dumptype options. And you can practice restores quickly.
Let's call the configuration "test".
Adapt the paths used in the example below to suit your environment.
Create the virtual tapes:
# mkdir /space/vtapes # chown amanda:disk /space/vtapes # su - amanda $ mkdir -p /space/vtapes/test/slots $ cd /space/vtapes/test/slots $ for i in 1 2 3 4 5; do mkdir slot$1; done $ ln -s slot1 data
In the above: create as many slots as you have specified "tapecycle" in the amanda.conf. (Do not add a leading zero to the numbers.)
Quick test to verify a virtual tape really works:
$ ammt -f file:/space/vtapes/test/slots status
In amanda.conf we configure a virtual changer than uses these virtual tapes:
tpchanger "chg-disk" tapedev "file:/space/vtapes/test/slots" changerfile "/home/amanda/test/changerfile"
Then label the tapes:
$ for i in 1 2 3 4 5; do amlabel test Test-$i slot $i; done
And reset the changer to the first slot again:
$ amtape test reset
Now configure amanda.conf for the test environment
todo...
And a small disklist.
todo...
And you're ready for the first amdump/amflush.