History log of /freebsd-current/sbin/dump/main.c
Revision Date Author Comments
# 0b8224d1 24-Nov-2023 Warner Losh <imp@FreeBSD.org>

Remove copyright strings ifdef'd out

We've ifdef'd out the copyright strings for some time now. Go ahead and
remove the ifdefs. Plus whatever other detritis was left over from other
recent removals. These copyright strings are present in the comments and
are largely from CSRG's attempt at adding their copyright to every
binary file (which modern interpretations of the license doesn't
require).

Sponsored by: Netflix


# 51e16cb8 23-Nov-2023 Warner Losh <imp@FreeBSD.org>

sbin: Remove ancient SCCS tags.

Remove ancient SCCS tags from the tree, automated scripting, with two
minor fixup to keep things compiling. All the common forms in the tree
were removed with a perl script.

Sponsored by: Netflix


# eba230af 25-Sep-2023 John Baldwin <jhb@FreeBSD.org>

Purge more stray embedded $FreeBSD$ strings

These do not use __FBSDID but instead use bare char arrays.

Reviewed by: imp, emaste
Differential Revision: https://reviews.freebsd.org/D41957


# b21582ee 30-Jul-2022 Kirk McKusick <mckusick@FreeBSD.org>

Add a flags parameter to the ffs_sbget() function that reads UFS superblocks.

Rather than trying to shoehorn flags into the requested superblock
address, create a separate flags parameter to the ffs_sbget()
function in sys/ufs/ffs/ffs_subr.c. The ffs_sbget() function is
used both in the kernel and in user-level utilities through export
to the sbget() function in the libufs(3) library (see sbget(3)
for details). The kernel uses ffs_sbget() when mounting UFS
filesystems, in the glabel(8) and gjournal(8) GEOM utilities,
and in the standalone library used when booting the system
from a UFS root filesystem.

The ffs_sbget() function reads the superblock located at the byte
offset specified by its sblockloc parameter. The value UFS_STDSB
may be specified for sblockloc to request that the standard
location for the superblock be read.

The two existing options are now flags:

UFS_NOHASHFAIL will note if the check hash is wrong but will still
return the superblock. This is used by the bootstrap code to
give the system a chance to come up so that fsck can be run to
correct the problem.

UFS_NOMSG indicates that superblock inconsistency error messages
should not be printed. It is used by programs like fsck that
want to print their own error message and programs like glabel(8)
that just want to know if a UFS filesystem exists on a partition.

One additional flag is added:

UFS_NOCSUM causes only the superblock itself to be returned, but does
not read in any auxiliary data structures like the cylinder group
summary information. It is used by clients like glabel(8) that
just want to check for possible filesystem types. Using UFS_NOCSUM
skips the superblock checks for csum data which allows superblocks
that have corrupted csum data to be read and used.

The validate_sblock() function checks that the superblock has not
been corrupted in a way that can crash or hang the system. Unless
the UFS_NOMSG flag is specified, it will print out any errors that
it finds. Prior to this commit, validate_sblock() returned as soon
as it found an inconsistency so would print at most one message.
It now does all its checks so when UFS_NOMSG has not been specified
will print out everything that it finds inconsistent.

Sponsored by: The FreeBSD Foundation


# d485c77f 18-Feb-2021 Konstantin Belousov <kib@FreeBSD.org>

Remove #define _KERNEL hacks from libprocstat

Make sys/buf.h, sys/pipe.h, sys/fs/devfs/devfs*.h headers usable in
userspace, assuming that the consumer has an idea what it is for.
Unhide more material from sys/mount.h and sys/ufs/ufs/inode.h,
sys/ufs/ufs/ufsmount.h for consumption of userspace tools, with the
same caveat.

Remove unacceptable hack from usr.sbin/makefs which relied on sys/buf.h
being unusable in userspace, where it override struct buf with its own
definition. Instead, provide struct m_buf and struct m_vnode and adapt
code to use local variants.

Reviewed by: mckusick
Tested by: pho
Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D28679


