FAQ:Why does Amanda not append to a tape?

From The Open Source Backup Wiki (Amanda, MySQL Backup, BackupPC)

Jump to: navigation, search

One run of Amanda = one (set of) tapes. Amanda opens the tape device once, writes all the images and filemarks, and closes the device once. Using that sequence, there is no possibility that other programs interrupt the sequence and rewind the tape, without Amanda noticing.

Doing "mt -f /dev/st0 status" could be enough, or even "amcheck daily". Also, an error like a scsi bus reset implies a rewind.

If Amanda would close and reopen the tape drive for each backup image, there is a window of vulnerability that the tape gets rewound accidentally, and the next image will overwrite all the good backups on the tape. And you wouldn't know unless you tried to restore from the tape.

When appending to a tape, there is the possibility that, between the time that Amanda positions to the last image (that already is not really trivial!), and opening the device for writing, a tape rewind happens, and in that case Amanda would happily erase ALL of the tape, containing possibly many days worth of backup.

Even a vtape (virtual tape emulated on disk) has that problem: a scsi bus reset does not rewind the vtape, but you still can mess with amcheck or ammt, or you are running amrecover to restore a file using the chg-disk changer from the level 0, while the backup is still running and you forgot that while hunting to find the tape with the right label, it rewinds each tape. (But on vtapes you care less about the not-used space at the end of a vtape anyway.)

Until someone can create a patch that gives enough confidence that such a sequence cannot happen, many experienced sysadmins will stay with one run = one (set of) tapes.

When you have indeed grossly over sized the tape drive, and there is no budget anymore to buy more cartridges because all the money went into the expensive tape drive, then there also a plan B.

Buy a large holding disk instead. Set the default "reserve 100" parameter in amanda.conf to something less, like 30, and set the parameter "autoflush true" as well. Do not insert a tape for a few days and let Amanda collect the backups on the holding disk. When you believe the accumulated backup images on the holding disk will fill a tape, insert a tape, and run amflush, or just let Amanda autoflush the collected images, together with the backup of that night to tape.

But first ask yourself, "If my data is worth so little that I can not afford a few more tapes, why am I backing it up?"

Note

Most of the time it won't be YOU paying for the tapes as you may be working for some company. If your boss tries to force you into doing this multiple-dumps-on-one-tape thing, be sure to point him at this risk. Business people tend to understand the price-difference between some tapes and a major data-loss. -- Stefan G. Weichinger

Personal tools