History log of /freebsd-current/sbin/dump/dump.h
Revision Date Author Comments
# 26e69f9f 30-Dec-2023 yue0211 <asx5566123@gmail.com>

dump(8): Fix typo in comment

Event: Advanced UNIX Programming Course (Fall’23) at NTHU.
Pull Request: https://github.com/freebsd/freebsd-src/pull/968


# 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


# b3e76948 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: two-line .h pattern

Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/


# 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


# 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.


# 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


# 4787668f 28-Nov-2012 Eitan Adler <eadler@FreeBSD.org>

Mark non-returning function as such

PR: bin/172978
Approved by: cperciva
MFC after: 3 days


# 23ad9069 18-Oct-2011 Kirk McKusick <mckusick@FreeBSD.org>

The current /etc/dumpdates file restricts device names to 32 characters.
With the addition of various GEOM layers some device names now exceed
this length, for example /dev/mirror/encrypted.elig.journal. This
change expands the field to 53 bytes which brings the /etc/dumpdates
lines to 80 characters. Exceeding 80 characters makes the /etc/dumpdates
file much less human readable. A test is added to dump so that it
verifies that the device name will fit in the 53 character field
failing the dump if it is too long.

This change has been checked to verify that its /etc/dumpdates file
is compatible with older versions of dump.

Reported by: Martin Sugioarto <martin@sugioarto.com>
PR: kern/160678
MFC after: 3 weeks


# 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.


# 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>


# 772ad651 26-Feb-2007 Kirk McKusick <mckusick@FreeBSD.org>

Update the dump program to save extended attributes. Update
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


# ad0c89f7 02-Dec-2004 Maxim Konovalov <maxim@FreeBSD.org>

o Do not dump core in -W if dumpdates was not readable and ddatev == NULL.

PR: bin/69977

o Remove unused ddates_in.

Obtained from: NetBSD
MFC after: 3 weeks


# 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


# 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


# ec3f495c 03-Nov-2003 Ian Dowse <iedowse@FreeBSD.org>

Add missing prototype for cread().


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

Avoid a name conflict with future functionality:

getfstab() -> dump_getfstab()


# 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


# 6bfd0bdc 02-Dec-2002 Kirk McKusick <mckusick@FreeBSD.org>

Correct the estimated block count calculated by dump to account
for the minimal amount of space used by a snapshot.

Sponsored by: DARPA & NAI Labs.


# 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


# 247ac241 08-Jul-2002 Robert Drehmel <robert@FreeBSD.org>

- Do not include <utmp.h> for no reason.
- Remove unneeded utmp path constant.


# 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>


# d266a286 06-Jun-2002 Poul-Henning Kamp <phk@FreeBSD.org>

s/daddr_t/ufs_daddr_t/g

This should fix the issues which cropped up after daddr_t grew up.

Sponsored by: DARPA & NAI Labs.


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

more file system > filesystem


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

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


# 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


# 19f8080e 16-Feb-2002 Ian Dowse <iedowse@FreeBSD.org>

On receipt of a SIGINFO, schedule an immediate printout of the
percentage complete and remaining time estimate.

PR: bin/32138
Submitted by: mi


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

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


# 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


# eb1d91d1 10-Aug-2001 Kris Kennaway <kris@FreeBSD.org>

Mark some functions as __printflike()

MFC After: 1 week


# 941ee632 29-Jan-2001 Poul-Henning Kamp <phk@FreeBSD.org>

Use <sys/queue.h> instead of home-rolled list.

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


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

Make `dump' exit codes confirm to manual page.

PR: 5346
Style-check-by: bde


# 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.


# 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.


# 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)


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

Remove trailing whitespace.


# 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.