How To:Migrate Virtual Tapes to Real Tapes

Jump to navigation Jump to search

There are times when you want to copy the contents of a vtape to a physical tape, e.g. for offline storage. Some people have even used vtapes on a large disk temporarily while their physical tape drive was in repair. And when the tape drive was connected again, they want to copy the virtual tapes to the real tapes.

Copy file files having pattern  ?????.* to the tape:

$ cd /amandatapes/test/tape1/data
$ mt -t /dev/nst0 rewind
$ mt -t /dev/nst0 blksize 0
$ mt -t /dev/nst0 compression off
$ for f in ?????.*; do dd if=$f of=/dev/nst0 bs=32k; done

The files having pattern  ?????-* are used internally by the file driver, and should not be put on tape.

Note you can also use a RAIT mirror to write a vtape and a physical tape at the same time.


Based on text by Stefan G. Weichinger, November - December, 2003, with updates in April, 2005.