How To:Delay writing to tape for better tape utilization

From wiki.zmanda.com
Revision as of 15:25, 14 November 2008 by Dustin (talk | contribs) (new stuff)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This article is a part of the How Tos collection.

Old School

If you want to run most of your backups direct to tape, but spool to holding disk on weekends (perhaps nobody is around to swap tapes), use a crontab such as:

0 15 * * 1-5 /usr/local/sbin/amcheck -m daily
45 22 * * 1-5 /usr/local/sbin/amdump daily
45 0 * * 0-1 /usr/local/sbin/amdump daily -o reserve=100 -o tapedev="" -o tpchanger=""

Since the tapechanger's tape drive is /dev/rmt/1n, the weekend override to an empty string("") results in an error message that there is no tape available. The override to tpchanger="" is necessary, because otherwise the tape changer will talk to amanda and tell it that the tape drive is actually 1n. My daily configuration has reserve=15, so the override to 100 causes all the backups to drop back to incremental only. The dumps are automatically flushed to tape with the Monday night backups, with the amanda.conf(5) parameter autoflush.

The days on the crontab entries might initially seem confusing, but the time of day is different, so it works. The weekend runs are just after midnight, but the weekday runs have been moved back to 10:45pm to give them more time to complete. So the "Sunday" run is actually just after midnight on what is then Monday morning. The "Monday" run is 10:45pm Monday evening.

(Thanks to User:Choogendyk)

New School

XXX User:Dustin: Needs expansion

Other languages: [[::How To:Delay writing to tape for better tape utilization|English]] {{#ifexist: {{#if: | | {{#if: | :}}How To:Delay writing to tape for better tape utilization}}/Fr |  • {{#if: |français| [[::How To:Delay writing to tape for better tape utilization/Fr|français]]}}|}}

{{#ifexist: {{#if: | | {{#if: | :}}How To:Delay writing to tape for better tape utilization}}/Zh-cn |  • {{#if: |中文(中国大陆)| [[::How To:Delay writing to tape for better tape utilization/Zh-cn|中文(中国大陆)]]}}|}}


Amanda version 2.6 and later has a parameter, where you can delay the tape writing until enough data has collected on the holdingdisk. See the parameters flush-threshold-dumped and flush-threshold-scheduled in amanda.conf(5).

Assuming the holdingdisk is large enough, you can add the parameter:

 flush-threshold-dumped 100

This will delay the writing to tape until the amount to fill one whole tape has been collected on the holdingdisk.