# 33ceb489 03-Apr-2020 Kirk McKusick <mckusick@FreeBSD.org>

Clean up global variable declarations in the dump and restore
utilities so that they will compile with -fno-common.

Started by: Kyle Evans (kevans)
Reviewed by: Kyle Evans (kevans)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D24210


# fb14e73c 05-Dec-2018 Kirk McKusick <mckusick@FreeBSD.org>

Normally when an attempt is made to mount a UFS/FFS filesystem whose
superblock has a check-hash error, an error message noting the
superblock check-hash failure is printed and the mount fails. The
administrator then runs fsck to repair the filesystem and when
successful, the filesystem can once again be mounted.

This approach fails if the filesystem in question is a root filesystem
from which you are trying to boot. Here, the loader fails when trying
to access the filesystem to get the kernel to boot. So it is necessary
to allow the loader to ignore the superblock check-hash error and make
a best effort to read the kernel. The filesystem may be suffiently
corrupted that the read attempt fails, but there is no harm in trying
since the loader makes no attempt to write to the filesystem.

Once the kernel is loaded and starts to run, it attempts to mount its
root filesystem. Once again, failure means that it breaks to its prompt
to ask where to get its root filesystem. Unless you have an alternate
root filesystem, you are stuck.

Since the root filesystem is initially mounted read-only, it is
safe to make an attempt to mount the root filesystem with the failed
superblock check-hash. Thus, when asked to mount a root filesystem
with a failed superblock check-hash, the kernel prints a warning
message that the root filesystem superblock check-hash needs repair,
but notes that it is ignoring the error and proceeding. It does
mark the filesystem as needing an fsck which prevents it from being
enabled for writing until fsck has been run on it. The net effect
is that the reboot fails to single user, but at least at that point
the administrator has the tools at hand to fix the problem.

Reported by: Rick Macklem (rmacklem@)
Discussed with: Warner Losh (imp@)
Sponsored by: Netflix


# 07436eeb 13-Nov-2018 Kirk McKusick <mckusick@FreeBSD.org>

Fix build break from dump incompatibility I introduced in -r340411

Pointy-hat to: mckusick


# d4f7db47 13-Nov-2018 Gleb Smirnoff <glebius@FreeBSD.org>

Plug build break after r340411.


# 37d6a8f4 11-Jun-2018 Warner Losh <imp@FreeBSD.org>

Revert size limits.

The size limits came from a flawed understanding of dump records.
The real issue was that dump was bogusly interpreting c_count
sometimes. r334978 fixes that.


# e26ce92b 11-Jun-2018 Warner Losh <imp@FreeBSD.org>

Don't initialize c_count. We don't need to.


# a86534e0 11-Jun-2018 Warner Losh <imp@FreeBSD.org>

Minor style polishing.

Declare c_count and initialize it with other ints.

Reported by: mjg@


# 803fec5f 11-Jun-2018 Diane Bruce <db@FreeBSD.org>

Large file systems with inodes > 512K have been silently overflowing
c_addr in spcl. So check before we start dumping otherwise we can
end up with a corrupted dump.

PR: 228807
Submitted by: db
Reviewed by: imp
Approved by: imp


# db9cb3e8 07-Jun-2018 Kirk McKusick <mckusick@FreeBSD.org>

Ensure proper initialization of superblock.

Submitted by: Diane Bruce


# d8ba45e2 16-Mar-2018 Ed Maste <emaste@FreeBSD.org>

Revert r313780 (UFS_ prefix)


# 1e2b9afc 16-Mar-2018 Ed Maste <emaste@FreeBSD.org>

Prefix UFS symbols with UFS_ to reduce namespace pollution

Followup to r313780. Also prefix ext2's and nandfs's versions with
EXT2_ and NANDFS_.

Reported by: kib
Reviewed by: kib, mckusick
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D9623


# dffce215 25-Jan-2018 Kirk McKusick <mckusick@FreeBSD.org>

