1.\" Copyright (c) 1980, 1991, 1993 2.\" Regents of the University of California. 3.\" All rights reserved. 4.\" 5.\" Redistribution and use in source and binary forms, with or without 6.\" modification, are permitted provided that the following conditions 7.\" are met: 8.\" 1. Redistributions of source code must retain the above copyright 9.\" notice, this list of conditions and the following disclaimer. 10.\" 2. Redistributions in binary form must reproduce the above copyright 11.\" notice, this list of conditions and the following disclaimer in the 12.\" documentation and/or other materials provided with the distribution. 13.\" 3. All advertising materials mentioning features or use of this software 14.\" must display the following acknowledgement: 15.\" This product includes software developed by the University of 16.\" California, Berkeley and its contributors. 17.\" 4. Neither the name of the University nor the names of its contributors 18.\" may be used to endorse or promote products derived from this software 19.\" without specific prior written permission. 20.\" 21.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 22.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 25.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31.\" SUCH DAMAGE. 32.\" 33.\" @(#)dump.8 8.1 (Berkeley) 6/16/93 34.\" 35.Dd June 16, 1993 36.Dt DUMP 8 37.Os BSD 4 38.Sh NAME 39.Nm dump 40.Nd filesystem backup 41.Sh SYNOPSIS 42.Nm dump 43.Op Cm 0123456789BbhfusTdWn Op Ar argument ... 44.Op Ar filesystem 45.Sh DESCRIPTION 46.Nm Dump 47examines files 48on a filesystem 49and determines which files 50need to be backed up. These files 51are copied to the given disk, tape or other 52storage medium for safe keeping (see the 53.Cm f 54option below for doing remote backups). 55A dump that is larger than the output medium is broken into 56multiple volumes. 57On most media the size is determined by writing until an 58end-of-media indication is returned. 59On media that cannot reliably return an end-of-media indication 60(such as some cartridge tape drives) 61each volume is of a fixed size; 62the actual size is determined by the tape size and density and/or 63block count options below. 64By default, the same output file name is used for each volume 65after prompting the operator to change media. 66.Pp 67The following options are supported by 68.Nm dump: 69.Bl -tag -width 4n 70.It Cm 0\-9 71Dump levels. 72A level 0, full backup, 73guarantees the entire file system is copied 74(but see also the 75.Cm h 76option below). 77A level number above 0, 78incremental backup, 79tells dump to 80copy all files new or modified since the 81last dump of the same or lower level. The default 82level is 9. 83.It Cm B Ar records 84The number of dump records per volume. 85This option overrides the calculation of tape size 86based on length and density. 87.It Cm b Ar blocksize 88The number of kilobytes per dump record. 89.It Cm h Ar level 90Honor the user 91.Dq nodump 92flag 93.Dp Dv UF_NODUMP 94only for dumps at or above the given 95.Ar level . 96The default honor level is 1, 97so that incremental backups omit such files 98but full backups retain them. 99.It Cm f Ar file 100Write the backup to 101.Ar file ; 102.Ar file 103may be a special device file 104like 105.Pa /dev/rst0 106(a tape drive), 107.Pa /dev/rfd1 108(a floppy disk drive), 109an ordinary file, 110or 111.Ql Fl 112(the standard output). 113Multiple file names may be given as a single argument separated by commas. 114Each file will be used for one dump volume in the order listed; 115if the dump requires more volumes than the number of names given, 116the last file name will used for all remaining volumes after prompting 117for media changes. 118If the name of the file is of the form 119.Dq host:file , 120or 121.Dq user@host:file , 122.Nm dump 123writes to the named file on the remote host using 124.Xr rmt 8 . 125The default path name of the remote 126.Xr rmt 8 127program is
| 1.\" Copyright (c) 1980, 1991, 1993 2.\" Regents of the University of California. 3.\" All rights reserved. 4.\" 5.\" Redistribution and use in source and binary forms, with or without 6.\" modification, are permitted provided that the following conditions 7.\" are met: 8.\" 1. Redistributions of source code must retain the above copyright 9.\" notice, this list of conditions and the following disclaimer. 10.\" 2. Redistributions in binary form must reproduce the above copyright 11.\" notice, this list of conditions and the following disclaimer in the 12.\" documentation and/or other materials provided with the distribution. 13.\" 3. All advertising materials mentioning features or use of this software 14.\" must display the following acknowledgement: 15.\" This product includes software developed by the University of 16.\" California, Berkeley and its contributors. 17.\" 4. Neither the name of the University nor the names of its contributors 18.\" may be used to endorse or promote products derived from this software 19.\" without specific prior written permission. 20.\" 21.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 22.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 25.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31.\" SUCH DAMAGE. 32.\" 33.\" @(#)dump.8 8.1 (Berkeley) 6/16/93 34.\" 35.Dd June 16, 1993 36.Dt DUMP 8 37.Os BSD 4 38.Sh NAME 39.Nm dump 40.Nd filesystem backup 41.Sh SYNOPSIS 42.Nm dump 43.Op Cm 0123456789BbhfusTdWn Op Ar argument ... 44.Op Ar filesystem 45.Sh DESCRIPTION 46.Nm Dump 47examines files 48on a filesystem 49and determines which files 50need to be backed up. These files 51are copied to the given disk, tape or other 52storage medium for safe keeping (see the 53.Cm f 54option below for doing remote backups). 55A dump that is larger than the output medium is broken into 56multiple volumes. 57On most media the size is determined by writing until an 58end-of-media indication is returned. 59On media that cannot reliably return an end-of-media indication 60(such as some cartridge tape drives) 61each volume is of a fixed size; 62the actual size is determined by the tape size and density and/or 63block count options below. 64By default, the same output file name is used for each volume 65after prompting the operator to change media. 66.Pp 67The following options are supported by 68.Nm dump: 69.Bl -tag -width 4n 70.It Cm 0\-9 71Dump levels. 72A level 0, full backup, 73guarantees the entire file system is copied 74(but see also the 75.Cm h 76option below). 77A level number above 0, 78incremental backup, 79tells dump to 80copy all files new or modified since the 81last dump of the same or lower level. The default 82level is 9. 83.It Cm B Ar records 84The number of dump records per volume. 85This option overrides the calculation of tape size 86based on length and density. 87.It Cm b Ar blocksize 88The number of kilobytes per dump record. 89.It Cm h Ar level 90Honor the user 91.Dq nodump 92flag 93.Dp Dv UF_NODUMP 94only for dumps at or above the given 95.Ar level . 96The default honor level is 1, 97so that incremental backups omit such files 98but full backups retain them. 99.It Cm f Ar file 100Write the backup to 101.Ar file ; 102.Ar file 103may be a special device file 104like 105.Pa /dev/rst0 106(a tape drive), 107.Pa /dev/rfd1 108(a floppy disk drive), 109an ordinary file, 110or 111.Ql Fl 112(the standard output). 113Multiple file names may be given as a single argument separated by commas. 114Each file will be used for one dump volume in the order listed; 115if the dump requires more volumes than the number of names given, 116the last file name will used for all remaining volumes after prompting 117for media changes. 118If the name of the file is of the form 119.Dq host:file , 120or 121.Dq user@host:file , 122.Nm dump 123writes to the named file on the remote host using 124.Xr rmt 8 . 125The default path name of the remote 126.Xr rmt 8 127program is
|
129this can be overridden by the environment variable 130.Ev RMT . 131.It Cm d Ar density 132Set tape density to 133.Ar density . 134The default is 1600BPI. 135.It Cm n 136Whenever 137.Nm dump 138requires operator attention, 139notify all operators in the group 140.Dq operator 141by means similar to a 142.Xr wall 1 . 143.It Cm s Ar feet 144Attempt to calculate the amount of tape needed 145at a particular density. 146If this amount is exceeded, 147.Nm dump 148prompts for a new tape. 149It is recommended to be a bit conservative on this option. 150The default tape length is 2300 feet. 151.It Cm u 152Update the file 153.Pa /etc/dumpdates 154after a successful dump. 155The format of 156.Pa /etc/dumpdates 157is readable by people, consisting of one 158free format record per line: 159filesystem name, 160increment level 161and 162.Xr ctime 3 163format dump date. 164There may be only one entry per filesystem at each level. 165The file 166.Pa /etc/dumpdates 167may be edited to change any of the fields, 168if necessary. 169.It Cm T Ar date 170Use the specified date as the starting time for the dump 171instead of the time determined from looking in 172.Pa /etc/dumpdates . 173The format of date is the same as that of 174.Xr ctime 3 . 175This option is useful for automated dump scripts that wish to 176dump over a specific period of time. 177The 178.Cm T 179option is mutually exclusive from the 180.Cm u 181option. 182.It Cm W 183.Nm Dump 184tells the operator what file systems need to be dumped. 185This information is gleaned from the files 186.Pa /etc/dumpdates 187and 188.Pa /etc/fstab . 189The 190.Cm W 191option causes 192.Nm dump 193to print out, for each file system in 194.Pa /etc/dumpdates 195the most recent dump date and level, 196and highlights those file systems that should be dumped. 197If the 198.Cm W 199option is set, all other options are ignored, and 200.Nm dump 201exits immediately. 202.It Cm w 203Is like W, but prints only those filesystems which need to be dumped. 204.El 205.Pp 206.Nm Dump 207requires operator intervention on these conditions: 208end of tape, 209end of dump, 210tape write error, 211tape open error or 212disk read error (if there are more than a threshold of 32). 213In addition to alerting all operators implied by the 214.Cm n 215key, 216.Nm dump 217interacts with the operator on 218.Em dump's 219control terminal at times when 220.Nm dump 221can no longer proceed, 222or if something is grossly wrong. 223All questions 224.Nm dump 225poses 226.Em must 227be answered by typing 228.Dq yes 229or 230.Dq no , 231appropriately. 232.Pp 233Since making a dump involves a lot of time and effort for full dumps, 234.Nm dump 235checkpoints itself at the start of each tape volume. 236If writing that volume fails for some reason, 237.Nm dump 238will, 239with operator permission, 240restart itself from the checkpoint 241after the old tape has been rewound and removed, 242and a new tape has been mounted. 243.Pp 244.Nm Dump 245tells the operator what is going on at periodic intervals, 246including usually low estimates of the number of blocks to write, 247the number of tapes it will take, the time to completion, and 248the time to the tape change. 249The output is verbose, 250so that others know that the terminal 251controlling 252.Nm dump 253is busy, 254and will be for some time. 255.Pp 256In the event of a catastrophic disk event, the time required 257to restore all the necessary backup tapes or files to disk 258can be kept to a minimum by staggering the incremental dumps. 259An efficient method of staggering incremental dumps 260to minimize the number of tapes follows: 261.Bl -bullet -offset indent 262.It 263Always start with a level 0 backup, for example: 264.Bd -literal -offset indent 265/sbin/dump 0uf /dev/nrst0 /usr/src 266.Ed 267.Pp 268This should be done at set intervals, say once a month or once every two months, 269and on a set of fresh tapes that is saved forever. 270.It 271After a level 0, dumps of active file 272systems are taken on a daily basis, 273using a modified Tower of Hanoi algorithm, 274with this sequence of dump levels: 275.Bd -literal -offset indent 2763 2 5 4 7 6 9 8 9 9 ... 277.Ed 278.Pp 279For the daily dumps, it should be possible to use a fixed number of tapes 280for each day, used on a weekly basis. 281Each week, a level 1 dump is taken, and 282the daily Hanoi sequence repeats beginning with 3. 283For weekly dumps, another fixed set of tapes per dumped file system is 284used, also on a cyclical basis. 285.El 286.Pp 287After several months or so, the daily and weekly tapes should get 288rotated out of the dump cycle and fresh tapes brought in. 289.Sh ENVIRONMENT 290The environment variable 291.Ev RMT 292will be used to determine the pathname of the remote 293.Xr rmt 8 294program. 295.Sh FILES 296.Bl -tag -width /etc/dumpdates -compact 297.It Pa /dev/rst0 298default tape unit to dump to 299.It Pa /etc/dumpdates 300dump date records 301.It Pa /etc/fstab 302dump table: file systems and frequency 303.It Pa /etc/group 304to find group 305.Em operator 306.El 307.Sh SEE ALSO 308.Xr ft 8 , 309.Xr restore 8 , 310.Xr rmt 8 , 311.Xr dump 5 , 312.Xr fstab 5 313.Sh DIAGNOSTICS 314Many, and verbose. 315.Pp 316Dump exits with zero status on success. 317Startup errors are indicated with an exit code of 1; 318abnormal termination is indicated with an exit code of 3. 319.Sh BUGS 320.Pp 321Fewer than 32 read errors on the filesystem are ignored. 322Each reel requires a new process, so parent processes for 323reels already written just hang around until the entire tape 324is written. 325.Pp 326restore(8) is currently unable to restore dumps that were created 327with a blocksize larger than 32 on some tape drives. This is likely 328a bug in the tape driver. Workaround for safety reasons: 329dump aborts with an error message when choosing a blocksize > 32. 330.Pp 331.Nm Dump 332with the 333.Cm W 334or 335.Cm w 336options does not report filesystems that have never been recorded 337in 338.Pa /etc/dumpdates , 339even if listed in 340.Pa /etc/fstab . 341.Pp 342It would be nice if 343.Nm dump 344knew about the dump sequence, 345kept track of the tapes scribbled on, 346told the operator which tape to mount when, 347and provided more assistance 348for the operator running 349.Xr restore . 350.Sh HISTORY 351A 352.Nm dump 353command appeared in 354.At v6 .
| 130this can be overridden by the environment variable 131.Ev RMT . 132.It Cm d Ar density 133Set tape density to 134.Ar density . 135The default is 1600BPI. 136.It Cm n 137Whenever 138.Nm dump 139requires operator attention, 140notify all operators in the group 141.Dq operator 142by means similar to a 143.Xr wall 1 . 144.It Cm s Ar feet 145Attempt to calculate the amount of tape needed 146at a particular density. 147If this amount is exceeded, 148.Nm dump 149prompts for a new tape. 150It is recommended to be a bit conservative on this option. 151The default tape length is 2300 feet. 152.It Cm u 153Update the file 154.Pa /etc/dumpdates 155after a successful dump. 156The format of 157.Pa /etc/dumpdates 158is readable by people, consisting of one 159free format record per line: 160filesystem name, 161increment level 162and 163.Xr ctime 3 164format dump date. 165There may be only one entry per filesystem at each level. 166The file 167.Pa /etc/dumpdates 168may be edited to change any of the fields, 169if necessary. 170.It Cm T Ar date 171Use the specified date as the starting time for the dump 172instead of the time determined from looking in 173.Pa /etc/dumpdates . 174The format of date is the same as that of 175.Xr ctime 3 . 176This option is useful for automated dump scripts that wish to 177dump over a specific period of time. 178The 179.Cm T 180option is mutually exclusive from the 181.Cm u 182option. 183.It Cm W 184.Nm Dump 185tells the operator what file systems need to be dumped. 186This information is gleaned from the files 187.Pa /etc/dumpdates 188and 189.Pa /etc/fstab . 190The 191.Cm W 192option causes 193.Nm dump 194to print out, for each file system in 195.Pa /etc/dumpdates 196the most recent dump date and level, 197and highlights those file systems that should be dumped. 198If the 199.Cm W 200option is set, all other options are ignored, and 201.Nm dump 202exits immediately. 203.It Cm w 204Is like W, but prints only those filesystems which need to be dumped. 205.El 206.Pp 207.Nm Dump 208requires operator intervention on these conditions: 209end of tape, 210end of dump, 211tape write error, 212tape open error or 213disk read error (if there are more than a threshold of 32). 214In addition to alerting all operators implied by the 215.Cm n 216key, 217.Nm dump 218interacts with the operator on 219.Em dump's 220control terminal at times when 221.Nm dump 222can no longer proceed, 223or if something is grossly wrong. 224All questions 225.Nm dump 226poses 227.Em must 228be answered by typing 229.Dq yes 230or 231.Dq no , 232appropriately. 233.Pp 234Since making a dump involves a lot of time and effort for full dumps, 235.Nm dump 236checkpoints itself at the start of each tape volume. 237If writing that volume fails for some reason, 238.Nm dump 239will, 240with operator permission, 241restart itself from the checkpoint 242after the old tape has been rewound and removed, 243and a new tape has been mounted. 244.Pp 245.Nm Dump 246tells the operator what is going on at periodic intervals, 247including usually low estimates of the number of blocks to write, 248the number of tapes it will take, the time to completion, and 249the time to the tape change. 250The output is verbose, 251so that others know that the terminal 252controlling 253.Nm dump 254is busy, 255and will be for some time. 256.Pp 257In the event of a catastrophic disk event, the time required 258to restore all the necessary backup tapes or files to disk 259can be kept to a minimum by staggering the incremental dumps. 260An efficient method of staggering incremental dumps 261to minimize the number of tapes follows: 262.Bl -bullet -offset indent 263.It 264Always start with a level 0 backup, for example: 265.Bd -literal -offset indent 266/sbin/dump 0uf /dev/nrst0 /usr/src 267.Ed 268.Pp 269This should be done at set intervals, say once a month or once every two months, 270and on a set of fresh tapes that is saved forever. 271.It 272After a level 0, dumps of active file 273systems are taken on a daily basis, 274using a modified Tower of Hanoi algorithm, 275with this sequence of dump levels: 276.Bd -literal -offset indent 2773 2 5 4 7 6 9 8 9 9 ... 278.Ed 279.Pp 280For the daily dumps, it should be possible to use a fixed number of tapes 281for each day, used on a weekly basis. 282Each week, a level 1 dump is taken, and 283the daily Hanoi sequence repeats beginning with 3. 284For weekly dumps, another fixed set of tapes per dumped file system is 285used, also on a cyclical basis. 286.El 287.Pp 288After several months or so, the daily and weekly tapes should get 289rotated out of the dump cycle and fresh tapes brought in. 290.Sh ENVIRONMENT 291The environment variable 292.Ev RMT 293will be used to determine the pathname of the remote 294.Xr rmt 8 295program. 296.Sh FILES 297.Bl -tag -width /etc/dumpdates -compact 298.It Pa /dev/rst0 299default tape unit to dump to 300.It Pa /etc/dumpdates 301dump date records 302.It Pa /etc/fstab 303dump table: file systems and frequency 304.It Pa /etc/group 305to find group 306.Em operator 307.El 308.Sh SEE ALSO 309.Xr ft 8 , 310.Xr restore 8 , 311.Xr rmt 8 , 312.Xr dump 5 , 313.Xr fstab 5 314.Sh DIAGNOSTICS 315Many, and verbose. 316.Pp 317Dump exits with zero status on success. 318Startup errors are indicated with an exit code of 1; 319abnormal termination is indicated with an exit code of 3. 320.Sh BUGS 321.Pp 322Fewer than 32 read errors on the filesystem are ignored. 323Each reel requires a new process, so parent processes for 324reels already written just hang around until the entire tape 325is written. 326.Pp 327restore(8) is currently unable to restore dumps that were created 328with a blocksize larger than 32 on some tape drives. This is likely 329a bug in the tape driver. Workaround for safety reasons: 330dump aborts with an error message when choosing a blocksize > 32. 331.Pp 332.Nm Dump 333with the 334.Cm W 335or 336.Cm w 337options does not report filesystems that have never been recorded 338in 339.Pa /etc/dumpdates , 340even if listed in 341.Pa /etc/fstab . 342.Pp 343It would be nice if 344.Nm dump 345knew about the dump sequence, 346kept track of the tapes scribbled on, 347told the operator which tape to mount when, 348and provided more assistance 349for the operator running 350.Xr restore . 351.Sh HISTORY 352A 353.Nm dump 354command appeared in 355.At v6 .
|