1ufsdump(1M)             System Administration Commands             ufsdump(1M)
2
3
4

NAME

6       ufsdump - incremental file system dump
7

SYNOPSIS

9       /usr/sbin/ufsdump [options] [arguments] files_to_dump
10
11

DESCRIPTION

13       ufsdump backs up all files specified by files_to_dump (usually either a
14       whole file system or files within a file sytem changed after a  certain
15       date) to magnetic tape, diskette, or disk file.
16
17
18       The  ufsdump  command  can  only  be used on unmounted file systems, or
19       those mounted read-only. Attempting to dump a mounted, read-write  file
20       system  might result in a system disruption or the inability to restore
21       files from the dump. Consider using the fssnap(1M) command to create  a
22       file system snapshot if you need a point-in-time image of a file system
23       that is mounted.
24
25
26       If a filesystem was mounted with the logging  option,  it  is  strongly
27       recommended  that you run ufsdump as the root user. Running the command
28       as  a non-root user might result in the  creation  of  an  inconsistent
29       dump.
30
31
32       options is a single string of one-letter ufsdump options.
33
34
35       arguments may be multiple strings whose association with the options is
36       determined by order. That is, the first argument goes  with  the  first
37       option that takes an argument; the second argument goes with the second
38       option that takes an argument, and so on.
39
40
41       files_to_dump is required and must be the last argument on the  command
42       line. See OPERANDS for more information.
43
44
45       With  most  devices  ufsdump can automatically detect the end-of-media.
46       Consequently, the d, s, and t options are not necessary for  multi-vol‐
47       ume  dumps,  unless  ufsdump  does  not  understand  the way the device
48       detects the end-of-media, or the files are to be restored on  a  system
49       with an older version of the restore command.
50

OPTIONS

