1AMANDA-ARCHIVE-FOR(5)    File formats and conventions    AMANDA-ARCHIVE-FOR(5)
2
3
4

NAME

6       amanda-archive-format - Format of amanda archive streams
7

DESCRIPTION

9       The Amanda archive format is designed to be a simple, efficient means
10       of interleaving multiple simultaneous files, allowing an arbitrary
11       number of data streams for a file. It is a streaming format in the
12       sense that the writer need not know the size of files until they are
13       completely written to the archive, and the reader can process the
14       archive in constant space.
15

DATA MODEL

17       The data stored in an archive consists of an unlimited number of files.
18       Each file consists of a number of "attributes", each identified by a
19       16-bit ID. Each attribute can contain an unlimited amount of data.
20
21       Attribute IDs less than 16 (AMAR_ATTR_APP_START) are reserved for
22       special purposes, but the remaining IDs are available for
23       application-specific uses.
24

STRUCTURE

26   RECORDS
27       A record can be either a header record or a data record. A header
28       record serves as a "checkpoint" in the file, with a magic value that
29       can be used to recognize archive files.
30
31       A header record has a fixed size of 28 bytes, as follows:
32
33         28 bytes:    magic string
34       The magic string is the ASCII text "AMANDA ARCHIVE FORMAT " followed by
35       a decimal representation of the format version number (currently '1'),
36       padded to 28 bytes with NUL bytes.
37
38       A data record has a variable size, as follows:
39
40         2 bytes:     file number
41         2 bytes:     attribute ID
42         4 bytes:     data size (N)
43         N bytes:     data
44       The file number and attribute ID serve to identify the data stream to
45       which this data belongs. The low 31 bits of the data size give the
46       number of data bytes following, while the high bit (the EOA bit)
47       indicates the end of the attribute, as described below. Because records
48       are generally read into memory in their entirety, the data size must
49       not exceed 4MB (4194304 bytes). All integers are in network byte order.
50
51       A header record is distinguished from a data record by the magic
52       string. The file number 0x414d, corresponding to the characters "AM",
53       is forbidden and must be skipped on writing.
54
55       Attribute ID 0 (AMAR_ATTR_FILENAME) gives the filename of a file. This
56       attribute is mandatory for each file, must be nonempty, must fit in a
57       single record, and must precede any other attributes for the same file
58       in the archive. The filename should be a printable string (ASCII or
59       UTF-8), to facilitate use of generic archive-display utilities, but the
60       format permits any nonempty bytestring. The filename cannot span
61       multiple records.
62
63       Attribute ID 1 (AMAR_ATTR_EOF) signals the end of a file. This
64       attribute must contain no data, but should have the EOA bit set.
65
66   CONNECTION TO DATA MODEL
67       Each file in an archive is assigned a file number distinct from any
68       other active file in the archive. The first record for a file must have
69       attribute ID 0 (AMAR_ATTR_FILENAME), indicating a filename. A file ends
70       with an empty record with ID 1 (AMAR_ATTR_EOF). For every file at which
71       a reader might want to begin reading, the filename record should be
72       preceded by a header record. How often to write header records is left
73       to the discretion of the application.
74
75       All data records with the same file number and attribute ID are
76       considered a part of the same attribute. The boundaries between such
77       records are not significant to the contents of the attribute, and both
78       readers and writers are free to alter such boundaries as necessary.
79
80       The final data record for each attribute has the high bit (the EOA bit)
81       of its data size field set. A writer must not reuse an attribute ID
82       within a file. An attribute may be terminated by a record containing
83       both data and an EOA bit, or by a zero-length record with its EOA bit
84       set.
85

SEE ALSO

87       amanda(8), amanda(8)
88
89       The Amanda Wiki: : http://wiki.zmanda.com/
90

AUTHOR

92       Dustin J. Mitchell <dustin@zmanda.com>
93           Zmanda, Inc. (http://www.zmanda.com)
94
95
96
97Amanda 3.5.4                      07/27/2023             AMANDA-ARCHIVE-FOR(5)
Impressum