Sean’s Obsessions

Sean Walberg’s blog

Reordering Tapes in AMANDA

AMANDA has been my favourite Unix backup solution since I was first introduced in 1998. After rebuilding my workstation (which hosted the tape drive), I started reusing my old tapes. Somehow the tapes got out of order, so I ended up with a weird sequence like 1,2,4,7,11,…

I finally got annoyed enough to do something about it. After using tape BackupSet204 from BackupSet2 I was prompted to put in BackupSet207 for the next run.

$ amadmin BackupSet2 tape
The next Amanda run should go onto tape BackupSet207 or a new tape.

To make BackupSet205 the next tape, remove it from the pool, forcing the next tape to be a new tape:

$ amrmtape BackupSet2 BackupSet205
amrmtape: remove label BackupSet205.
Warning: no curinfo record for mythupstairs:/etc
amrmtape: preserving original database in curinfo.orig.26763 (exported).
Discarding Host: bob, Disk: /home, Level: 2
Discarding Host: bob, Disk: /home, Level: 3
Discarding Host: poochie, Disk: /dev/Volume00/LogVol02, Level: 2
Discarding Host: poochie, Disk: /dev/Volume00/LogVol02, Level: 3
-bash-2.05b$ amadmin BackupSet2 tape
The next Amanda run should go onto a new tape.

Now I just do this whenever I’m prompted for the wrong tape, and soon, I’ll be back in order.

This also points out that if you’re expanding your pool, do it when you’re at the last tape. Otherwise, your new tapes will be inserted in the middle!

Comments

I’m trying something new here. Talk to me on Twitter with the button above, please.