Refactoring of reading and writing of the UFS/FFS superblock.
Specifically reading is done if ffs_sbget() and writing is done
in ffs_sbput(). These functions are exported to libufs via the
sbget() and sbput() functions which then used in the various
filesystem utilities. This work is in preparation for adding
subperblock check hashes.

No functional change intended.

Reviewed by: kib


# a770ae06 27-Dec-2017 Kirk McKusick <mckusick@FreeBSD.org>

In preparation for converting to libufs to read the superblock,
change conflicting function names:

getino => getinode
bread => blkread

No functional change.


# 8a16b7a1 20-Nov-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

General further adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 3-Clause license.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.


# fbbd9655 28-Feb-2017 Warner Losh <imp@FreeBSD.org>

Renumber copyright clause 4

Renumber cluase 4 to 3, per what everybody else did when BSD granted
them permission to remove clause 3. My insistance on keeping the same
numbering for legal reasons is too pedantic, so give up on that point.

Submitted by: Jan Schaumann <jschauma@stevens.edu>
Pull Request: https://github.com/freebsd/freebsd/pull/96


# f32d2926 30-Apr-2016 Pedro F. Giffuni <pfg@FreeBSD.org>

sbin: ake use of our rounddown() macro when sys/param.h is available.

No functional change.


# 4c8762f0 19-Apr-2016 Pedro F. Giffuni <pfg@FreeBSD.org>

dump: use NULL instead of zero for pointers.

Clean out the casts from calloc(3) while here.


# b3608ae1 03-Jan-2012 Ed Schouten <ed@FreeBSD.org>

Replace index() and rindex() calls with strchr() and strrchr().

The index() and rindex() functions were marked LEGACY in the 2001
revision of POSIX and were subsequently removed from the 2008 revision.
The strchr() and strrchr() functions are part of the C standard.

This makes the source code a lot more consistent, as most of these C
files also call into other str*() routines. In fact, about a dozen
already perform strchr() calls.


# 7649cb00 23-Jan-2011 Kirk McKusick <mckusick@FreeBSD.org>

The dump, fsck_ffs, fsdb, fsirand, newfs, makefs, and quot utilities
include sys/time.h instead of time.h. This include is incorrect as
per the manpages for the APIs and the POSIX definitions. This commit
replaces sys/time.h where necessary with time.h.

The commit also includes some minor style(9) header fixup in newfs.

This commit is part of a larger effort by Garrett Cooper started in
//depot/user/gcooper/posix-conformance-work/ -- to make FreeBSD more
POSIX compliant.

Submitted by: Garrett Cooper yanegomi at gmail dot com


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# fe0506d7 09-Mar-2010 Marcel Moolenaar <marcel@FreeBSD.org>

Create the altix project branch. The altix project will add support
for the SGI Altix 350 to FreeBSD/ia64. The hardware used for porting
is a two-module system, consisting of a base compute module and a
CPU expansion module. SGI's NUMAFlex architecture can be an excellent
platform to test CPU affinity and NUMA-aware features in FreeBSD.


# 6e064db9 04-Mar-2010 Xin LI <delphij@FreeBSD.org>

MFC r203459:

Plug two memory leaks in error case.


# 80ca1f34 03-Feb-2010 Xin LI <delphij@FreeBSD.org>

Plug two memory leaks in error case.

MFC after: 1 month


# d7f03759 19-Oct-2008 Ulf Lilleengen <lulf@FreeBSD.org>

- Import the HEAD csup code which is the basis for the cvsmode work.


# f72ab793 23-May-2008 Kirk McKusick <mckusick@FreeBSD.org>

Expand dump to allow MAX_INT dump levels.

PR: bin/100732
Submitted by: Matthew Vincenz <msvincen@midway.uchicago.edu>


# 693c40a3 23-May-2008 Kirk McKusick <mckusick@FreeBSD.org>

When using dump to generate level 0 dumps which are then rsync'ed
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>


# ef4e7805 12-Oct-2006 Ruslan Ermilov <ru@FreeBSD.org>

Make "dump /filesystem" (without options) work.

PR: docs/84408
MFC after: 3 days


# 90bdcf6b 15-Aug-2006 Matt Jacob <mjacob@FreeBSD.org>

