date and time created 91/03/22 14:06:13 by bostic
[unix-history] / usr / src / share / man / man5 / dump.5
CommitLineData
c1a5bd81
KM
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.\"
18ae936d 5.\" @(#)dump.5 6.2 (Berkeley) %G%
c1a5bd81 6.\"
d051124a 7.TH DUMP 5 ""
c1a5bd81
KM
8.UC 4
9.SH NAME
deef181c 10dump, dumpdates \- incremental dump format
c1a5bd81
KM
11.SH SYNOPSIS
12.B #include <sys/types.h>
13.br
deef181c 14.B #include <sys/inode.h>
c1a5bd81 15.br
18ae936d 16.B #include <protocols/dumprestore.h>
c1a5bd81
KM
17.SH DESCRIPTION
18Tapes used by
19.I dump
20and
deef181c 21.IR restore (8)
c1a5bd81
KM
22contain:
23.nf
24.IP ""
25a header record
26two groups of bit map records
27a group of records describing directories
28a group of records describing files
29.fi
30.PP
31The format of the header record and of the first
32record of each description as given in the
33include file
18ae936d 34.I <protocols/dumprestore.h>
c1a5bd81
KM
35is:
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
51struct 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
65struct 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
deef181c 76NTREC is the number of 1024 byte records in a physical
c1a5bd81 77tape block.
deef181c
KM
78MLEN is the number of bits in a bit map word.
79MSIZ is the number of bit map words.
c1a5bd81
KM
80.PP
81The
deef181c 82TS_ entries are used in the
c1a5bd81
KM
83.I c_type
84field to indicate what sort of header
85this is.
86The types and their meanings are as follows:
87.TP 13
88TS_TAPE
89Tape volume label
90.PD 0
91.TP
92TS_INODE
93A file or directory follows.
94The
95.I c_dinode
96field is a copy of the disk inode and contains
97bits telling what sort of file this is.
98.TP
99TS_BITS
100A bit map follows.
101This bit map has a one bit
102for each inode that was dumped.
103.TP
104TS_ADDR
105A subrecord of a file description.
106See
107.I c_addr
108below.
109.TP
110TS_END
111End of tape record.
112.TP
113TS_CLRI
114A bit map follows.
115This bit map contains a zero bit for
116all inodes that were empty on the file system when dumped.
117.TP
118MAGIC
119All header records have this number in
120.I c_magic.
121.TP
122CHECKSUM
123Header records checksum to this value.
124.PD
125.PP
126The fields of the header structure are as follows:
127.TP 13
128c_type
129The type of the header.
130.PD 0
131.TP
132c_date
133The date the dump was taken.
134.TP
135c_ddate
136The date the file system was dumped from.
137.TP
138c_volume
139The current volume number of the dump.
140.TP
141c_tapea
142The current number of this (1024-byte) record.
143.TP
144c_inumber
145The number of the inode being dumped if this
deef181c 146is of type TS_INODE.
c1a5bd81
KM
147.TP
148c_magic
deef181c 149This contains the value MAGIC
c1a5bd81
KM
150above, truncated as needed.
151.TP
152c_checksum
153This contains whatever value is needed to
deef181c 154make the record sum to CHECKSUM.
c1a5bd81
KM
155.TP
156c_dinode
157This is a copy of the inode as it appears on the
158file system; see
deef181c 159.IR fs (5).
c1a5bd81
KM
160.TP
161c_count
162The count of characters in
163.I c_addr.
164.TP
165c_addr
166An array of characters describing the blocks of the
167dumped file.
168A character is zero if the block associated with that character was not
169present on the file system, otherwise the character is non-zero.
170If the block was not present on the file system, no block was dumped;
171the block will be restored as a hole in the file.
172If there is not sufficient space in this record to describe
deef181c 173all of the blocks in a file, TS_ADDR
c1a5bd81
KM
174records will be scattered through the file, each one
175picking up where the last left off.
176.PD
177.PP
178Each volume except the last ends with a tapemark (read as an end
179of file).
deef181c 180The last volume ends with a TS_END
c1a5bd81
KM
181record and then the tapemark.
182.PP
183The structure
184.I idates
deef181c
KM
185describes an entry in the file
186.I /etc/dumpdates
c1a5bd81
KM
187where dump history is kept.
188The fields of the structure are:
189.TP \w'TS_INODE\ 'u
190id_name
191The dumped filesystem is
192.RI `/dev/ id_nam'.
193.PD 0
194.TP
195id_incno
196The level number of the dump tape;
197see
deef181c 198.IR dump (8).
c1a5bd81
KM
199.TP
200id_ddate
201The date of the incremental dump in system format
202see
203.IR types (5).
204.PD
205.SH FILES
deef181c 206/etc/dumpdates
c1a5bd81 207.SH "SEE ALSO"
deef181c
KM
208dump(8),
209restore(8),
210fs(5),
211types(5)