4.2BSD restore(8)
nz at wucs.UUCP
nz at wucs.UUCP
Fri May 2 05:54:47 AEST 1986
In article <974 at tektools.UUCP> richl at tektools.UUCP (Rick Lindsley) writes:
> In article <801 at oliveb.UUCP> jerry at oliveb.UUCP (Jerry Aguirre) writes:
> > I have also noticed that after a restore all the files marked as
> > changed and will go on the next dump. [ ... ]
>
> If you really did just spend hours restoring the file system, then you
> have restored all or virtually all of the file system. If you don't
> want to do a level 0 dump, simply edit /etc/dumpdates to reflect
> ...
In fact, this problem is due to a quirk in a dump/restore, the
restored files have the correct modification time, but their creation
times are the time of the restore!
Repeat-By:
Put a file system on a dummy partition, and do a level 0
dump(8) of it. Wait a few minutes. Then, trash the partition
and restore it fully from your dump. Change one file.
Now, do a level 1 backup with dump(8). The backup should be
extremely small (one file) but it isn't! It is the whole
filesystem!
To Fix:
Change dump so that it looks only at the modification time, not
the creation and modification times.
Here is a diff for the file dump/dumptraverse.c. My change is
bracketed by some #ifdef-#else-#endif.s, you can take those out
if you like.
*** /tmp/,RCSt1018628 Thu May 1 14:40:45 1986
--- dumptraverse.c Fri Apr 4 11:34:08 1986
***************
*** 38,43
BIS(ino, clrmap);
if(f == IFDIR)
BIS(ino, dirmap);
if ((ip->di_mtime >= spcl.c_ddate || ip->di_ctime >= spcl.c_ddate) &&
!BIT(ino, nodmap)) {
BIS(ino, nodmap);
--- 38,44 -----
BIS(ino, clrmap);
if(f == IFDIR)
BIS(ino, dirmap);
+ #ifndef MTIME_ONLY
if ((ip->di_mtime >= spcl.c_ddate || ip->di_ctime >= spcl.c_ddate) &&
#else
if ((ip->di_mtime >= spcl.c_ddate ) &&
***************
*** 39,44
if(f == IFDIR)
BIS(ino, dirmap);
if ((ip->di_mtime >= spcl.c_ddate || ip->di_ctime >= spcl.c_ddate) &&
!BIT(ino, nodmap)) {
BIS(ino, nodmap);
if (f != IFREG && f != IFDIR && f != IFLNK) {
--- 40,48 -----
BIS(ino, dirmap);
#ifndef MTIME_ONLY
if ((ip->di_mtime >= spcl.c_ddate || ip->di_ctime >= spcl.c_ddate) &&
+ #else
+ if ((ip->di_mtime >= spcl.c_ddate ) &&
+ #endif
!BIT(ino, nodmap)) {
BIS(ino, nodmap);
if (f != IFREG && f != IFDIR && f != IFLNK) {
We use this modified version some of the time. I
noticed the problem, and made the changes, after a series of
disk crashes and fixes that required full restores. Boy,
the next weekends backups were big! Hmmm...
Anyway, I hope this is helpful to some folks out there.
--
...nz (Neal Ziring at WU ECL - we're here to provide superior computing.)
{seismo,ihnp4,cbosgd}!wucs!nz OR nz at wucs.UUCP
"You could get an infinite number of wires into this !*$$#!?! junction
box, but we usually don't go that far in practice"
-- Employee of London Electricity Board, 1959
More information about the Comp.bugs.4bsd.ucb-fixes
mailing list