summaryrefslogtreecommitdiffstats
path: root/sbin/dump/main.c
Commit message (Collapse)AuthorAgeFilesLines
* Dump is hard-wired to believe that it can read disks onmckusick2003-05-071-0/+1
| | | | | | | | | | | | | | | | | | 1024-byte boundaries. For many years this was a reasonable assumption. However, in recent years we have begun seeing devices with 2048-byte sectors. These devices return errors when dump tries to read starting in the middle of a sector or when it tries to read only the first half of a sector. Rather than change the native block size used by dump (and thus create an incompatible dump format), this fix checks for transfer requests that start and/or end on a non-sector boundary. When such a read is detected, the new code reads the entire sector and copies out just the part that dump needs. Reviewed by: Poul-Henning Kamp <phk@critter.freebsd.dk> Approved by: re (John Baldwin <jhb@FreeBSD.org>) Sponsored by: DARPA & NAI Labs.
* Removed all vestiges of KerberosIV.ru2003-05-011-5/+3
|
* De-Kerberise (KerberosIV). KerberosIV is no longer present, andmarkm2003-05-011-14/+0
| | | | | remote backups can still be done with Kerberos authentication using SSH and Kerberos 5.
* Avoid a name conflict with future functionality:mdodd2003-04-071-1/+1
| | | | getfstab() -> dump_getfstab()
* Sort options.ru2003-02-231-17/+17
|
* really, this time for sure. Fix formatting in usage().dillon2003-01-131-2/+2
|
* Grr. I keep forgetting things. Include -C in dump's usage() .dillon2003-01-131-1/+1
|
* Add support for obsolete option form for -Cdillon2003-01-131-0/+1
|
* Add a caching option to dump. Use -C. Note that NetBSD has a caching optiondillon2003-01-131-2/+7
| | | | | | | | | | | | | | | | | | | called -r but it takes 512 byte blocks instead of megabytes, and I felt a megabytes specification would be far more useful so I did not use the same option character. This will *greatly* improve dump performance at the cost of possibly missing filesystem changes that occur between passes, and does a fairly good job making up for the loss of buffered block devices. Caching is disabled by default to retain historical behavior. In tests, dump performance improved by about 40% when dumping / or /usr. Beware that dump forks and the cache may wind up being larger then you specify, but a more complex shared memory implementation would not produce results that are all that much better so I kept it simple for now. MFC after: 3 days
* Add the `L' option to dump to notify it that it is dumping amckusick2002-12-031-14/+81
| | | | | | | | | | | | | | | live filesystem. To obtain a consistent dump image, dump takes a snapshot of the filesystem and then does a dump of the snapshot. The snapshot is removed when the dump is complete. Also add an operator warning that the `L' option should be used if dump is run on a live filesystem without the `L' option being specified. The alternative would be to silently use a snapshot any time that a live filesystem is dumped, but this change in dump semantics seemed too drastic at this time. Sponsored by: DARPA & NAI Labs. Approved by: re
* Create a new 32-bit fs_flags word in the superblock. Add code to movemckusick2002-11-271-2/+1
| | | | | | | | | | | | | | | | | the old 8-bit fs_old_flags to the new location the first time that the filesystem is mounted by a new kernel. One of the unused flags in fs_old_flags is used to indicate that the flags have been moved. Leave the fs_old_flags word intact so that it will work properly if used on an old kernel. Change the fs_sblockloc superblock location field to be in units of bytes instead of in units of filesystem fragments. The old units did not work properly when the fragment size exceeeded the superblock size (8192). Update old fs_sblockloc values at the same time that the flags are moved. Suggested by: BOUWSMA Barry <freebsd-misuser@netscum.dyndns.dk> Sponsored by: DARPA & NAI Labs.
* Changed "file system" back to "filesystem" in the usage message. Englishbde2002-10-011-3/+3
| | | | | | | | rules don't apply to tokens that are supposed to represent single args. This was only fixed in the man page. Fixed other differences between the man page and the usage message (1 formatting bug and 1 syntax bug).
* Use the standardized CHAR_BIT constant instead of NBBY in userland.mike2002-09-251-3/+4
|
* s/filesystem/file system/g as discussed on -developerstrhodes2002-08-211-6/+6
|
* Replace the use of %qd with intmax_t/%jd and fix a number of -Walliedowse2002-07-081-8/+9
| | | | | | | and -Wformat warnings: o Include timeconv.h for the time conversion functions. o Remove unused variables. o Correct a few cases where %d was used when printing longs.
* This commit adds basic support for the UFS2 filesystem. The UFS2mckusick2002-06-211-25/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | filesystem expands the inode to 256 bytes to make space for 64-bit block pointers. It also adds a file-creation time field, an ability to use jumbo blocks per inode to allow extent like pointer density, and space for extended attributes (up to twice the filesystem block size worth of attributes, e.g., on a 16K filesystem, there is space for 32K of attributes). UFS2 fully supports and runs existing UFS1 filesystems. New filesystems built using newfs can be built in either UFS1 or UFS2 format using the -O option. In this commit UFS1 is the default format, so if you want to build UFS2 format filesystems, you must specify -O 2. This default will be changed to UFS2 when UFS2 proves itself to be stable. In this commit the boot code for reading UFS2 filesystems is not compiled (see /sys/boot/common/ufsread.c) as there is insufficient space in the boot block. Once the size of the boot block is increased, this code can be defined. Things to note: the definition of SBSIZE has changed to SBLOCKSIZE. The header file <ufs/ufs/dinode.h> must be included before <ufs/ffs/fs.h> so as to get the definitions of ufs2_daddr_t and ufs_lbn_t. Still TODO: Verify that the first level bootstraps work for all the architectures. Convert the utility ffsinfo to understand UFS2 and test growfs. Add support for the extended attribute storage. Update soft updates to ensure integrity of extended attribute storage. Switch the current extended attribute interfaces to use the extended attribute storage. Add the extent like functionality (framework is there, but is currently never used). Sponsored by: DARPA & NAI Labs. Reviewed by: Poul-Henning Kamp <phk@freebsd.org>
* more file system > filesystemtrhodes2002-05-161-3/+3
|
* Sigh, more BBSIZE related breakage.phk2002-05-121-0/+1
| | | | Sponsored by: DARPA & NAI Labs.
* o remove __Pimp2002-03-201-21/+12
| | | | | o Use ANSI function definitions o unifdef -D__STDC__
* Add a new "-S" flag to dump to allow it just print out dump estimateiedowse2002-03-011-3/+15
| | | | | | | | | size and then exit. PR: bin/35450 Submitted by: Mark Hannon <markhannon@optushome.com.au> Obtained from: NetBSD MFC after: 1 week
* Supply progress information in dump's process title, which is usefuliedowse2002-02-161-0/+8
| | | | | | | | for monitoring automated backups. This is based on a patch by Mikhail Teterin, with some changes to make its operation clearer and to update the proctitle more frequently. PR: bin/32138
* I've been meaning to do this for a while. Add an underscore to thedillon2002-01-191-3/+3
| | | | | | | | time_to_xxx() and xxx_to_time() functions. e.g. _time_to_xxx() instead of time_to_xxx(), to make it more obvious that these are stopgap functions & placemarkers and not meant to create a defacto standard. They will eventually be replaced when a real standard comes out of committee.
* Zap a number of #ifdef sunos blocks, and all of the `register'iedowse2001-11-171-12/+6
| | | | keywords.
* Give a sensible error message when the filesystem to be dumped isiedowse2001-11-161-4/+7
| | | | | | | | | not listed in /etc/fstab. Previously, the user would be greeted with "DUMP: bad sblock magic number" when dump tried to parse the directory contents as an FFS filesystem. PR: bin/12789 Submitted by: Bob Willcox <bob@pmr.com>
* Make the protocol/dumprestore.h header match restore's idea of the dumpdillon2001-10-281-6/+17
| | | | | | | | header for the case where sizeof(time_t) != sizeof(int). dumprestore.h was embedding time_t when it should have been embedding int32_t. Use time_to_time32() and time32_to_time() to convert between the protocoll/file-format time and time_t.
* SECURITY.ru2001-09-051-1/+0
| | | | | | | | Notify operators using wall(1)'s -g option. Drop ``setgid tty'' privilege. Obtained from: OpenBSD MFC after: 1 month
* Add manual page and usage for dump -D (supplied by Dima Dorfman) (will alsodillon2001-07-091-2/+3
| | | | | | be MFC'd) Submitted by: Dima Dorfman <dima@unixfreak.org>
* Oops, forgot to add 'D' to the option morphing block.dillon2001-07-081-0/+1
|
* Add a -D option to dump, allowing the path for the /etc/dumpdates file to bedillon2001-07-081-2/+6
| | | | | | | changed, so independant entities backing up the same thing to different media can be made not to trip over each other. MFC after: 3 days
* Since we use getopt (in rev. 1.12), there's no need for the case's fordd2001-06-091-2/+0
| | | | | | | | the individual options to increment argv and decrement argc. This caused the -T option to swallow an extra argument. PR: 27982 Submitted by: Samuel Greear <sgreear@vsni.com>
* Use \a instead of \007 for making noise.phk2001-01-281-1/+1
| | | | Submitted by: "Jason Smethers" <jsmethers@pdq.net>
* Avoid rawname() stupidly prepending an `r' before the device name evenjoerg2000-04-021-1/+14
| | | | | | | | | | | in cases where the supplied name was already pointing to a character special device. This fixes the breakage that occured when trying to dump a filesystem by name (e. g. /usr), with an fstab already mentioning the raw device name (like /dev/rda0g) where dump attempted to use /dev/rrda0g then. Also removed the now obsolete remark that fstab were carrying block special names.
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Fix typo in dump reportingjmz1999-05-241-3/+4
| | | | | PR: bin/10573 Submitted by: Christian Weisgerber <naddy@mips.rhein-neckar.de>
* checked, that new sa CAM driver takes care of using buffer sizesandreas1998-09-161-15/+1
| | | | | | | | <= 64 KB. Was able to dump/restore with block sizes of 96, 128 and 200. using systat -vmstat I noticed transfer blocksizes <= 64KB, so physio's limits aren't touched. Since this check was originally from me, I feels safe now to back it out.
* Make `dump' exit codes confirm to manual page.jkoshy1998-07-141-12/+12
| | | | | PR: 5346 Style-check-by: bde
* Correct use of .Nm. Add rcsid. Remove unused #includes.charnier1998-06-151-6/+8
|
* Add Id. Cosmetic in usage string.charnier1997-06-101-3/+6
|
* Implement Kerberized rcmd for rdump/rrestore. This is lacking thewollman1997-04-291-4/+21
| | | | | | | options one would normally expect to set the realm, enable encryption, and whatnot, but this actually is able to contact the remote server, so at least it's a start. (As a bonus, the stripped static binary is unquestionably exportable.)
* The -a option (autosize) option got mangled during the Lite2 merge.peter1997-03-151-3/+2
| | | | Pointed out by: Tom Jackson <tom@peeper.jackson.org>
* Merge Lite2 changes (rather bigish, the dump/restore folks should check)peter1997-03-111-119/+150
|
* Add the `a' option (``auto-size'') to bypass all tape lengthjoerg1997-02-011-7/+18
| | | | considerations, and dump right to the end of medium.
* Fix double typopeter1997-01-081-1/+1
|
* Fix many buffer overflows, correct usage of strcat and implementimp1997-01-071-3/+11
| | | | | | | $TAPE. Inspired by OpenBSD's work in this area. Reviewed by: Peter Wemm, Guido van Rooij and Jordan Hubbard. Obtained from: OpenBSD
* bin/1789: dump estimates a negative number of tapes needed for huge dumpspst1997-01-071-4/+4
|
* Don't use __dead or __pure in user code. They were obfuscationsbde1996-09-141-2/+2
| | | | | | for gcc >= 2.5 and no-ops for gcc >= 2.6. Converted to use __dead2 or __pure2 where it wasn't already done, except in math.h where use of __pure was mostly wrong.
* Put the superfluous "DUMP:" back in the statistics line, to makejoerg1995-12-231-2/+2
| | | | Amanda happy.
* Andreas Klemm's patch set for dump(8), with some minor (cosmetic)joerg1995-11-181-9/+27
| | | | | | | | | | | | | | | | changes and one addition by me. . Use reasonable defaults for the tape drive (/dev/rst0) instead of something we actually don't have. . Add a summary line displaying the alapsed time and the total throughput. . Replace "rmt" for the remote location of rmt(8) by "/etc/rmt", since this is the historical protocol, and relying on the $PATH causes a big pain. Make it adjustable via an environmental variable though. Reviewed by: joerg (for Andreas' part) Submitted by: andreas@knobel.gun.de (Andreas Klemm)
* Fix a silly bug where MAXPATHLEN was subtracted from the string length ratherjkh1995-10-241-2/+2
| | | | | than the other way around! Submitted by: Elmar Bartel <bartel@informatik.tu-muenchen.de>
* Remove trailing whitespace.rgrimes1995-05-301-2/+2
|
OpenPOWER on IntegriCloud