If rawname returns NULL, deal with it appropriately.

PR: 94045
Submitted by: Andrey Elsukov
MFC after: 1 week


# f8aa7a83 18-Apr-2005 Warner Losh <imp@FreeBSD.org>

'r' disk devices no longer exist, so don't try to create a pathname
that has an 'r' in it.

This also eliminates a bogus use of strlcat.
PR: 80064


# 8d646af5 10-Feb-2005 Ruslan Ermilov <ru@FreeBSD.org>

Sync program's usage() with manpage's SYNOPSIS.


# 73e31afa 21-Jan-2005 Wes Peters <wes@FreeBSD.org>

Improved error checking for existence of a .snap directory to
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


# c51d70c6 12-Apr-2004 Brian Feldman <green@FreeBSD.org>

Add -P arguments for dump(8) and restore(8) which allow the user to
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


# f7c7b87f 12-Apr-2004 Brian Feldman <green@FreeBSD.org>

Improve the warnings for dump -L and do not bother doing the snapshot if
it is specified for read-only filesystems.

Submitted by: Jason Young <jyoung8607@hotmail.com>
PR: 46672


# 4c723140 09-Apr-2004 Mark Murray <markm@FreeBSD.org>

Remove advertising clause from University of California Regent's license,
per letter dated July 22, 1999.

Approved by: core, imp


# 6e3aaeb2 04-Jan-2004 Ian Dowse <iedowse@FreeBSD.org>

Define _PATH_MKSNAP_FFS and use it in dump(8) instead of assuming
that mksnap_ffs(8) can be found using the current $PATH.

Reviewed by: mckusick


# d46b5285 16-Nov-2003 Kirk McKusick <mckusick@FreeBSD.org>

Convert the live dump command (`dump -L') to use mksnap_ffs instead
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.


# 8a0453d6 14-Nov-2003 Johan Karlsson <johan@FreeBSD.org>

Make this WARNS=2 clean by
- 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


# 924a7003 07-May-2003 Kirk McKusick <mckusick@FreeBSD.org>

Dump is hard-wired to believe that it can read disks on
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.


# 44b81f0f 01-May-2003 Ruslan Ermilov <ru@FreeBSD.org>

Removed all vestiges of KerberosIV.


# 8edde085 01-May-2003 Mark Murray <markm@FreeBSD.org>

De-Kerberise (KerberosIV). KerberosIV is no longer present, and
remote backups can still be done with Kerberos authentication using
SSH and Kerberos 5.


# a3165d16 07-Apr-2003 Matthew N. Dodd <mdodd@FreeBSD.org>

Avoid a name conflict with future functionality:

getfstab() -> dump_getfstab()


# 1f6a4631 22-Feb-2003 Ruslan Ermilov <ru@FreeBSD.org>

Sort options.


# be013c3a 13-Jan-2003 Matthew Dillon <dillon@FreeBSD.org>

really, this time for sure. Fix formatting in usage().


# f2dddb66 13-Jan-2003 Matthew Dillon <dillon@FreeBSD.org>

Grr. I keep forgetting things. Include -C in dump's usage() .


# ea8123f9 13-Jan-2003 Matthew Dillon <dillon@FreeBSD.org>

Add support for obsolete option form for -C


# 5941e412 13-Jan-2003 Matthew Dillon <dillon@FreeBSD.org>

Add a caching option to dump. Use -C. Note that NetBSD has a caching option
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


# 194a6667 03-Dec-2002 Kirk McKusick <mckusick@FreeBSD.org>

Add the `L' option to dump to notify it that it is dumping a
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


# ada981b2 26-Nov-2002 Kirk McKusick <mckusick@FreeBSD.org>

Create a new 32-bit fs_flags word in the superblock. Add code to move
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.


# 4fb133ad 01-Oct-2002 Bruce Evans <bde@FreeBSD.org>

Changed "file system" back to "filesystem" in the usage message. English
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).


# 89fdc4e1 24-Sep-2002 Mike Barcroft <mike@FreeBSD.org>