52       The following options are supported:
53
54       0−9
55
56           The  "dump  level."  All files specified by files_to_dump that have
57           been modified since the last ufsdump at  a  lower  dump  level  are
58           copied  to  the  dump_file  destination  (normally  a magnetic tape
59           device). For instance, if a "level 2" dump was done on Monday, fol‐
60           lowed  by  a "level 4" dump on Tuesday, a subsequent "level 3" dump
61           on Wednesday would contain all files modified or  added  since  the
62           "level  2" (Monday) backup. A "level 0" dump copies the entire file
63           system to the dump_file.
64
65
66       a archive_file
67
68           Archive file. Archive a dump table-of-contents in the specified ar‐
69           chive_file to be used by ufsrestore(1M) to determine whether a file
70           is in the dump file that is being restored.
71
72
73       b factor
74
75           Blocking factor. Specify the blocking factor for tape  writes.  The
76           default  is  20  blocks  per  write  for tapes of density less than
77           6250BPI (bytes-per-inch). The default blocking factor for tapes  of
78           density  6250BPI and greater is 64. The default blocking factor for
79           cartridge tapes (c option) is  126.  The  highest  blocking  factor
80           available  with  most tape drives is 126. Note: the blocking factor
81           is specified in terms of 512-byte blocks,  for  compatibility  with
82           tar(1).
83
84
85       c
86
87           Cartridge.  Set  the defaults for cartridge instead of the standard
88           half-inch reel. This sets the density to 1000BPI and  the  blocking
89           factor  to  126. Since ufsdump can automatically detect the end-of-
90           media, only the blocking parameter normally  has  an  effect.  When
91           cartridge tapes are used, and this option is not specified, ufsdump
92           will slightly miscompute the size of the tape. If the b, d, s or  t
93           options  are specified with this option, their values will override
94           the defaults set by this option.
95
96
97       d bpi
98
99           Tape density. Not normally required, as ufsdump can detect  end-of-
100           media.  This  parameter  can  be  used to keep a running tab on the
101           amount of tape used per reel. The default density is 6250BPI except
102           when  the  c option is used for cartridge tape, in which case it is
103           assumed to be 1000BPI per track. Typical values  for  tape  devices
104           are:
105
106           1/2 inch tape
107
108               6250 BPI
109
110
111           1/4 inch cartridge
112
113               1000 BPI The tape densities and other options are documented in
114               the st(7D) man page.
115
116
117
118       D
119
120           Diskette. Dump to diskette.
121
122
123       f dump_file
124
125           Dump file. Use dump_file  as  the  file  to  dump  to,  instead  of
126           /dev/rmt/0.  If  dump_file is specified as , dump to standard out‐
127           put.
128
129           If the name of the file is of the form machine:device, the dump  is
130           done  from  the  specified  machine over the network using rmt(1M).
131           Since ufsdump is normally run  by  root,  the  name  of  the  local
132           machine  must appear in the /.rhosts file of the remote machine. If
133           the file is specified as user@machine:device, ufsdump will  attempt
134           to  execute as the specified user on the remote machine. The speci‐
135           fied user must have a .rhosts  file  on  the  remote  machine  that
136           allows  the  user  invoking  the  command from the local machine to
137           access the remote machine.
138
139
140       l
141
142           Autoload. When the end-of-tape is reached before the dump  is  com‐
143           plete,  take  the  drive offline and wait up to two minutes for the
144           tape drive to be ready again. This gives autoloading  (stackloader)
145           tape  drives  a  chance  to  load a new tape. If the drive is ready
146           within two minutes, continue. If it is not, prompt for another tape
147           and wait.
148
149
150       L string
151
152           Sets  the tape label to string, instead of the default none. string
153           may be no more than sixteen characters long. If it is longer, it is
154           truncated  and  a warning printed; the dump will still be done. The
155           tape label is specific to the ufsdump tape  format,  and  bears  no
156           resemblance to IBM or ANSI-standard tape labels.
157
158
159       n
160
161           Notify  all operators in the sys group that ufsdump requires atten‐
162           tion by sending messages to their terminals, in a manner similar to
163           that  used  by  the  wall(1M) command. Otherwise, such messages are
164           sent only to the terminals (such as the console) on which the  user
165           running ufsdump is logged in.
166
167
168       N device_name
169
170           Use  device_name  when recording information in /etc/dumpdates (see
171           the u option) and when comparing against information in  /etc/dump‐
172           dates  for  incremental dumps. The device_name provided can contain
173           no white space as defined in scanf(3C) and is case-sensitive.
174
175
176       o
177
178           Offline. Take the drive offline when the dump is  complete  or  the
179           end-of-media is reached and rewind the tape, or eject the diskette.
180           In the case of some autoloading 8mm drives,  the  tape  is  removed
181           from  the  drive automatically. This prevents another process which
182           rushes in to use the  drive,  from  inadvertently  overwriting  the
183           media.
184
185
186       s size
187
188           Specify  the  size  of  the  volume  being  dumped to. Not normally
189           required, as ufsdump can detect end-of-media.  When  the  specified
190           size  is  reached, ufsdump waits for you to change the volume. ufs‐
191           dump interprets the specified size as the length in feet for  tapes
192           and   cartridges,  and  as  the  number  of  1024-byte  blocks  for
193           diskettes. The values should be a little smaller  than  the  actual
194           physical  size  of  the media (for example, 425 for a 450-foot car‐
195           tridge). Typical values for tape devices depend on  the  c  option,
196           for cartridge devices, and the D option for diskettes:
197
198           1/2 inch tape
199
200               2300 feet
201
202
203           60-Mbyte 1/4 inch cartridge
204
205               425 feet
206
207
208           150-Mbyte 1/4 inch cartridge
209
210               700 feet
211
212
213           diskette
214
215               1422  blocks  (Corresponds  to  a 1.44-Mbyte diskette, with one
216               cylinder reserved for bad block information.)
217
218
219
220       S
221
222           Size estimate. Determine the amount of space that is needed to per‐
223           form  the dump without actually doing it, and display the estimated
224           number of bytes it will take. This is useful with incremental dumps
225           to determine how many volumes of media will be needed.
226
227
228       t tracks
229
230           Specify  the  number  of  tracks for a cartridge tape. Not normally
231           required, as ufsdump can detect  end-of-media.  The  default  is  9
232           tracks.  The  t  option is not compatible with the D option. Values
233           for Sun-supported tape devices are:
234
235           60-Mbyte 1/4 inch cartridge
236
237               9 tracks
238
239
240           150-Mbyte 1/4 inch cartridge
241
242               18 tracks
243
244
245
246       T time_wait[hms]
247
248           Sets the amount of time to wait for an  autoload  command  to  com‐
249           plete.  This  option  is  ignored unless the l option has also been
250           specified. The default time period to wait is two minutes.  Specify
251           time  units  with  a trailing h ( for hours), m (for minutes), or s
252           (for seconds). The default unit is minutes.
253
254
255       u
256
257           Update the dump record. Add an entry to  the  file  /etc/dumpdates,
258           for  each  file  system  successfully dumped that includes the file
259           system name (or device_name as specified with the N option),  date,
260           and dump level.
261
262
263       v
264
265           Verify. After each tape or diskette is written, verify the contents
266           of the media against the source file system. If  any  discrepancies
267           occur,  prompt  for  new  media,  then repeat the dump/verification
268           process. The file system must be unmounted. This option  cannot  be
269           used to verify a dump to standard output.
270
271
272       w
273
274           Warning.  List the file systems that have not been backed up within
275           a day. This information is gleaned from  the  files  /etc/dumpdates
276           and  /etc/vfstab.  When the w option is used, all other options are
277           ignored. After reporting, ufsdump exits immediately.
278
279
280       W
281
282           Warning with highlight. Similar to the w option, except that the  W
283           option  includes  all  file  systems that appear in /etc/dumpdates,
284           along with information about their most recent dump dates and  lev‐
285           els.  File  systems  that  have not been backed up within a day are
286           highlighted.
287
288

OPERANDS

290       The following operand is supported:
291
292       files_to_dump
293
294           Specifies the files to dump. Usually it  identifies  a  whole  file
295           system  by  its  raw device name (for example, /dev/rdsk/c0t3d0s6).
296           Incremental dumps (levels 1 to 9) of files changed after a  certain
297           date   only   apply   to   a   whole  file  system.  Alternatively,
298           files_to_dump can identify individual  files  or  directories.  All
299           named directories that may be examined by the user running ufsdump,
300           as well as any explicitly-named files, are  dumped.  This  dump  is
301           equivalent  to  a  level  0  dump  of the indicated portions of the
302           filesystem, except that /etc/dumpdates is not updated even  if  the
303           -u  option has been specified. In all cases, the files must be con‐
304           tained in the same file system, and the file system must  be  local
305           to the system where ufsdump is being run.
306
307           files_to_dump is required and must be the last argument on the com‐
308           mand line.
309
310
311
312       If no options are given, the default is 9uf /dev/rmt/0 files_to_dump.
313

USAGE

315       See largefile(5) for the description of the behavior  of  ufsdump  when
316       encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
317

EXAMPLES

319       Example 1 Using ufsdump
320
321
322       The  following  command  makes  a  full  dump  of a root file system on
323       c0t3d0, on a 150-MByte cartridge tape unit 0:
324
325
326         example# ufsdump 0cfu /dev/rmt/0 /dev/rdsk/c0t3d0s0
327
328
329
330
331       The following command makes and verifies an incremental dump at level 5
332       of the usr partition of c0t3d0, on a 1/2 inch reel tape unit 1,:
333
334
335         example# ufsdump 5fuv /dev/rmt/1 /dev/rdsk/c0t3d0s6
336
337
338

EXIT STATUS

340       While running, ufsdump emits many verbose messages. ufsdump returns the
341       following exit values:
342
343       0
344
345           Normal exit.
346
347
348       1
349
350           Startup errors encountered.
351
352
353       3
354
355           Abort − no checkpoint attempted.
356
357

FILES

359       /dev/rmt/0
360
361           default unit to dump to
362
363
364       /etc/dumpdates
365
366           dump date record
367
368
369       /etc/group
370
371           to find group sys
372
373
374       /etc/hosts
375
376           to gain access to remote system with drive
377
378
379       /etc/vfstab
380
381           list of file systems
382
383

ATTRIBUTES

385       See attributes(5) for descriptions of the following attributes:
386
387
388
389
390       ┌─────────────────────────────┬─────────────────────────────┐
391       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
392       ├─────────────────────────────┼─────────────────────────────┤
393       │Availability                 │SUNWcsu                      │
394       └─────────────────────────────┴─────────────────────────────┘
395

SEE ALSO

