Commit | Line | Data |
---|---|---|
0fccfdb8 CL |
1 | .\" Copyright (c) 1980, 1991 Regents of the University of California. |
2 | .\" All rights reserved. | |
89f26d46 | 3 | .\" |
0fccfdb8 | 4 | .\" %sccs.include.redist.man% |
89f26d46 | 5 | .\" |
0fccfdb8 CL |
6 | .\" @(#)dump.8 6.6 (Berkeley) %G% |
7 | .\" | |
8 | .Dd | |
9 | .Dt DUMP 8 | |
10 | .Os BSD 4 | |
11 | .Sh NAME | |
12 | .Nm dump | |
13 | .Nd filesystem backup | |
14 | .Sh SYNOPSIS | |
15 | .Nm dump | |
16 | .Op Cm 0123456789fusdWn Op Ar argument ... | |
17 | .Op Ar filesystem | |
18 | .Sh DESCRIPTION | |
19 | .Nm Dump | |
20 | examines files | |
21 | on a filesystem | |
22 | and determines which files | |
23 | need to be backed up. These files | |
24 | are copied to the given disk, tape or other | |
25 | storage medium for safe keeping (see | |
26 | .Xr rdump 8 | |
27 | for | |
28 | remote backups) . | |
29 | .Pp | |
30 | The following options are supported by | |
31 | .Nm dump: | |
32 | .Bl -tag -width 4n | |
33 | .It Cm 0\-9 | |
34 | Dump levels. | |
35 | A level 0, full backup, | |
36 | guarantees the entire file system is copied. | |
37 | A level number above 0, | |
38 | incremental backup, | |
39 | tells dump to | |
40 | copy all files new or modified since the | |
41 | last dump of the same or lower level. The default | |
42 | level is 9. | |
43 | .It Cm f Op Ar file | |
44 | Write the backup to | |
45 | .Ar file ; | |
46 | .Ar file | |
47 | may be a special device file | |
48 | like | |
49 | .Pa /dev/rmt12 | |
50 | (a tape drive), | |
51 | .Pa /dev/rsd1c | |
52 | (an optical drive), | |
53 | an ordinary file, | |
54 | or | |
55 | .Ql Fl | |
56 | (the standard output). | |
57 | .It Cm d Ar density | |
58 | Set tape density to | |
59 | .Ar density . | |
60 | The default is 1600BPI. | |
61 | .It Cm n | |
62 | Whenever | |
63 | .Nm dump | |
64 | requires operator attention, | |
65 | notify all operators in the group | |
66 | .Dq operator | |
67 | by means similar to a | |
68 | .Xr wall 1 . | |
69 | .It Cm s Ar feet | |
70 | Attempt to caluculate the amount of tape needed | |
71 | at a particular density. | |
72 | If this amount is exceeded, | |
73 | .Nm dump | |
74 | prompts for a new tape. It is recommended to be a bit conservative | |
75 | on this option. | |
76 | The default size is 2300 feet. | |
77 | .It Cm u | |
78 | Update the file | |
79 | .Pa /etc/dumpdates | |
80 | after a successful dump. | |
89f26d46 | 81 | The format of |
0fccfdb8 | 82 | .Pa /etc/dumpdates |
89f26d46 KM |
83 | is readable by people, consisting of one |
84 | free format record per line: | |
0fccfdb8 CL |
85 | filesystem name, |
86 | increment level | |
89f26d46 | 87 | and |
0fccfdb8 | 88 | .Xr ctime 3 |
89f26d46 | 89 | format dump date. |
0fccfdb8 CL |
90 | There may be only one entry per filesystem at each level. |
91 | The file | |
92 | .Pa /etc/dumpdates | |
89f26d46 KM |
93 | may be edited to change any of the fields, |
94 | if necessary. | |
0fccfdb8 CL |
95 | .It Cm W |
96 | .Nm Dump | |
89f26d46 KM |
97 | tells the operator what file systems need to be dumped. |
98 | This information is gleaned from the files | |
0fccfdb8 | 99 | .Pa /etc/dumpdates |
89f26d46 | 100 | and |
0fccfdb8 | 101 | .Pa /etc/fstab . |
89f26d46 | 102 | The |
0fccfdb8 | 103 | .Cm W |
89f26d46 | 104 | option causes |
0fccfdb8 | 105 | .Nm dump |
89f26d46 | 106 | to print out, for each file system in |
0fccfdb8 | 107 | .Pa /etc/dumpdates |
89f26d46 KM |
108 | the most recent dump date and level, |
109 | and highlights those file systems that should be dumped. | |
110 | If the | |
0fccfdb8 | 111 | .Cm W |
89f26d46 | 112 | option is set, all other options are ignored, and |
0fccfdb8 | 113 | .Nm dump |
89f26d46 | 114 | exits immediately. |
0fccfdb8 | 115 | .It Cm w |
89f26d46 | 116 | Is like W, but prints only those filesystems which need to be dumped. |
0fccfdb8 CL |
117 | .El |
118 | .Pp | |
119 | If no options are specified, | |
120 | .Nm dump | |
121 | does a level | |
122 | .Cm 9u | |
123 | to the system's default tape device. | |
124 | .Pp | |
125 | .Nm Dump | |
89f26d46 KM |
126 | requires operator intervention on these conditions: |
127 | end of tape, | |
128 | end of dump, | |
129 | tape write error, | |
130 | tape open error or | |
131 | disk read error (if there are more than a threshold of 32). | |
132 | In addition to alerting all operators implied by the | |
0fccfdb8 | 133 | .Cm n |
89f26d46 | 134 | key, |
0fccfdb8 | 135 | .Nm dump |
89f26d46 | 136 | interacts with the operator on |
0fccfdb8 | 137 | .Em dump's |
89f26d46 | 138 | control terminal at times when |
0fccfdb8 | 139 | .Nm dump |
89f26d46 KM |
140 | can no longer proceed, |
141 | or if something is grossly wrong. | |
142 | All questions | |
0fccfdb8 | 143 | .Nm dump |
89f26d46 | 144 | poses |
0fccfdb8 | 145 | .Em must |
89f26d46 KM |
146 | be answered by typing \*(lqyes\*(rq or \*(lqno\*(rq, |
147 | appropriately. | |
0fccfdb8 | 148 | .Pp |
89f26d46 | 149 | Since making a dump involves a lot of time and effort for full dumps, |
0fccfdb8 | 150 | .Nm dump |
89f26d46 KM |
151 | checkpoints itself at the start of each tape volume. |
152 | If writing that volume fails for some reason, | |
0fccfdb8 | 153 | .Nm dump |
89f26d46 KM |
154 | will, |
155 | with operator permission, | |
156 | restart itself from the checkpoint | |
157 | after the old tape has been rewound and removed, | |
158 | and a new tape has been mounted. | |
0fccfdb8 CL |
159 | .Pp |
160 | .Nm Dump | |
89f26d46 KM |
161 | tells the operator what is going on at periodic intervals, |
162 | including usually low estimates of the number of blocks to write, | |
163 | the number of tapes it will take, the time to completion, and | |
164 | the time to the tape change. | |
165 | The output is verbose, | |
166 | so that others know that the terminal | |
167 | controlling | |
0fccfdb8 | 168 | .Nm dump |
89f26d46 KM |
169 | is busy, |
170 | and will be for some time. | |
0fccfdb8 CL |
171 | .Pp |
172 | In the event of a catastrophic disk event, the time required | |
173 | to restore all the necessary backup tapes or files to disk | |
174 | can be kept to a minimum by staggering the incremental dumps. | |
175 | An efficient method of staggering incremental dumps | |
176 | to minimize the number of tapes follows: | |
177 | .Bl -bullet -offset indent | |
178 | .It | |
179 | Always start with a level 0 backup, for example: | |
180 | .Bd -literal -offset indent | |
181 | /etc/dump 0ufds /dev/nrst1 54000 6000 /usr/src | |
182 | .Ed | |
183 | .Pp | |
184 | This should be done at set intervals, say once a month or once every two months, | |
185 | and on a set of fresh tapes that is saved forever. | |
186 | .It | |
187 | After a level 0, dumps of active file | |
89f26d46 KM |
188 | systems are taken on a daily basis, |
189 | using a modified Tower of Hanoi algorithm, | |
190 | with this sequence of dump levels: | |
0fccfdb8 | 191 | .Bd -literal -offset indent |
89f26d46 | 192 | 3 2 5 4 7 6 9 8 9 9 ... |
0fccfdb8 CL |
193 | .Ed |
194 | .Pp | |
195 | For the daily dumps, it should be possible to use a fixed number of tapes | |
196 | for each day, used on a weekly basis. | |
89f26d46 | 197 | Each week, a level 1 dump is taken, and |
0fccfdb8 CL |
198 | the daily Hanoi sequence repeats beginning with 3. |
199 | For weekly dumps, another fixed set of tapes per dumped file system is | |
89f26d46 | 200 | used, also on a cyclical basis. |
0fccfdb8 CL |
201 | .El |
202 | .Pp | |
203 | After several months or so, the daily and weekly tapes should get | |
204 | rotated out of the dump cycle and fresh tapes brought in. | |
205 | .Sh FILES | |
206 | .Bl -tag -width /etc/dumpdates -compact | |
207 | .It Pa /dev/rrp1g | |
208 | default filesystem to dump from (system dependent). | |
209 | .It Pa /dev/rmt8 | |
210 | default tape unit to dump to | |
211 | .It Pa /etc/dumpdates | |
212 | new format dump date record | |
213 | .It Pa /etc/fstab | |
214 | dump table: file systems and frequency | |
215 | .It Pa /etc/group | |
216 | to find group | |
217 | .Em operator | |
218 | .El | |
219 | .Sh SEE ALSO | |
220 | .Xr rdump 8 , | |
221 | .Xr restore 8 , | |
222 | .Xr dump 5 , | |
223 | .Xr fstab 5 | |
224 | .Sh DIAGNOSTICS | |
89f26d46 | 225 | Many, and verbose. |
0fccfdb8 | 226 | .Pp |
5d9a2c90 KM |
227 | Dump exits with zero status on success. |
228 | Startup errors are indicated with an exit code of 1; | |
229 | abnormal termination is indicated with an exit code of 3. | |
0fccfdb8 CL |
230 | .Sh BUGS |
231 | .Pp | |
89f26d46 KM |
232 | Fewer than 32 read errors on the filesystem are ignored. |
233 | Each reel requires a new process, so parent processes for | |
234 | reels already written just hang around until the entire tape | |
235 | is written. | |
0fccfdb8 CL |
236 | .Pp |
237 | .Nm Dump | |
b3dfcea8 | 238 | with the |
0fccfdb8 | 239 | .Cm W |
b3dfcea8 | 240 | or |
0fccfdb8 | 241 | .Cm w |
b3dfcea8 | 242 | options does not report filesystems that have never been recorded |
0fccfdb8 CL |
243 | in |
244 | .Pa /etc/dumpdates , | |
245 | even if listed in | |
246 | .Pa /etc/fstab . | |
247 | .Pp | |
89f26d46 | 248 | It would be nice if |
0fccfdb8 | 249 | .Nm dump |
89f26d46 KM |
250 | knew about the dump sequence, |
251 | kept track of the tapes scribbled on, | |
252 | told the operator which tape to mount when, | |
253 | and provided more assistance | |
254 | for the operator running | |
0fccfdb8 CL |
255 | .Xr restore . |
256 | .Sh HISTORY | |
257 | A | |
258 | .Nm | |
259 | command appeared in Version 6 AT&T UNIX. |