Date: Tue, 24 Oct 1995 22:16:39 +0100 (MEZ) From: Elmar Bartel <bartel@informatik.tu-muenchen.de> To: hackers@freebsd.org Subject: Re: The source of dump (fwd) Message-ID: <95Oct24.221648%2B0100mesz.219872%2B3242@hprbg8.informatik.tu-muenchen.de>
next in thread | raw e-mail | index | archive | help
Hello, I postet a bug fix for dump to Jordan, an also an excerpt of my enhanced dump and asked whether this is interesting for the FreeBSD project. He suggested to post this here to get a wider discussion. So, here I come: I've implemented an enhancement to dump that allows youy to restrict the dump to parts of a filesystem. So you can exclude (and include parts of this excluded part) parts of a filesystem which you do not need to have dumped, or do not want to. The enhancement is completly upward compatible; if you do not use it, dump behaves exactly as before. I'll quote here the changes to the man-page of dump, so you can see what I've done: ================================================================================ DUMP(8) UNIX System Manager's Manual DUMP(8) NAME dump - filesystem backup SYNOPSIS dump [0123456789BbhfusTdWn [argument ...]] [filesystem] DESCRIPTION This version of dump is special in that it should behave as the tradi- tional dump, but knows some extensions. Look for this in the section GRAPH-EXTENSION. Everything else in this description is the same as the original. [... following unchanged text not quoted ... ] GRAPH-EXTENSION Previous versions of dump could only dump whole filesystems. It was not possible to restrict the dump to parts of a filesystem. This version of dump supports the handling of graph specifications. A graph specification is nothing more than an inode of the filesystem specified via a tradi- tional path string. You tell dump whether to include or exclude all in- odes (and the inode itself) below the specified inode. These options must be placed after the arguments and before the filesystem arguments. If no such option is given, dump behaves exactly as versions without this fea- ture If the graph mode of dump is used, dump performs an additional pass over the filesystem to select those inodes, which have to be dumped ac- cording to the graph specification. -i include-path this option tells dump to include the specified inode and all in- odes below in the dump. -e exclude-path this option tells dump to exclude the specified inode and all in- odes below from the dump. -g graph-file If it is too cumbersome to specify the include and exlude paths on the commandline, this information can be placed into the graph- file. The format of this file is simple: the first column is one of the characters i or e followed by a blank, followed by the path- name. -d directory This option is very special, and its existence is merely due to easy integration of the graph feature into the amanda backup sys- tem. (Really it was the other way; the amanda system initiated the implementation of the partial dump feature). This version of dump recognizes extensions to the filesystem-device This extension is seperated from the real device name with a dot. The extension names a graph file which is found in the directory given with the -d option. This way, the only modification to amanda necessary is when calling the dump command (adding this -d option). The disklist contains the real file-system device names extended with the names of graph files. For example the command dump 1f - -d /usr/local/amanda/etc/ /dev/rdsk/3s0.usr instructs dump to look for a graphfile /usr/local/amanda/etc/usr and dumps only those parts of the filesystem on /dev/rdsk/3s0 spec- ified in the graphfile. [ ... FILES, SEE ALSO, DIAGNOSTICS remain the same, so no quoted here ... ] BUGS Fewer than 32 read errors on the filesystem are ignored. Each reel re- quires a new process, so parent processes for reels already written just hang around until the entire tape is written. Dump with the W or w options does not report filesystems that have never been recorded in _tc/dumpdates, even if listed in /etc/fstab. It would be nice if dump knew about the dump sequence, kept track of the tapes scribbled on, told the operator which tape to mount when, and pro- vided more assistance for the operator running restore. When using the graph feature of dump it cannot determine the device-file where the filesystem resides when only the mountpoint is given. This is due to the lazyness of the implementor to support the different mounttab layouts of different Unix flavours. HISTORY A dump command appeared in Version 6 AT&T UNIX. The graph feature was implemented by Elmar Bartel <bartel@informatik.tu- muenchen.de> in 1994. 4th Berkeley Distribution June 16, 1993 4 ================================================================================ So if there is interest to include this into the normal FreeBSD distribition let me know, where to put the source. What I have to mention: this source contains additional #ifdefs for HPUX, SunOS, SunSolaris and DecUltrix; I think that should not disturb anyone. Yours, Elmar Bartel, RBG. -- preferred: bartel@informatik.tu-muenchen.de secondary: fax: +49 89 2105-8232 or phone: -2025 Last resort: Institut fuer Informatik, TU Muenchen, Arcisstrasse 21, D-80333 Muenchen, Germany ... frau kann durch einen deutschen Artikel nicht diskriminiert werden.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?95Oct24.221648%2B0100mesz.219872%2B3242>