Using xfsdump to backup snapshot volumes (I'm using LVM2, but it doesn't
really matter), can occasionally miss changes in subsequent dumps.
Consider the following sequence.
% make snapshot of /foo
% wait a bit
% touch /foo/special file
% xfsdump -l 0 /foosnap ...
% undo snapshot
% make snapshot of /foo
% xfsdump -l 1 /foosnap ...
% undo snapshot
The file 'special' will not be included in the level 1 dump. The problem
is that xfsdump is using as its backup time the time that xfsdump was run,
where it really needs to be using the time that the snapshot was made.
The easiest solution is to add an option to xfsdump that allows it to base
the dump date on the mtime of a specified file rather than the current
time. e.g.:
% touch /tmp/snapstamp
% make snapshot of /foo
% xfsdump -l n -t /tmp/snapstamp /foo ...
This will instruct xfsdump to consider "now" to be the time that snapstamp
was touched, rather than the current time, avoiding the missed changes.
This should be fairly easy to add, since the gh_timestamp field is only set
in one place.
Thanks,
David Brown
|