RAIT with only two drives, creates a perfect copy of the data: a mirror of your backup.Each of these mirrors is be
handled by its own output driver: one of the mirrors can write to a real tape device, and the other mirror can write
a virtual tape (vtape) using the "file" driver. The vtapes can be used for fast recovery, and the tapes can be stored offsite.
Together with the "chg-multi" changer, which is suitable for a whole range of applications, this setup requires these parameters in amanda.conf (the parameters dumpcycle, runspercycle and tapecycle should be adapted to your environment):
org "zmanda" # your organization name for reports mailto "root@localhost" # space separated list of operators at your site dumpcycle 1 week # the number of days in the normal dump cycle runspercycle 5 # the number of amdump runs in dumpcycle days # (4 weeks * 5 amdump runs per week -- just weekdays) tapecycle 25 tapes # the number of tapes in rotation # 4 weeks (dumpcycle) times 5 tapes per week (just # the weekdays) plus a few to handle errors that # need amflush and so we do not overwrite the full # backups performed at the beginning of the previous # cycle #runtapes 1 # number of tapes to be used in a single run of amdump tpchanger "chg-multi" # the tape-changer glue script #tapedev "file://var/lib/amanda/vtapes/DailySet1" # the no-rewind tape device to be used changerfile "/etc/amanda/DailySet1/chg-multi-mirror.conf" #changerdev "/dev/null" tapetype DLT # what kind of tape it is #labelstr "^rait-[0-9][0-9]*$" # label constraint regex: all tapes must match dtimeout 1800 # number of idle seconds before a dump is aborted. ctimeout 30 # maximum number of seconds that amcheck waits # for each client host etimeout 300 # number of seconds per filesystem for estimates. includefile "./advanced.conf" includefile "/etc/amanda/template.d/dumptypes" includefile "/etc/amanda/template.d/tapetypes"
We create the file chg-multi-mirror.conf in the same directory, with these contents:
multieject 0 needeject 0 gravity 0 ejectdelay 0 statefile /etc/amanda/DailySet1/changerstatus firstslot 1 lastslot 5 slot 1 rait:{file:/var/lib/amanda/vtapes/DailySet1/vtape1,tape:/dev/nst0} slot 2 rait:{file:/var/lib/amanda/vtapes/DailySet1/vtape2,tape:/dev/nst0} slot 3 rait:{file:/var/lib/amanda/vtapes/DailySet1/vtape3,tape:/dev/nst0} slot 4 rait:{file:/var/lib/amanda/vtapes/DailySet1/vtape4,tape:/dev/nst0} slot 5 rait:{file:/var/lib/amanda/vtapes/DailySet1/vtape5,tape:/dev/nst0}
This assumes we have only 1 tapedrive (/dev/nst0), which we need to manually change the tape each day.
RAIT with a real tape changer is not supported.
We create the 5 virtual tapes:
$ for i in 1 2 3 4 5; do mkdir -p /var/lib/amanda/vtapes/DailySet1/vtape$i/data; done
We insert a tape in the physical tapedrive, and label the first tape. This will label both the virtual tape vtape1 and the tape in the physical drive identically:
$ amlabel daily DAILY-01 slot 1
$ amcheck daily