|
From: Delian K. <kr...@kr...> - 2004-01-30 14:23:44
|
Hello,
Here's the test I've performed:
I'm making a level 0 dump, and saving the dump time to different
file, since I prefer updating it than /etc/dumpdates. I'm also
saving the files that are dumped, and trying to use that list
later:
sync
dump -0 -f - /dev/hda1 -A archive_file |restore -uvxf -
date "+%a %b %e %H:%M:%S %Y" > last_dump
Later I'm doing a level 1 dump and writing over the level 0 dump
files:
dump -1 -T "`cat last_dump`" -f - /dev/hda1 -A archive_file.new \
|restore -uvxf -
The archive is kept on a separate partition which is supposed
to be a mirror of the original. The dumps are taken from a
lvm snapshot, avoiding the errors that live filesystem might cause.
The idea is to always execute only the second command, and just after
it to do
date "+%a %b %e %H:%M:%S %Y" > last_dump
This way I was hoping to be able to keep the mirror partition up to date.
The problem is that if a file is removed from the original partition,
it is impossible to detect that and remove the file from the mirror also.
That way the mirror is always growing in size and getting biger and bigge=
r
than the original.
A solution with let's say "find" is not appropriate since there are sever=
al=20
hundreds thousands of files and stating each one takes too much time.
I might get the list of files from the level 0 dump by parsing the output=
of:
cat archive_file |restore -tf -
Unfortunately the archive_file.new, created during the level 1 dump conta=
ins
only the added/changed files and nothing about the removed ones. It will =
be
sufficient if I could generate a list with all the files that are in the
original partition, like the one of level 0 dump, when I'm doing the leve=
l 1
dump. If a file is on the first list but not on a second, it has been rem=
oved,
and I could remove it from the mirror partition.
Any Ideas ?
Regards,
Delian Kurstev
p.s. I've searched thoroughly the archives and found nothing about a simi=
lar
issue. I doubt no one has faced this, may be I'm missing something obviou=
s ?
Thanks for the patience to read that long post.
|