Bear with me, this is my first post on any kind of Stack Exchange type of website. I’m working on creating a backup server to store the data from my storage server onto multiple tapes in my tape library. I am still learning Linux, so I need help / recommendations on how to continue. I think I have the right idea though. Here’s my setup: Backup Environment
I have the tape library (Quantum SuperLoader 3, LTO-4, SCSI) connected to an old Dell server. I have a combination of LTO-3 and LTO-4 tapes. I have another server I use for storage running FreeNAS. The storage server and the backup server are both connected to a switch on the 10.x network, and they also have a dedicated ethernet cable connecting the two servers together. The NIC’s on the 10.x network are setup as DHCP getting reservations from pfSense, and the NIC’s connecting the two servers together directly are setup static with IP’s of 20.1 and 20.2. I thought this would be a good way of giving the storage server full read access without affecting bandwidth through the switch, and to keep things more secure. On a separate note, could someone set their IP to 20.1 and get access to all of the files on the storage server? I know in FreeNAS you can restrict certain permissions to select IP’s, but I didn’t see anything in there for restricting to a certain ethernet port.
Anyways, I have been able to move tapes around with mtx and transfer data with tar and the multiple tape flag set. When spanning over multiple tapes, it prompts you to eject one tape and put another in. I have to run a second terminal / screen with the mtx commands to switch the tape, then go back to the original and continue the backup. Is there a way I can detect this and automatically switch to a different tape? Would this be best to do in a shell script or something like Python or some other language? Also, in the tar command, you have to specify the size of the tape. Is there a way I can detect what size tape is in the drive to satisfy that? I didn’t see anything in mt, but I might be missing something.
Any help and knowledge and expertise is appreciated. Thanks!
If it helps, here are some of the commands I have been using:
sudo mount -t nfs 192.168.20.2:/mnt/Storage /home/andrew/FreeNAS/Storage sudo mt -f /dev/st0 status // Check status of drive sudo mtx -f /dev/sg3 load 1 sudo tar -v --create --tape-length=800G --file=/dev/st0 /home/andrew/FreeNAS/Storage/Public sudo mtx -f /dev/sg3 unload 1