Backup Server – Amanda – Swapping Tape

Okay, adding a tape/drive is simple… just swap it out with the one currently in the USB caddy. We have a script that helps with this. When you login as you will see this script ( Running it will take you through this process:

Script unmounts the USB drive
You swap the USB Drive
Script mounts the new USB Drive
Script conditions the drive for use
Script runs a check to assure all systems are go.
So… the hardest part is remembering to make the swap. Tape swaps are done on Wednesday’s rather than the traditional Friday because I don’t want to come in to work on a day off However, if you should miss a day or two it’s not a big deal. The system will cache backups on the /holdingdisk/ and flush them to the USB drive once it is available.

But what about first time drives? What do you do with a hard drive that’s not formatted? How are the conditioned to work properly with Amanda? This is the quick and dirty howto:

# Format the Disk - Make one big partition
 fdisk /dev/sdc # Note it may be sdb so check dmesg
 mkfs.ext3 -m 0 -j /dev/sdc1
 mount -a
# Build the directories
 cd /vtape
 mkdir tape
 cd tape
 for slot in `seq 1 7`; do mkdir -p slot$slot; done
 cd /vtape
 chown -R amandabackup:disk tape

Now run amcheck daily from the amandabackup user. If there is an unusually long delay then there is likely a problem in the permissions.


  • HOWTO – Backup Files with Amanda
  • HOWTO – Recover Some files with Amanda
  • HOWTO – Barebones Recover the Amanda Backup Server
  • HOWTO – Restore Entire Systems With Amanda

Search these as needed.

About Jay Farschman - Jay currently works as a Senior Systems Administrator for an asset management company in Colorado where he works with companies that produce hardware, telecommunications software and financial services.  Jay previously owned a consulting company and provided training and consulting services for three Fortune 500 companies and numerous small businesses where he leveraged Linux to provided exceptional value

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>