📄 dump.8
字号:
.\" Copyright (c) 1980, 1991, 1993.\" Regents of the University of California..\" All rights reserved..\".\" Redistribution and use in source and binary forms, with or without.\" modification, are permitted provided that the following conditions.\" are met:.\" 1. Redistributions of source code must retain the above copyright.\" notice, this list of conditions and the following disclaimer..\" 2. Redistributions in binary form must reproduce the above copyright.\" notice, this list of conditions and the following disclaimer in the.\" documentation and/or other materials provided with the distribution..\" 3. All advertising materials mentioning features or use of this software.\" must display the following acknowledgement:.\" This product includes software developed by the University of.\" California, Berkeley and its contributors..\" 4. Neither the name of the University nor the names of its contributors.\" may be used to endorse or promote products derived from this software.\" without specific prior written permission..\".\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION).\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF.\" SUCH DAMAGE..\".\" @(#)dump.8 8.1 (Berkeley) 6/16/93.\".Dd June 16, 1993.Dt DUMP 8.Os BSD 4.Sh NAME.Nm dump.Nd filesystem backup.Sh SYNOPSIS.Nm dump.Op Cm 0123456789BbhfusTdWn Op Ar argument ....Op Ar filesystem.Sh DESCRIPTION.Nm Dumpexamines fileson a filesystemand determines which filesneed to be backed up. These filesare copied to the given disk, tape or otherstorage medium for safe keeping (see the.Cm foption below for doing remote backups).A dump that is larger than the output medium is broken intomultiple volumes.On most media the size is determined by writing until anend-of-media indication is returned.On media that cannot reliably return an end-of-media indication(such as some cartridge tape drives)each volume is of a fixed size;the actual size is determined by the tape size and density and/orblock count options below.By default, the same output file name is used for each volumeafter prompting the operator to change media..PpThe following options are supported by.Nm dump:.Bl -tag -width 4n.It Cm 0\-9Dump levels.A level 0, full backup,guarantees the entire file system is copied(but see also the.Cm hoption below).A level number above 0,incremental backup,tells dump tocopy all files new or modified since thelast dump of the same or lower level. The defaultlevel is 9..It Cm B Ar recordsThe number of dump records per volume.This option overrides the calculation of tape sizebased on length and density..It Cm b Ar blocksizeThe number of kilobytes per dump record..It Cm h Ar levelHonor the user.Dq nodumpflag.Dp Dv UF_NODUMPonly for dumps at or above the given.Ar level .The default honor level is 1,so that incremental backups omit such filesbut full backups retain them..It Cm f Ar fileWrite the backup to.Ar file ;.Ar filemay be a special device filelike.Pa /dev/rmt12(a tape drive),.Pa /dev/rsd1c(a disk drive),an ordinary file,or.Ql Fl(the standard output).Multiple file names may be given as a single argument separated by commas.Each file will be used for one dump volume in the order listed;if the dump requires more volumes than the number of names given,the last file name will used for all remaining volumes after promptingfor media changes.If the name of the file is of the form.Dq host:file ,or.Dq user@host:file ,.Nm dumpwrites to the named file on the remote host using.Xr rmt 8 ..It Cm d Ar densitySet tape density to.Ar density .The default is 1600BPI..It Cm nWhenever.Nm dumprequires operator attention,notify all operators in the group.Dq operatorby means similar to a.Xr wall 1 ..It Cm s Ar feetAttempt to calculate the amount of tape neededat a particular density.If this amount is exceeded,.Nm dumpprompts for a new tape.It is recommended to be a bit conservative on this option.The default tape length is 2300 feet..It Cm uUpdate the file.Pa /etc/dumpdatesafter a successful dump.The format of.Pa /etc/dumpdatesis readable by people, consisting of onefree format record per line:filesystem name,increment leveland.Xr ctime 3format dump date. There may be only one entry per filesystem at each level.The file.Pa /etc/dumpdatesmay be edited to change any of the fields,if necessary..It Cm T Ar dateUse the specified date as the starting time for the dumpinstead of the time determined from looking in.Pa /etc/dumpdates .The format of date is the same as that of.Xr ctime 3 .This option is useful for automated dump scripts that wish todump over a specific period of time.The.Cm Toption is mutually exclusive from the.Cm uoption..It Cm W.Nm Dumptells the operator what file systems need to be dumped.This information is gleaned from the files.Pa /etc/dumpdatesand.Pa /etc/fstab .The.Cm Woption causes.Nm dumpto print out, for each file system in.Pa /etc/dumpdatesthe most recent dump date and level,and highlights those file systems that should be dumped.If the.Cm Woption is set, all other options are ignored, and.Nm dumpexits immediately..It Cm wIs like W, but prints only those filesystems which need to be dumped..El.Pp.Nm Dumprequires operator intervention on these conditions:end of tape,end of dump,tape write error,tape open error ordisk read error (if there are more than a threshold of 32).In addition to alerting all operators implied by the.Cm nkey,.Nm dumpinteracts with the operator on.Em dump'scontrol terminal at times when.Nm dumpcan no longer proceed,or if something is grossly wrong.All questions.Nm dumpposes.Em mustbe answered by typing.Dq yesor.Dq no ,appropriately..PpSince making a dump involves a lot of time and effort for full dumps,.Nm dumpcheckpoints itself at the start of each tape volume.If writing that volume fails for some reason,.Nm dumpwill,with operator permission,restart itself from the checkpointafter the old tape has been rewound and removed,and a new tape has been mounted..Pp.Nm Dumptells the operator what is going on at periodic intervals,including usually low estimates of the number of blocks to write,the number of tapes it will take, the time to completion, andthe time to the tape change.The output is verbose,so that others know that the terminalcontrolling.Nm dumpis busy,and will be for some time..PpIn the event of a catastrophic disk event, the time requiredto restore all the necessary backup tapes or files to diskcan be kept to a minimum by staggering the incremental dumps.An efficient method of staggering incremental dumpsto minimize the number of tapes follows:.Bl -bullet -offset indent.ItAlways start with a level 0 backup, for example:.Bd -literal -offset indent/etc/dump 0uf /dev/nrst1 /usr/src.Ed.PpThis should be done at set intervals, say once a month or once every two months,and on a set of fresh tapes that is saved forever..ItAfter a level 0, dumps of active filesystems are taken on a daily basis,using a modified Tower of Hanoi algorithm,with this sequence of dump levels:.Bd -literal -offset indent3 2 5 4 7 6 9 8 9 9 ....Ed.PpFor the daily dumps, it should be possible to use a fixed number of tapesfor each day, used on a weekly basis.Each week, a level 1 dump is taken, andthe daily Hanoi sequence repeats beginning with 3.For weekly dumps, another fixed set of tapes per dumped file system isused, also on a cyclical basis..El.PpAfter several months or so, the daily and weekly tapes should getrotated out of the dump cycle and fresh tapes brought in..Sh FILES.Bl -tag -width /etc/dumpdates -compact.It Pa /dev/rmt8default tape unit to dump to.It Pa /etc/dumpdatesdump date records.It Pa /etc/fstabdump table: file systems and frequency.It Pa /etc/groupto find group.Em operator.El.Sh SEE ALSO.Xr restore 8 ,.Xr rmt 8 ,.Xr dump 5 ,.Xr fstab 5.Sh DIAGNOSTICSMany, and verbose..PpDump exits with zero status on success.Startup errors are indicated with an exit code of 1;abnormal termination is indicated with an exit code of 3..Sh BUGS.PpFewer than 32 read errors on the filesystem are ignored.Each reel requires a new process, so parent processes forreels already written just hang around until the entire tapeis written..Pp.Nm Dumpwith the.Cm Wor.Cm woptions does not report filesystems that have never been recordedin.Pa /etc/dumpdates ,even if listed in.Pa /etc/fstab ..PpIt would be nice if.Nm dumpknew about the dump sequence,kept track of the tapes scribbled on,told the operator which tape to mount when,and provided more assistancefor the operator running.Xr restore ..Sh HISTORYA.Nm dumpcommand appeared in Version 6 AT&T UNIX.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -