Backup with linux and Dell TL2000

apt-get install mtx apt-cache search lsscsi apt-get install open-iscsi-utils

lsscsi [2:0:0:0] cd/dvd TSSTcorp DVD+-RW TS-L633J D250 /dev/sr0 [4:0:32:0] enclosu DP BACKPLANE 1.07 - [4:2:0:0] disk DELL PERC H700 2.10 /dev/sda [5:0:0:0] disk iDRAC LCDRIVE 0323 /dev/sdc [6:0:0:0] cd/dvd iDRAC Virtual CD 0323 /dev/sr1 [6:0:0:1] disk iDRAC Virtual Floppy 0323 /dev/sdb [7:0:0:0] tape IBM ULT3580-HH4 C7Q1 /dev/st0

OOOPSSSS!

Small research ( thanks to http://dpk.net/2006/08/30/ibm-ts3200-linux-mtx/) Yes, the library needs to be in random mode to use mtx’s “next” “load” and “unload” commands. Random mode basically means “fully manual” mode, which is exactly what I was hoping to have. Sweet.

change a Library Mode to Random, and:

root@backup:~# lsscsi [2:0:0:0] cd/dvd TSSTcorp DVD+-RW TS-L633J D250 /dev/sr0 [4:0:32:0] enclosu DP BACKPLANE 1.07 - [4:2:0:0] disk DELL PERC H700 2.10 /dev/sda [5:0:0:0] disk iDRAC LCDRIVE 0323 /dev/sdb [6:0:0:0] cd/dvd iDRAC Virtual CD 0323 /dev/sr1 [6:0:0:1] disk iDRAC Virtual Floppy 0323 /dev/sdc [7:0:0:0] tape IBM ULT3580-HH4 C7Q1 /dev/st0 [7:0:0:1] mediumx IBM 3573-TL B.60 /dev/sch0

MIRACLE

root@backup:~# mtx -f /dev/sg7 status Storage Changer /dev/sg7:2 Drives, 24 Slots ( 1 Import/Export ) Data Transfer Element 0:Full (Storage Element 1 Loaded):VolumeTag = ER0078L4 Data Transfer Element 1:Empty Storage Element 1:Empty Storage Element 2:Full :VolumeTag=ER0061L4 Storage Element 3:Full :VolumeTag=ER0074L4 Storage Element 4:Full :VolumeTag=ER0075L4 Storage Element 5:Full :VolumeTag=ER0077L4 Storage Element 6:Full :VolumeTag=ER0080L4 Storage Element 7:Empty Storage Element 8:Empty Storage Element 9:Full :VolumeTag=ER0076L4 Storage Element 10:Full :VolumeTag=ER0079L4 Storage Element 11:Empty Storage Element 12:Full :VolumeTag=ER0064L4 Storage Element 13:Full :VolumeTag=ER0067L4 Storage Element 14:Full :VolumeTag=ER0070L4 Storage Element 15:Full :VolumeTag=ER0073L4 Storage Element 16:Full :VolumeTag=ER0063L4 Storage Element 17:Full :VolumeTag=ER0066L4 Storage Element 18:Full :VolumeTag=ER0069L4 Storage Element 19:Full :VolumeTag=ER0072L4 Storage Element 20:Full :VolumeTag=ER0062L4 Storage Element 21:Full :VolumeTag=ER0065L4 Storage Element 22:Full :VolumeTag=ER0068L4 Storage Element 23:Full :VolumeTag=ER0071L4 Storage Element 24 IMPORT/EXPORT:Empty

mtx -f /dev/sg3 load 1 mtx -f /dev/changer unload mtx -f /dev/changer load 24

test transfer of data to tape:

tar cpvf /dev/st0 ./howto/

table of contents:

tar tzvf /dev/st0

little bit about percona tools

echo "bacula ALL=NOPASSWD: /usr/bin/xtrabackup" > /etc/sudoers.d/bacula chmod 440 /etc/sudoers.d/bacula

apt-key adv --keyserver keys.gnupg.net --recv-keys 1C4CBDCDCD2EFD2A echo "deb http://repo.percona.com/apt precise main" >> /etc/apt/sources.list apt-get update apt-get install

http://www.cyberciti.biz/faq/linux-tape-backup-with-mt-and-tar-command-howto/ http://idolinux.blogspot.sg/2008/09/amanda-tape-library-backup.html http://www.damtp.cam.ac.uk/internal/computing/docs/public/TL2000powervaulttapelibrary.html http://www.percona.com/doc/percona-xtrabackup/2.1/installation/aptrepo.html http://habrahabr.ru/post/86526/ http://ru.wikipedia.org/wiki/Bacula