Use the standardized CHAR_BIT constant instead of NBBY in userland.


# ce66ddb7 21-Aug-2002 Tom Rhodes <trhodes@FreeBSD.org>

s/filesystem/file system/g as discussed on -developers


# 617dbd3c 07-Jul-2002 Ian Dowse <iedowse@FreeBSD.org>

Replace the use of %qd with intmax_t/%jd and fix a number of -Wall
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.


# 1c85e6a3 21-Jun-2002 Kirk McKusick <mckusick@FreeBSD.org>

This commit adds basic support for the UFS2 filesystem. The UFS2
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>


# 3468b317 15-May-2002 Tom Rhodes <trhodes@FreeBSD.org>

more file system > filesystem


# 75766e17 12-May-2002 Poul-Henning Kamp <phk@FreeBSD.org>

Sigh, more BBSIZE related breakage.

Sponsored by: DARPA & NAI Labs.


# 2db673ab 20-Mar-2002 Warner Losh <imp@FreeBSD.org>

o remove __P
o Use ANSI function definitions
o unifdef -D__STDC__


# 9ac0768d 01-Mar-2002 Ian Dowse <iedowse@FreeBSD.org>

Add a new "-S" flag to dump to allow it just print out dump estimate
size and then exit.

PR: bin/35450
Submitted by: Mark Hannon <markhannon@optushome.com.au>
Obtained from: NetBSD
MFC after: 1 week


# 2bb823d2 16-Feb-2002 Ian Dowse <iedowse@FreeBSD.org>

Supply progress information in dump's process title, which is useful
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


# 170ac683 19-Jan-2002 Matthew Dillon <dillon@FreeBSD.org>

I've been meaning to do this for a while. Add an underscore to the
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.


# d2334e27 16-Nov-2001 Ian Dowse <iedowse@FreeBSD.org>

Zap a number of #ifdef sunos blocks, and all of the `register'
keywords.


# a50e99d1 16-Nov-2001 Ian Dowse <iedowse@FreeBSD.org>

Give a sensible error message when the filesystem to be dumped is
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>


# 5b3817c6 28-Oct-2001 Matthew Dillon <dillon@FreeBSD.org>

Make the protocol/dumprestore.h header match restore's idea of the dump
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.


# 4a315a9a 05-Sep-2001 Ruslan Ermilov <ru@FreeBSD.org>

SECURITY.

Notify operators using wall(1)'s -g option.
Drop ``setgid tty'' privilege.

Obtained from: OpenBSD
MFC after: 1 month


# 988d64c2 08-Jul-2001 Matthew Dillon <dillon@FreeBSD.org>

Add manual page and usage for dump -D (supplied by Dima Dorfman) (will also
be MFC'd)

Submitted by: Dima Dorfman <dima@unixfreak.org>


# cedae1f4 08-Jul-2001 Matthew Dillon <dillon@FreeBSD.org>

Oops, forgot to add 'D' to the option morphing block.


# 3860f781 08-Jul-2001 Matthew Dillon <dillon@FreeBSD.org>

Add a -D option to dump, allowing the path for the /etc/dumpdates file to be
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


# 33d3b9f8 08-Jun-2001 Dima Dorfman <dd@FreeBSD.org>

Since we use getopt (in rev. 1.12), there's no need for the case's for
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>


# bfa0b298 28-Jan-2001 Poul-Henning Kamp <phk@FreeBSD.org>

Use \a instead of \007 for making noise.

Submitted by: "Jason Smethers" <jsmethers@pdq.net>


# 04285c06 02-Apr-2000 Joerg Wunsch <joerg@FreeBSD.org>

Avoid rawname() stupidly prepending an `r' before the device name even
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.


# 7f3dea24 27-Aug-1999 Peter Wemm <peter@FreeBSD.org>

$Id$ -> $FreeBSD$


# 8878be20 23-May-1999 Jean-Marc Zucconi <jmz@FreeBSD.org>

Fix typo in dump reporting

PR: bin/10573
Submitted by: Christian Weisgerber <naddy@mips.rhein-neckar.de>


# 678bcd77 16-Sep-1998 Andreas Klemm <andreas@FreeBSD.org>

checked, that new sa CAM driver takes care of using buffer sizes
<= 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.


# f69e804d 14-Jul-1998 Joseph Koshy <jkoshy@FreeBSD.org>

Make `dump' exit codes confirm to manual page.

PR: 5346
Style-check-by: bde


# 7580ffbb 15-Jun-1998 Philippe Charnier <charnier@FreeBSD.org>

Correct use of .Nm. Add rcsid. Remove unused #includes.


# a1e5f53b 10-Jun-1997 Philippe Charnier <charnier@FreeBSD.org>

Add Id. Cosmetic in usage string.


# 1982ee69 29-Apr-1997 Garrett Wollman <wollman@FreeBSD.org>

Implement Kerberized rcmd for rdump/rrestore. This is lacking the
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.)


