Thread (4 messages) 4 messages, 3 authors, 2011-02-25

Re: Comparing snapshots?

From: Goffredo Baroncelli <hidden>
Date: 2011-02-25 20:08:24

On 02/25/2011 08:32 PM, Jo=E3o Eduardo Lu=EDs wrote:
Hello,
=20
Please note that my experience with btrfs is both recent and, above
all, very small. However, I've been wondering about the same issue
for a different purpose and your question intrigues me.
=20
However, and I may be off-base here, I think that wouldn't be trivial
to achieve.
=20
Even if one would be able to differ the metadata changes between both
snapshots, the problem would still be present regarding finding the
changed data. It would be possible to check for changed extents, at
least by comparing extent checksums, but I don't think it would be
trivial to discover where (exactly) the extent was modified.
Look at the find-new command. It returns also which part of the file is
changed. I don't remember very well the details, but also the data is
stored in a tree like the metadata. Using the same strategies of
comparing the keys and revid leads to discover which part of the file i=
s
changed, with minimum effort (no checksums comparing is needed).
quoted hunk ↗ jump to hunk
=20
I would recommend using the generation fields, whenever applicable,
but I believe these are private to each subvolume/snapshot.
=20
=20
Anyway, I wonder if keeping a data structure (I would go with a tree)
containing metadata regarding the changed files, within the file
system, could be a plausible solution, but I'm in no condition
(btrfs-knowledge-wise) to make such statement.
=20
=20
Cheers.
=20
--- Jo=E3o Eduardo Lu=EDs gpg key: 477C26E5 from pool.keyserver.eu
=20
=20
=20
=20
=20
On Feb 25, 2011, at 9:59 AM, Arvin Schnell wrote:
=20
quoted
Hi,
=20
for a backup program I have to find all differing files (including
metadata) in two snapshots taken from the same subvolume.
=20
Having looked at the find-new command I thought about this=20
process:
=20
1. Get the two transids when the two snapshots were created.
=20
2. Query modifications to the original subvolume between the two=20
transids.
=20
Is the general process corrent or have I overseen something?
=20
AFAIS the btrfs tool does not provide the required=20
information/commands. Would it be possible to add those?
=20
Thanks in advance, Arvin
=20
-- Arvin Schnell, [off-list ref] Senior Software Engineer,
Research & Development SUSE LINUX Products GmbH, GF: Markus Rex,
HRB 16746 (AG N=FCrnberg) -- To unsubscribe from this list: send the
line "unsubscribe linux-btrfs" in the body of a message to
majordomo@vger.kernel.org More majordomo info at
http://vger.kernel.org/majordomo-info.html
=20
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" =
in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help