Bug 9429 - dump -w tends to run dumps a day later than expected
Summary: dump -w tends to run dumps a day later than expected
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 3.0-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 1999-01-10 23:30 UTC by mwm
Modified: 1999-03-21 23:48 UTC (History)
0 users

See Also:


Attachments
file.diff (1.46 KB, patch)
1999-01-10 23:30 UTC, mwm
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description mwm 1999-01-10 23:30:01 UTC
My reading of the dump & fstab documentation is that if you put N in
the "dump" column of /etc/fstab, then 'dump -w' will recommend that
you dump that file system every N days. This is not the case.

If you're running automated dumps that start at the same time every
day, the first dump is the only one that will behave as expected. If
you start the dump at 2am N days ago, then the dumps would have run at
(say) 2am, then 2:10 and later. Dump writes out the time the dump was
run. dump -w then checks that time against the time it is running to
generate a list of dumps that need to be done, to the nearest minute.
On the Nth day after the dumps were run, file systems after the first
won't be schedule to be dumped, as it's only been N-1 days and 50
minutes (or less).

Fix: The attached patch to /usr/src/sbin/dump/optr.c changes the comparison
so that dumps are treated by dump -w as having been done on midnight
of the day they were actually run. This makes dump -w behave as
expected for regularly scheduled daily dumps - if they all run the
same day. It makes dump -w behave strangely if you dump late in the
day and check again after midnight, but that is the lesser of two
evils.

How-To-Repeat: 
Try changing a correct /etc/dumpdates to include file systems that
should be dumped today, but are tagged as having been dumped an hour
(or a few minutes) later in the day, and then running dump -w.
Comment 1 jkh freebsd_committer freebsd_triage 1999-03-21 23:45:03 UTC
State Changed
From-To: open->closed

Committed to -current; will be merged into -stable in a few days if no one 
finds cause to object.