summaryrefslogtreecommitdiffstats
path: root/sbin/dump/main.c
Commit message (Collapse)AuthorAgeFilesLines
* 'r' disk devices no longer exist, so don't try to create a pathnameimp2005-04-181-20/+10
| | | | | | | that has an 'r' in it. This also eliminates a bogus use of strlcat. PR: 80064
* Sync program's usage() with manpage's SYNOPSIS.ru2005-02-101-2/+2
|
* Improved error checking for existence of a .snap directory towes2005-01-211-15/+26
| | | | | | | | generate snapshots in when -L is requested. If the .snap directory does not exist, or is not a directory, issue a warning and revert to the non- live behavior. Obtained from: St. Bernard Software RAPID
* Add -P arguments for dump(8) and restore(8) which allow the user togreen2004-04-131-7/+21
| | | | | | | | | | | use backup methods other than files and tapes. The -P argument is a normal sh(1) pipeline with either $DUMP_VOLUME or $RESTORE_VOLUME defined in the environment, respectively. For example, I can back up my home to three DVD+R[W]s as so: Filesystem 1K-blocks Used Avail Capacity Mounted on /dev/ad0s2e 40028550 10093140 26733126 27% /home green# dump -0 -L -C16 -B4589840 -P 'growisofs -Z /dev/cd0=/dev/fd/0' /home
* Improve the warnings for dump -L and do not bother doing the snapshot ifgreen2004-04-121-3/+10
| | | | | | | it is specified for read-only filesystems. Submitted by: Jason Young <jyoung8607@hotmail.com> PR: 46672
* Remove advertising clause from University of California Regent's license,markm2004-04-091-4/+0
| | | | | | per letter dated July 22, 1999. Approved by: core, imp
* Define _PATH_MKSNAP_FFS and use it in dump(8) instead of assumingiedowse2004-01-041-2/+2
| | | | | | that mksnap_ffs(8) can be found using the current $PATH. Reviewed by: mckusick
* Convert the live dump command (`dump -L') to use mksnap_ffs insteadmckusick2003-11-161-12/+8
| | | | | | | | | | | | | | | of trying to directly create the snapshot itself. This change allows users logged into the system as operator to run live dumps. Note that dump no longer tries to create the snapshot in the root of the filesystem, but rather in a .snap directory in the root of the filesystem. The reason is that the operator is usually not permitted to write into the root of the filesystem. The newfs command and background fsck have both been modified to create a .snap directory in the root of the filesystem, but if neither of these have been run, then the .snap directory must be created manually by the superuser before a live dump can be run. The .snap directory should be owned by user root and group operator and set to mode 770.
* Make this WARNS=2 clean byjohan2003-11-141-3/+4
| | | | | | | | | | - using (intmax_t) and %j - giving a non-empty format string to msg() Include <stdint.h> directly instead of depending on <inttypes.h> to do it. Tested by: make universe
* 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
|
OpenPOWER on IntegriCloud