aboutsummaryrefslogtreecommitdiff
path: root/sbin/dump
Commit message (Collapse)AuthorAgeFilesLines
* Switch the default WARNS level for sbin/ to 6.Ruslan Ermilov2009-10-191-0/+1
| | | | | | | Submitted by: Ulrich Spörlein Notes: svn path=/head/; revision=198236
* Make dump -W show the level correctly.Brian Somers2009-05-291-1/+1
| | | | | | | | | PR: 129110 Submitted by: Mike Voorhis <mvoorhis@cs.wpi.edu> MFC after: 3 weeks Notes: svn path=/head/; revision=193022
* Verify that the filesystem being referenced in fstab is indeed a UFSCy Schubert2009-03-021-2/+3
| | | | | | | | | | | filesystem. This avoids confusion with nullfs and unionfs filesystems which reference the root of a UFS filesystem as a target. PR: 116849 Approved by: kib Notes: svn path=/head/; revision=189267
* Expand dump to allow MAX_INT dump levels.Kirk McKusick2008-05-243-14/+21
| | | | | | | | PR: bin/100732 Submitted by: Matthew Vincenz <msvincen@midway.uchicago.edu> Notes: svn path=/head/; revision=179275
* When using dump to generate level 0 dumps which are then rsync'edKirk McKusick2008-05-234-4/+51
| | | | | | | | | | | | | | | to a remote machine, the fact that the dump date is stored with each header (inode) record makes rsync significantly less efficient than necessary. This also applies to inode access times when they are not important data to retain. When implementing an offsite backup solution of this type, these dates in particular are not important, especially if it prevents effective offsite backups. PR: bin/91049 Submitted by: Forrest W Christian <fwc@mt.net> Notes: svn path=/head/; revision=179267
* (bread): For a read that is contained entirely within a block, never copyThomas Quinot2007-04-051-1/+1
| | | | | | | | | | | out more than size bytes to the caller's buffer. PR: bin/111191 Reviewed by: pb MFC after: 1 week Notes: svn path=/head/; revision=168392
* Fix an error in dumping large sparse files containing extended attributes.Kirk McKusick2007-02-271-2/+2
| | | | Notes: svn path=/head/; revision=167055
* Update the dump program to save extended attributes. UpdateKirk McKusick2007-02-262-20/+166
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the restore program to restore all dumped extended attributes. If the restore is running as root, it will always be able to restore all extended attributes. If it is not running as root, it makes a best effort to set them. Using the -v command line flag or the `verbose' command in interactive mode will display all the extended attributes being set on files (and at the end on directories) that are being restored. It will note any extended attributes that could not be set. The extended attributes are placed on the dump image immediately following each file's data. Older versions of restore can work with the newer dump images. Old versions of restore will correctly restore the file data and then (silently) skip over the extended attribute data and proceed to the next file. This resolves PR 93085 which will be closed once the code has been MFC'ed. Note that this code will not compile until these header files have been updated: <protocols/dumprestore.h> and <sys/extattr.h>. PR: bin/93085 Comments from: Poul-Henning Kamp and Robert Watson MFC after: 3 weeks Notes: svn path=/head/; revision=167011
* Make "dump /filesystem" (without options) work.Ruslan Ermilov2006-10-121-2/+5
| | | | | | | | PR: docs/84408 MFC after: 3 days Notes: svn path=/head/; revision=163280
* Markup fixes.Ruslan Ermilov2006-09-181-7/+11
| | | | Notes: svn path=/head/; revision=162395
* Clarify documentation of '-L' command line switch: the snapshot isThomas Quinot2006-08-161-1/+2
| | | | | | | | | | | | unlinked as soon as the dump starts (and removed when the dump is completed, and the dump process exits). Previous wording was confusing because users might expect the snapshot to be visible in the .snap subdirectory while dump is running. MFC after: 1 week Notes: svn path=/head/; revision=161362
* If rawname returns NULL, deal with it appropriately.Matt Jacob2006-08-151-0/+2
| | | | | | | | | PR: 94045 Submitted by: Andrey Elsukov MFC after: 1 week Notes: svn path=/head/; revision=161333
* Eliminate a pair of unneeded parentheses slipped in from previous version ofDmitry Morozovsky2006-08-061-1/+1
| | | | | | | | | fix. Noticed by: ru Notes: svn path=/head/; revision=161025
* strlen(3) returns size_t, which is not strictly equivalent to int an 64-bitDmitry Morozovsky2006-08-061-3/+4
| | | | | | | | | | archs, hence printf(3) warning. Fix this. Noticed by: tinderbox Approved by: rse Notes: svn path=/head/; revision=161017
* Do not pass-through the tailing newline character from the ctime(3)Ralf S. Engelschall2006-08-051-3/+5
| | | | | | | | | | | output to setproctitle(3) in order to get rid of the ugly two-character escape sequence "\n" in the ps(1) output of a dump(8) process: << [...] finished in 0:00 at Sat Aug 5 14:44:39 2006\n (dump) >> [...] finished in 0:00 at Sat Aug 5 14:44:39 2006 (dump) Notes: svn path=/head/; revision=161000
* Dump keeps a bitmap of the state of various inodes, which is sizedDavid Malone2006-04-111-8/+20
| | | | | | | | | | | | | to match the number of inodes on the disk. If we find a directory entry with a crazy inode number in it, don't look beyond the end of the bitmap to find that inode's state. Instead skip that directory entry and print a warning. Reviewed by: iedowse MFC after: 3 weeks Notes: svn path=/head/; revision=157660
* Revert a minor glitch of revision 1.69Giorgos Keramidas2006-02-241-2/+2
| | | | | | | | Submitted by: Andriy Tkachuk <andrit@ukr.net> X-MFC after: RE approval Notes: svn path=/head/; revision=155981
* Add the example that green@ used in his commit log for the dump to aWarner Losh2005-12-231-1/+8
| | | | | | | | pipe functionality. I've done a cvs log main.c about a dozen times now. Maybe others will find this useful. Notes: svn path=/head/; revision=153674
* Correct the description of the TAPE environment variable.Ceri Davies2005-07-311-1/+5
| | | | | | | | | | | Based on: PR: docs/84200 Submitted by: Gary W. Swearingen <garys at opusnet dot com> MFC after: 1 week Notes: svn path=/head/; revision=148600
* Make gcc4 happy by making consistent signedness.Xin LI2005-05-021-1/+1
| | | | Notes: svn path=/head/; revision=145794
* 'r' disk devices no longer exist, so don't try to create a pathnameWarner Losh2005-04-181-20/+10
| | | | | | | | | | that has an 'r' in it. This also eliminates a bogus use of strlcat. PR: 80064 Notes: svn path=/head/; revision=145238
* Use a signal-safe type for two variables that are used to synchroniseIan Dowse2005-03-021-2/+2
| | | | | | | | | with a signal handler. This fixes a race condition introduced by compiler reordering that caused dump to sometimes get stuck, especially while dumping large filesystems. Notes: svn path=/head/; revision=142968
* va_list style tweaksDavid E. O'Brien2005-02-161-1/+2
| | | | Notes: svn path=/head/; revision=141965
* Sync program's usage() with manpage's SYNOPSIS.Ruslan Ermilov2005-02-101-2/+2
| | | | Notes: svn path=/head/; revision=141611
* Improved error checking for existence of a .snap directory toWes Peters2005-01-212-18/+29
| | | | | | | | | | | 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 Notes: svn path=/head/; revision=140602
* Sort sections.Ruslan Ermilov2005-01-181-11/+11
| | | | Notes: svn path=/head/; revision=140415
* Added the EXIT STATUS section where appropriate.Ruslan Ermilov2005-01-171-1/+1
| | | | Notes: svn path=/head/; revision=140368
* Clearer va-args usage.David E. O'Brien2004-12-301-4/+3
| | | | | | | Submitted by: bde Notes: svn path=/head/; revision=139422
* o Do not dump core in -W if dumpdates was not readable and ddatev == NULL.Maxim Konovalov2004-12-022-5/+2
| | | | | | | | | | | | PR: bin/69977 o Remove unused ddates_in. Obtained from: NetBSD MFC after: 3 weeks Notes: svn path=/head/; revision=138314
* Avoid casts as lvalues.Alexander Kabaev2004-07-281-2/+8
| | | | Notes: svn path=/head/; revision=132762
* Print the `99.99% done, finished soon' message only as often as theIan Dowse2004-06-191-2/+5
| | | | | | | | | | normal status messages. Previously a large number of these new messages could be spewed out towards the end of a dump. Reviewed by: imp Notes: svn path=/head/; revision=130753
* Enter the 1990's and assume that the computer knows what time it is.Warner Losh2004-05-211-16/+23
| | | | | | | | | Print the ETA of dump being finished, rather than a cryptic delta time. Also, if we have written more blocks than the tapesize, assume that we are 99.99% done and that we'll be finished 'soon'. Notes: svn path=/head/; revision=129556
* Assorted markup, grammar, and spelling fixes.Ruslan Ermilov2004-05-171-14/+24
| | | | Notes: svn path=/head/; revision=129327
* Add -P arguments for dump(8) and restore(8) which allow the user toBrian Feldman2004-04-134-20/+84
| | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=128175
* Improve the warnings for dump -L and do not bother doing the snapshot ifBrian Feldman2004-04-122-3/+11
| | | | | | | | | | it is specified for read-only filesystems. Submitted by: Jason Young <jyoung8607@hotmail.com> PR: 46672 Notes: svn path=/head/; revision=128166
* Fixed unformatting of copyright clause 4 in previous commit.Bruce Evans2004-04-101-1/+1
| | | | Notes: svn path=/head/; revision=128085
* Remove advertising clause from University of California Regent's license,Mark Murray2004-04-0910-41/+1
| | | | | | | | | per letter dated July 22, 1999. Approved by: core, imp Notes: svn path=/head/; revision=128073
* Add RSH to the list of enviroment variables.Alexander Langer2004-01-151-0/+3
| | | | Notes: svn path=/head/; revision=124551
* Define _PATH_MKSNAP_FFS and use it in dump(8) instead of assumingIan Dowse2004-01-041-2/+2
| | | | | | | | | that mksnap_ffs(8) can be found using the current $PATH. Reviewed by: mckusick Notes: svn path=/head/; revision=124132
* Document that the live dump command (`dump -L') creates its snapshotKirk McKusick2003-11-181-1/+12
| | | | | | | | | | in the .snap directory in the root of the filesystem being dumped. Document that if the .snap directory is missing that it must be created manually and that it should be owned by user root and group operator and set to mode 770 before a live dump can be run. Notes: svn path=/head/; revision=122874
* Convert the live dump command (`dump -L') to use mksnap_ffs insteadKirk McKusick2003-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. Notes: svn path=/head/; revision=122787
* Make this WARNS=2 clean byJohan Karlsson2003-11-143-5/+5
| | | | | | | | | | | | | - 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 Notes: svn path=/head/; revision=122669
* - add explanation of what an active file system isKen Smith2003-11-051-2/+14
| | | | | | | | | | | - explain the reason for permitting 32 read errors for a dump PR: docs/35602 and docs/35607 Reviewed by: jhb Approved by: blackend (mentor) Notes: svn path=/head/; revision=122140
* In mapdirs(), do not use the `dp' inode pointer after searchdir()Ian Dowse2003-11-041-3/+3
| | | | | | | | | | | | | | | | | has been called, since it points to a shared inode buffer that may be overwritten. The two cases where `dp' was used incorrectly appear to have been overlooked when "nodump" inheritance was first added in revision 1.12. This is reported to correct propagation of the nodump flag on directories that are larger than one block in size. PR: bin/58912 Submitted by: Volker Paepcke <vpaepcke@incore.de> MFC after: 1 week Notes: svn path=/head/; revision=122060
* Add missing prototype for cread().Ian Dowse2003-11-041-0/+1
| | | | Notes: svn path=/head/; revision=122047
* revert to version 1.25 and use va_copy to obtain another copy of thePaul Saab2003-09-211-2/+5
| | | | | | | | | | variable arguments. version 1.26 incorrectly truncated the message if the buffer was too long. Requested by: bde Notes: svn path=/head/; revision=120323
* Fix improper use of varargs.Paul Saab2003-09-201-2/+2
| | | | | | | Reviewed by: peter Notes: svn path=/head/; revision=120306
* Remove reference to max block size. dump no longer limits the block size.Greg Lehey2003-07-141-13/+1
| | | | Notes: svn path=/head/; revision=117533
* Add section number to .XrPhilippe Charnier2003-06-081-1/+1
| | | | Notes: svn path=/head/; revision=116035
* Dump is hard-wired to believe that it can read disks onKirk McKusick2003-05-072-4/+48
| | | | | | | | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=114810