Archive Tape

Warning: the following is just my own personal documentation that I chose to make public, may not be %100 correct or clear.


To archive the backups, I have a dedicated server that controls the tape library. The server is running centos.


The archive starts on the backup server via a cron job. The cronjob issues a backpack scripts that tars the latest backups. The archives are placed on the nas. The archives are split into segments that will fit onto a lto3 cartridge. after the archive is done, backuppc will execute a scripts that will execute a script on the tape server. This script must be executed to run in the background. If it is not ran in the background, it hangs. It is an issue with the way that backuppc executes the command.


The script on the tape server scans the tape library for tape barcodes that start with a specific string. Then the scripts scans the archive folder on the nas. It looks for archives that can be grouped onto one tape cartridge. Then it creates text files for each tape that will be used. The name of the text file will be the same as the barcode on the tape. This file will contain all of the archives that are going to be written to that tape. Then it all gets written to the tapes.



First step is to make an archive host.

Go to the backuppc

Then go to Edit Hosts.

Add a host.

In the host field, type whatever you want to name it. It should not be an ip address. I named it archive.

I left the user field blank, it won’t matter.


Now click the drop down menu and select archive (or whatever name you chose).

Then go to Edit Config.

Change client timeout to 259200.

Then enter the following into the ArchivePostUserCmd  field.

Hit save.


Go to the Xfer tab.

Change XferMethod to archive.

change ArchiveDest to /mnt/backup/archive

change ArchiveSplit to /mnt/backup/archive


For some reason, I had problems with the archive splitting and had to change ArchiveClientCmd to:

Hit save.

Open up a terminal to the backup server and su to backuppc user.

then make the folder that will store the archives.

Now we need to copy the ssh key to the tape server.


Then place the following script into /mnt/backup/archive



While we are here, lets add the cron job. This cron job will run every tuesday night.

First, type exit to go back to root (assuming you logged on as root).

then add the following line to crontab.


Now open up a terminal to the tape server and place the folder /home/scripts/.



Categories: Software