|
|
1.1 root 1: .\" Copyright (c) 1980 Regents of the University of California.
2: .\" All rights reserved. The Berkeley software License Agreement
3: .\" specifies the terms and conditions for redistribution.
4: .\"
5: .\" @(#)dump.5 6.2 (Berkeley) 6/18/85
6: .\"
7: .TH DUMP 5 "June 18, 1985"
8: .UC 4
9: .SH NAME
10: dump, dumpdates \- incremental dump format
11: .SH SYNOPSIS
12: .B #include <sys/types.h>
13: .br
14: .B #include <sys/inode.h>
15: .br
16: .B #include <protocols/dumprestore.h>
17: .SH DESCRIPTION
18: Tapes used by
19: .I dump
20: and
21: .IR restore (8)
22: contain:
23: .nf
24: .IP ""
25: a header record
26: two groups of bit map records
27: a group of records describing directories
28: a group of records describing files
29: .fi
30: .PP
31: The format of the header record and of the first
32: record of each description as given in the
33: include file
34: .I <protocols/dumprestore.h>
35: is:
36: .PP
37: .nf
38: #define NTREC 10
39: #define MLEN 16
40: #define MSIZ 4096
41:
42: #define TS_TAPE 1
43: #define TS_INODE 2
44: #define TS_BITS 3
45: #define TS_ADDR 4
46: #define TS_END 5
47: #define TS_CLRI 6
48: #define MAGIC (int) 60011
49: #define CHECKSUM (int) 84446
50:
51: struct spcl {
52: int c_type;
53: time_t c_date;
54: time_t c_ddate;
55: int c_volume;
56: daddr_t c_tapea;
57: ino_t c_inumber;
58: int c_magic;
59: int c_checksum;
60: struct dinode c_dinode;
61: int c_count;
62: char c_addr[BSIZE];
63: } spcl;
64:
65: struct idates {
66: char id_name[16];
67: char id_incno;
68: time_t id_ddate;
69: };
70:
71: #define DUMPOUTFMT "%-16s %c %s" /* for printf */
72: /* name, incno, ctime(date) */
73: #define DUMPINFMT "%16s %c %[^\en]\en" /* inverse for scanf */
74: .fi
75: .PP
76: NTREC is the number of 1024 byte records in a physical
77: tape block.
78: MLEN is the number of bits in a bit map word.
79: MSIZ is the number of bit map words.
80: .PP
81: The
82: TS_ entries are used in the
83: .I c_type
84: field to indicate what sort of header
85: this is.
86: The types and their meanings are as follows:
87: .TP 13
88: TS_TAPE
89: Tape volume label
90: .PD 0
91: .TP
92: TS_INODE
93: A file or directory follows.
94: The
95: .I c_dinode
96: field is a copy of the disk inode and contains
97: bits telling what sort of file this is.
98: .TP
99: TS_BITS
100: A bit map follows.
101: This bit map has a one bit
102: for each inode that was dumped.
103: .TP
104: TS_ADDR
105: A subrecord of a file description.
106: See
107: .I c_addr
108: below.
109: .TP
110: TS_END
111: End of tape record.
112: .TP
113: TS_CLRI
114: A bit map follows.
115: This bit map contains a zero bit for
116: all inodes that were empty on the file system when dumped.
117: .TP
118: MAGIC
119: All header records have this number in
120: .I c_magic.
121: .TP
122: CHECKSUM
123: Header records checksum to this value.
124: .PD
125: .PP
126: The fields of the header structure are as follows:
127: .TP 13
128: c_type
129: The type of the header.
130: .PD 0
131: .TP
132: c_date
133: The date the dump was taken.
134: .TP
135: c_ddate
136: The date the file system was dumped from.
137: .TP
138: c_volume
139: The current volume number of the dump.
140: .TP
141: c_tapea
142: The current number of this (1024-byte) record.
143: .TP
144: c_inumber
145: The number of the inode being dumped if this
146: is of type TS_INODE.
147: .TP
148: c_magic
149: This contains the value MAGIC
150: above, truncated as needed.
151: .TP
152: c_checksum
153: This contains whatever value is needed to
154: make the record sum to CHECKSUM.
155: .TP
156: c_dinode
157: This is a copy of the inode as it appears on the
158: file system; see
159: .IR fs (5).
160: .TP
161: c_count
162: The count of characters in
163: .I c_addr.
164: .TP
165: c_addr
166: An array of characters describing the blocks of the
167: dumped file.
168: A character is zero if the block associated with that character was not
169: present on the file system, otherwise the character is non-zero.
170: If the block was not present on the file system, no block was dumped;
171: the block will be restored as a hole in the file.
172: If there is not sufficient space in this record to describe
173: all of the blocks in a file, TS_ADDR
174: records will be scattered through the file, each one
175: picking up where the last left off.
176: .PD
177: .PP
178: Each volume except the last ends with a tapemark (read as an end
179: of file).
180: The last volume ends with a TS_END
181: record and then the tapemark.
182: .PP
183: The structure
184: .I idates
185: describes an entry in the file
186: .I /etc/dumpdates
187: where dump history is kept.
188: The fields of the structure are:
189: .TP \w'TS_INODE\ 'u
190: id_name
191: The dumped filesystem is
192: .RI `/dev/ id_nam'.
193: .PD 0
194: .TP
195: id_incno
196: The level number of the dump tape;
197: see
198: .IR dump (8).
199: .TP
200: id_ddate
201: The date of the incremental dump in system format
202: see
203: .IR types (5).
204: .PD
205: .SH FILES
206: /etc/dumpdates
207: .SH "SEE ALSO"
208: dump(8),
209: restore(8),
210: fs(5),
211: types(5)
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.