397       cpio(1), tar(1), dd(1M), devnm(1M), fssnap(1M),  prtvtoc(1M),  rmt(1M),
398       shutdown(1M),  ufsrestore(1M),  volcopy(1M),  wall(1M), scanf(3C), ufs‐
399       dump(4), attributes(5), largefile(5), st(7D)
400

NOTES

402   Read Errors
403       Fewer than 32 read errors on the file system are ignored.
404
405   Process Per Reel
406       Because each reel requires a new process, parent  processes  for  reels
407       that are already written hang around until the entire tape is written.
408
409   Operator Intervention
410       ufsdump requires operator intervention on these conditions: end of vol‐
411       ume, end of dump, volume write error, volume open error  or  disk  read
412       error (if there are more than a threshold of 32). In addition to alert‐
413       ing all operators implied by the n option, ufsdump interacts  with  the
414       operator  on  ufsdump's  control  terminal at times when ufsdump can no
415       longer proceed, or if something is grossly wrong. All questions ufsdump
416       poses must be answered by typing yes or no, as appropriate.
417
418
419       Since  backing  up a disk can involve a lot of time and effort, ufsdump
420       checkpoints at the start of each volume. If writing that  volume  fails
421       for some reason, ufsdump will, with operator permission, restart itself
422       from the checkpoint after a defective volume has been replaced.
423
424   Suggested Dump Schedule
425       It is vital to perform full, "level 0",  dumps  at  regular  intervals.
426       When performing a full dump, bring the machine down to single-user mode
427       using shutdown(1M). While preparing for a full dump, it is a good  idea
428       to  clean  the  tape  drive and heads. Incremental dumps should be per‐
429       formed with the system running in single-user mode.
430
431
432       Incremental dumps allow for convenient backup and  recovery  of  active
433       files  on a more frequent basis, with a minimum of media and time. How‐
434       ever, there are some tradeoffs. First,  the  interval  between  backups
435       should  be  kept  to  a minimum (once a day at least). To guard against
436       data loss as a result of a media failure (a rare, but  possible  occur‐
437       rence),  capture  active  files on (at least) two sets of dump volumes.
438       Another consideration is the desire to keep unnecessary duplication  of
439       files  to  a  minimum  to  save both operator time and media storage. A
440       third consideration is the ease with which a particular backed-up  ver‐
441       sion  of  a  file  can be located and restored. The following four-week
442       schedule offers a reasonable tradeoff between these goals.
443
444                       Sun    Mon    Tue    Wed    Thu    Fri
445             Week 1:   Full    5      5      5      5      3
446             Week 2:           5      5      5      5      3
447             Week 3:           5      5      5      5      3
448             Week 4:           5      5      5      5      3
449
450
451
452
453       Although the Tuesday through Friday incrementals contain "extra copies"
454       of files from Monday, this scheme assures that any file modified during
455       the week can be recovered from the previous day's incremental dump.
456
457   Process Priority of ufsdump
458       ufsdump uses multiple processes to allow it to read from the  disk  and
459       write to the media concurrently. Due to the way it synchronizes between
460       these processes, any attempt to run dump with a nice (process priority)
461       of  `−5'  or  better  will  likely  make  ufsdump run slower instead of
462       faster.
463
464   Overlapping Partitions
465       Most disks contain one or more overlapping slices because slice 2  cov‐
466       ers  the entire disk. The other slices are of various sizes and usually
467       do not overlap. For example, a  common  configuration  places  root  on
468       slice 0, swap on slice 1, /opt on slice 5 and /usr on slice 6.
469
470
471       It  should  be  emphasized  that ufsdump dumps one ufs file system at a
472       time. Given the above scenario where slice 0 and slice 2 have the  same
473       starting  offset, executing ufsdump on slice 2 with the intent of dump‐
474       ing the entire disk would instead dump only the  root  file  system  on
475       slice  0.  To dump the entire disk, the user must dump the file systems
476       on each slice separately.
477

BUGS

479       The /etc/vfstab file does not allow the desired frequency of backup for
480       file  systems  to be specified (as /etc/fstab did). Consequently, the w
481       and W options assume file systems should be backed up daily, which lim‐
482       its the usefulness of these options.
483
484
485
486SunOS 5.11                        17 Mar 2008                      ufsdump(1M)
Impressum