Tape backup script for Solaris 9 or 10

On occasion, someone asks for a copy of my tape backup script for Solaris (9 and 10).  I use pieces of it for reference when answering questions about fssnap, ufsdump, ssh piping, and remote tape drives. So I decided to make it available. Please understand that it is as-is and unsupported. I wouldn’t even go so far as to call it open source, although it is free and you can see the source. Let’s just call it a pretty good working example. I call it tapewriter.

I have been using ufsdump on Solaris for around 10 years, and have written scripts to manage it a couple of times. This script was intended to be more automated (run regularly off cron), only requiring someone to make sure the tapes were mounted when needed and to configure tapewriter.conf to define what needed to be backed up and when. It is very specific to Solaris. It was developed on Solaris 9 and then adapted to Solaris 10. It is a single server script. It doesn’t try to do anything more than just back up the server it is running on, although it will use a remote tape drive if necessary.

I wrote tapewriter in early 2006 and made periodic modifications to refine it and to deal with situations that caused it to fail. It worked rather nicely. However, it is still a lot of work managing tapes in multiple locations for multiple servers, all independent and inadequate for increasing disk capacities. Most of our now older Sun servers have built in dds/3 tape drives. The main servers were constantly running off the ends of tapes. We had to frequently juggle which partitions were grouped together so that they would fit on a tape. Actually, this is not an uncommon issue even with substantial commercial and open source backup applications.

We eventually got a tape library with much higher capacity and attached it to a server that could act as a backup server. At that point I tossed my script and adopted Amanda. I’ve been incredibly happy with Amanda, and it solved all the bothersome details of handling tapes and dealing with tape capacity and everything else. Check out my earlier post titled “Ten Things I Like About Amanda.”

So, if you have an isolated server, with access to a single tape drive, and you either don’t want to or can’t build and implement an open source solution like Amanda, then this script might be of some use to you. I still have a couple of isolated servers that use it, and I’ve used it to do backups while building a new server, before it reached the point of setting it up with Amanda.

The necessary files are linked below. Note that the web authoring environment used by UMass munged the file names (removing extra dots in the names) and wouldn’t let me upload something that I called a shell script. So all these files all have .txt extensions. You should rename them so that they are properly tapewriter, tapewriter.conf, INSTALL, tapewriter.1, and tapewriter.conf.5. After downloading tapewriter.conf, you should probably check and see that there are tabs between the fields and that they didn’t get munged into a sequence of spaces.

tapewriter

tapewriter.conf

install

tapewriter.1

tapewriter.conf.5

Leave a Reply

Your email address will not be published. Required fields are marked *