# 79aed3fe 14-Mar-1997 Peter Wemm <peter@FreeBSD.org>

The -a option (autosize) option got mangled during the Lite2 merge.

Pointed out by: Tom Jackson <tom@peeper.jackson.org>


# a37c38b8 10-Mar-1997 Peter Wemm <peter@FreeBSD.org>

Merge Lite2 changes (rather bigish, the dump/restore folks should check)


# 1811bdf3 11-Mar-1997 Peter Wemm <peter@FreeBSD.org>

Import some CSRG 4.4BSD-Lite2 components for sbin onto vendor branch.
(note that some of these have already been imported, this is a no-op)


# af00957e 01-Feb-1997 Joerg Wunsch <joerg@FreeBSD.org>

Add the `a' option (``auto-size'') to bypass all tape length
considerations, and dump right to the end of medium.


# 9e0dc595 07-Jan-1997 Peter Wemm <peter@FreeBSD.org>

Fix double typo


# f5dcc2f1 07-Jan-1997 Warner Losh <imp@FreeBSD.org>

Fix many buffer overflows, correct usage of strcat and implement
$TAPE. Inspired by OpenBSD's work in this area.

Reviewed by: Peter Wemm, Guido van Rooij and Jordan Hubbard.
Obtained from: OpenBSD


# 71fbc63c 07-Jan-1997 Paul Traina <pst@FreeBSD.org>

bin/1789: dump estimates a negative number of tapes needed for huge dumps


# eaa86f9d 13-Sep-1996 Bruce Evans <bde@FreeBSD.org>

Don't use __dead or __pure in user code. They were obfuscations
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.


# 3be059ba 23-Dec-1995 Joerg Wunsch <joerg@FreeBSD.org>

Put the superfluous "DUMP:" back in the statistics line, to make
Amanda happy.


# 019420a5 18-Nov-1995 Joerg Wunsch <joerg@FreeBSD.org>

Andreas Klemm's patch set for dump(8), with some minor (cosmetic)
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)


# abdec3e3 24-Oct-1995 Jordan K. Hubbard <jkh@FreeBSD.org>

Fix a silly bug where MAXPATHLEN was subtracted from the string length rather
than the other way around!
Submitted by: Elmar Bartel <bartel@informatik.tu-muenchen.de>


# 5ebc7e62 30-May-1995 Rodney W. Grimes <rgrimes@FreeBSD.org>

Remove trailing whitespace.


# 56d5f6db 28-Oct-1994 Joerg Wunsch <joerg@FreeBSD.org>

Fixed an evil bug where rawname() could write across the boundaries of
an array. The bug became obvious in the old system where the array was only
32 characters long (now MAXPATHLEN). Dump honored its name then (:-)
and dumped its core when calling dump -w for a fstab that contained rather long
NFS file system names. Even though this is rather unlikely to happen now,
a bug is a bug:)


# 8fae3551 26-May-1994 Rodney W. Grimes <rgrimes@FreeBSD.org>

BSD 4.4 Lite sbin Sources

Note: XNSrouted and routed NOT imported here, they shall be imported with
usr.sbin.