--verify option for tahoe backup
#1331
Labels
No Label
0.2.0
0.3.0
0.4.0
0.5.0
0.5.1
0.6.0
0.6.1
0.7.0
0.8.0
0.9.0
1.0.0
1.1.0
1.10.0
1.10.1
1.10.2
1.10a2
1.11.0
1.12.0
1.12.1
1.13.0
1.14.0
1.15.0
1.15.1
1.2.0
1.3.0
1.4.1
1.5.0
1.6.0
1.6.1
1.7.0
1.7.1
1.7β
1.8.0
1.8.1
1.8.2
1.8.3
1.8β
1.9.0
1.9.0-s3branch
1.9.0a1
1.9.0a2
1.9.0b1
1.9.1
1.9.2
1.9.2a1
LeastAuthority.com automation
blocker
cannot reproduce
cloud-branch
code
code-dirnodes
code-encoding
code-frontend
code-frontend-cli
code-frontend-ftp-sftp
code-frontend-magic-folder
code-frontend-web
code-mutable
code-network
code-nodeadmin
code-peerselection
code-storage
contrib
critical
defect
dev-infrastructure
documentation
duplicate
enhancement
fixed
invalid
major
minor
n/a
normal
operational
packaging
somebody else's problem
supercritical
task
trivial
unknown
was already fixed
website
wontfix
worksforme
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Reference: tahoe-lafs/trac-2024-07-25#1331
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
tahoe backup will happily end its operation even if the files that are to be backupped are not present on any node.
there are two parts of this problem:
while the first could be un-fixable for all i know (that is, in case tahoe has no concept of "different clouds"), for the second one i suggest the following:
the current implementation (i'm using 1.7.1, but the changelog doesn't mention anything relevant) does the equivalent of none, which is especially a problem together with the first problem mentioned above.
i'd suggest at least --verify=shallow to be default for backups; it has the advantage of keeping the O(1) network traffic advantage of the backupdb.
another switch should be created to configure whether verify misses are to be treated critical or should just be reported to stderr. (--verify-fatal or similar)
Yeah, those are good points.
We don't have a strong notion of "different clouds" yet. We've talked
about putting a "grid id" into each filecap (see #403), but that's a
deep problem, and touches on how we want people to deploy and join
grids, so it's not going to be solved right away. It might help to put a
copy of the introducer.furl (or maybe just its !TubID) into the
backupdb, and then do extra checking if it changes. We don't currently
have a good way to extract the introducer.furl from the webapi, so we
might need to add that.
It's not obvious from the docs, but the "tahoe backup" command does do
lightweight checking of the files it touches on a probabilistic basis:
source:docs/backupdb.rst and source:src/allmydata/scripts/backupdb.py
have some details. In short, each filecap will be checked at least once
every two months, and possibly once every month, on a randomized basis
to spread the load smoothly over multiple "tahoe backup" runs. If you do
a daily backup, about 3% of the files will be checked each time.
This filecheck is the same as what you'd get with "tahoe check" or
"tahoe deep-check": it asks the connected storage servers whether they
have a share or not, and is satisfied if at least
N
distinctshares are then found. If not, it re-uploads the file.
That said, it might be a good idea to improve this process, or add some
knows to make for more stringent checking, like your various
--verify
options. I'm not sure how to translate from the levels ofverification you describe to the facilities currently present in tahoe:
none
: "rely on caps remembered in backupdb to be present": thisis equal to what "tahoe backup" does now for the first four weeks,
before the maybe-check-a-file timer kicks in
shallow
: "check for the existence of every cap remembered frombackupdb": the filecheck that "tahoe backup" does at least once every
eight weeks will cover this. Each filecheck sends a message to every
connected storage server (in parallel), so one round-trip-time each.
We don't have anything lighter-weight than a filecheck right now
deep
: "do a deep check on all caps used in the backup db". Ithink this is equal to the regular file-check, since the backupdb
stores an entry for every tahoe object referenced by the backup (so
the "deep" aspect is redundant). So I think this is the same as
--verify=shallow
checksum
: "calculate the data checksums of all files involvedin re-using a cap, and compare to the reference cap". Hmm. A tahoe
"file verify" starts with the filecap and makes sure all the shares
match that (and requires downloading every share, so is
N/k
times as expensive as a normal download). A re-upload will recompute
the storage index, believe any shares which exist for it, and upload
new shares when they don't. I suspect that a combination of
--ignore-timestamps
(which will force a re-upload of each file)and a file-verify operation would cover this.
Hm, here's an easy idea: when doing a backup, the very first time we
encounter a file that is already in the backupdb (but not on later files
in that backup run), do an immediate full verify on it (download all
shares and check them against the filecap). If that fails, turn on "do a
filecheck for every file" mode: if we're connected to the wrong grid or
using the wrong client node or something, we'll always hit this. And
filechecks, while not free, are much cheaper than a full fileverify or
re-upload.
If we add the
introducer.furl
field to the backupdb, then the ruleshould simply be that we ignore any backupdb entries that are associated
with the wrong introducer. Alternatively, we could force a file-check on
any entry that had the wrong introducer, which would save time in cases
when e.g. the introducer had merely moved to a new IP address, or when
the introducer changed but all the storage servers remained. However,
that would slow down the case where the client was now on a completely
different grid, since it would do a pointless filecheck for each one
before uploading.
To "check for the existence" of a cap, we have to talk to a bunch of
storage servers (there's no local memory of the cap having been
uploaded, except for the backupdb). So this sort of checking actually
costs O(N) in the number of files (actually
O(numfiles*numservers)
).In the current code, filecheck failures trigger a new upload, so backup
always succeeds if the files can be uploaded to the current grid. But it
might be interesting to have a flag that means "I expect that most of my
data should already be in this grid: please tell me (by failing) if I'm
wrong".
argh, I did not touch the Component button, I don't know why my comment caused the component to get cleared.