summaryrefslogtreecommitdiffstats
path: root/sbin/restore
Commit message (Collapse)AuthorAgeFilesLines
* Move macros describing extended attributes in UFS frommckusick2007-03-061-0/+1
| | | | | | | | | | | <sys/extattr.h> to <ufs/ufs/extattr.h>. Move description of extended attributes in UFS from man9/extattr.9 to man5/fs.5. Note that restore will not compile until <sys/extattr.h> and <ufs/ufs/extattr.h> have been updated. Suggested by: Robert Watson
* Update the dump program to save extended attributes. Updatemckusick2007-02-264-26/+348
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add a "-D" flag to restore which puts it into "degraded" mode. Thisdwmalone2006-12-055-22/+104
| | | | | | | | | | | | | | | | | | makes restore less efficient, but it makes a bigger effore to read corrupted dumps. Specifiacally, when in degreded mode: 1) Restore shifts the input by 1 byte if it sees a problem, rather than one tape block. 2) It doesn't assume the inodes are stored in ascending order. 3) It turns some panics into warning printfs. We also verify some fields more carefully than before. There's probably more a degreded mode could do, but this seems to help a lot. Approved by: imp, iedowse, mckusick MFC after: 3 weeks
* Mention the -L option of dump(8) that can neutralize negativeru2006-10-121-2/+5
| | | | | | effects of restoring dumps of live file systems. PR: docs/91297
* o Fix style(9) for previous.maxim2006-08-251-1/+1
|
* A bunch of fixes from NetBSD:maxim2006-08-251-17/+23
| | | | | | | | | | | | | | | | | | o Restore owner/group/mode/atime/mtime of symbolic links, rev. 1.30. o Extract file flags of symbolic link, rev. 1.42. o Call getfile() before altering file attributes. Open file with mode 0600 instead of 0666 so that file won't remain group or world readable/writable even if getfile() terminated. Move skipfile() before altering file attributes in IF{CHR,BLK} and IFIFO case for symmetry, rev. 1.32. o Use file mode 0600 when creating special file or fifo, revs. 1.33, 1.34. o Remove redundant -N check. PR: bin/101660 Submitted by: Andrey V. Elsukov Obtained from: NetBSD, enami@netbsd MFC after: 6 weeks
* Remove a diagnostic message that can't occur: we lost the ability todds2005-10-201-3/+0
| | | | handle the old filesystem format on 2002/06/21.
* Interpret correctly the glob(3) return value.dds2005-07-211-1/+7
| | | | | | | Previously, interactive commands specifying a non-existent file or directory used to display an "out of memory error". MFC after: 2 weeks
* rscid -> __FBSDID. Mark parameter as __unused when necessary.charnier2005-05-294-9/+13
|
* Remove debug from last commitimp2005-04-031-2/+0
|
* /*-imp2005-04-031-1/+1
|
* Revert bogus += -g change. I needed it to debug the problem.imp2005-03-251-1/+0
| | | | Noticed by: njl, Andrej Tobola
* Restore the ability to read FreeBSD 1 tapes (and I think any net2imp2005-03-253-0/+24
| | | | | | | | | | | | | | | based tapes, but I'm not sure where NFS_MAGIC was introduced after 4.3). When support for the pre-4.4 format was removed (the ability to read 4.2 and 4.3 BSD tapes), the old format inode conversion was junked as well. However, FreeBSD 1 dump tapes use the NFS_MAGIC format, but have this inode format. Before, restore would fail complaining that '.' wasn't found and the root directory wasn't on this tape. Since the conversion from the not so old format is relatively trivial, restore the code to make that conversion. FreeBSD 1 dumps are once again readable. MFC After: a few days
* dcvt is unused since the support for converting pre-4.4 tapes wasimp2005-03-252-25/+3
| | | | | | | removed. Go ahead and remove it and struct odirent since it too is unused. # FreeBSD 1.1.5 tapes are still unreadable, but 2.0 and newer work.
* c_tapea and c_firstrec are used for TS_TAPE blocks, so convert themimp2005-03-251-0/+2
| | | | | | | | | for the old (4.4-lite through FreeBSD 4.x and *BSD) format. It looks like they aren't used for TS_INODE, but conversion costs so little there that I've not removed them there (in case my grep was wrong). This makes at least some of the tapes work for me again. Now, to regresion test all my dusty tapes...
* In order to print out the dump dates correctly, the date and ddate fieldsimp2005-03-181-0/+4
| | | | also need to be convereted for old tapes for records of type TAPE.
* Sync usage and man page with reality. There's no '-c' command lineimp2005-03-182-19/+10
| | | | | flag today. Maybe we should still retain it, but I'll let others fight that windmill.
* Expand *n't contractions.ru2005-02-131-1/+1
|
* Sync program's usage() with manpage's SYNOPSIS.ru2005-02-101-4/+4
|
* Sort sections.ru2005-01-181-23/+23
|
* Mechanically kill hard sentence breaks.ru2004-07-021-4/+8
|
* Use the correct types for the functions rst_opendir(), glob_readdir() andstefanf2004-05-243-9/+11
| | | | | | | rst_closedir() which are called by glob(). Reviewed by: md5 Approved by: das (mentor)
* Include <timeconv.h> for time conversion functions.stefanf2004-05-241-0/+1
| | | | Approved by: das (mentor)
* Assorted markup, grammar, and spelling fixes.ru2004-05-171-1/+1
|
* Add -P arguments for dump(8) and restore(8) which allow the user togreen2004-04-134-19/+92
| | | | | | | | | | | 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
* Remove advertising clause from University of California Regent's license,markm2004-04-0910-40/+0
| | | | | | per letter dated July 22, 1999. Approved by: core, imp
* style.Makefile(5):johan2004-02-231-1/+1
| | | | Use WARNS?= instead of WARNS=.
* Fix gcc warnings. If NAME_MAX is 255, and d_namlen is a uint8_t, thenpeter2003-10-261-2/+7
| | | | | d_namlen can never be > NAME_MAX. Stop gcc worrying about this by using a preprocessor test to see if NAME_MAX changes.
* Localize 'ls' outputache2003-08-062-4/+8
| | | | Don't set 8bit in quote processing
* Add section number to .Xrcharnier2003-06-081-1/+1
|
* Removed all vestiges of KerberosIV.ru2003-05-013-14/+11
|
* Style.ru2003-05-011-2/+3
|
* De-Kerberise (KerberosIV). KerberosIV is no longer present, andmarkm2003-05-013-29/+0
| | | | | remote backups can still be done with Kerberos authentication using SSH and Kerberos 5.
* Add TAPE to the ENVIRONMENT section.sheldonh2003-01-101-0/+2
| | | | MFC after: 1 month
* Add an ENVIRONMENT section so that the reader knows that the TMPDIR envarsheldonh2003-01-101-0/+5
| | | | | | | is honoured. Reported by: des MFC after: 1 month
* Fixed the abuses of .Ql visible on stderr in troff mode.ru2002-12-231-1/+1
| | | | PR: docs/37176
* Use the standardized CHAR_BIT constant instead of NBBY in userland.mike2002-09-258-2/+11
|
* Replace various spelling with FALLTHROUGH which is lint()ablecharnier2002-08-252-3/+3
|
* Use '0' instead of NULL when we mean the integer constant 0 and not aimp2002-08-211-1/+1
| | | | "null pointer expression".
* s/filesystem/file system/g as discussed on -developerstrhodes2002-08-215-21/+21
|
* Change utimes to set the file creation time (for filesystems thatmckusick2002-07-173-15/+33
| | | | | | | | support creation times such as UFS2) to the value of the modification time if the value of the modification time is older than the current creation time. See utimes(2) for further details. Sponsored by: DARPA & NAI Labs.
* The .Nm utility.charnier2002-07-061-14/+19
|
* This commit adds basic support for the UFS2 filesystem. The UFS2mckusick2002-06-215-240/+179
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-166-21/+22
|
* Address a few minor style and consistency issues in revision 1.32.iedowse2002-05-061-23/+15
| | | | Submitted by: Joshua Goodall <joshua@roughtrade.net>
* Set the permissions on restored symbolic links.iedowse2002-05-021-1/+19
| | | | | PR: bin/37665 Submitted by: "Michael C. Adler" <mad1@tapil.com>
* Replaced exists() tests with two equivalent defined().ru2002-04-181-1/+1
| | | | | LIBDIR is defined in bsd.own.mk but sys.mk no longer includes bsd.own.mk as of revision 1.60.
* restore(8) manual page does not explain rrestore.trhodes2002-04-121-0/+4
| | | | | PR: 34234 Submitted by: Gary W. Swearingen <swear@blarg.net>
* o remove __Pimp2002-03-208-385/+221
| | | | | o Use ANSI function definitions o unifdef -D__STDC__
* Remove 'register' keyword.obrien2002-03-206-77/+77
| | | | | | It does not help modern compilers, and some may take some hit from it. (I also found several functions that listed *every* of its 10 local vars with "register" -- just how many free registers do people think machines have?)
OpenPOWER on IntegriCloud