"
mle...@gmail.com" <
mle...@gmail.com> writes:
> Because it has worked before and then just stopped, unfortunately I
> cannot provide a reproducible setup or so, but I thought it might be
> still good to report this, even though I am not sure you can make
> anything out of it.
Yes, appreciate the report, and sorry you hit trouble.
> * Should the previous hashes of a branch be saved so that old saves
> can at least be restored in case the packs are not lost
As with the git reflog? I'd thought that bup save (for example) didn't
participate in the reflog, but I might be mistaken. Whether it should,
or (more likely) whether bup should in general, is another question.
I think prune-older/rm/gc may currently assume that bup doesn't use the
reflog. Otherwise, it wouldn't be likely to behave as expected?
i.e. if rm were to add refs to the reflog when rewriting the branch, and
gc consulted the reflog, then of course nothing could be collected.
> * When repacking, should packs only be deleted after it is certain that the
> resulting repository actually works
Hmm, well of course if the packs were deleted incorrectly, then that's
just a (serious) bug and should be fixed as soon as we can find it.
Otherwise, I'd want to know more about what "actually works" means and
how it'd be checked.
> After that "bup fsck" succeeded without error
So that doesn't check any connectivity at all. It's just verifying that
the packfiles are valid via git verify-pack and/or par2, etc. It
doesn't currently run git-fsck, or do anything like what git fsck does
(tracing the graph). And I agree that the naming correspondence is
currently, potentially misleading. Given what it does right now, bup
fsck might be more appropriately called bup verify-packs or similar...
> * Does "bup fsck" check for enough things. What are the differences
> between "bup fsck" and "git fsck".
I can imagine we might want more comprehensive facilities/options. If
so, whether we could rely on git-fsck for some of the work (or any
lower-level plumbing components), would depend on whether the relevant
git commands can handle the repo sizes/object-counts bup can produce.
In the past, iirc some of the git tools would eventually just fall over
for larger repositories.
But even so, we could add connectivity checking, even if we needed to
(or wanted to) do it ourselves, and I actually started something along
those lines as a result of our earlier discussions (currently have a
shaky "bup check-refs" derived from the gc traversal code).
For now, though, to check the content more thoroughly, you can try
"bup-join ... > /dev/null" which should verify that all the data is
there -- it won't try to read the .bupm metadatata files. Or spot check
some bup-restores, which is what some of my automated backups do.
> Finally, we are on NFS drives. I have no alternative to that, our
> infrastructure is just like this. I know that using NFS is not recommended
> by you but I learned this only on the mailing list.
>
> * How sure are you that NFS causes problems, should it be mentioned in the
> docs?
It's really just a general concern, for example, regarding say the
difference between the expected durability of a local ext4
fsync/rename/etc. (maildir-ish dance) vs "whatever a given stack, all
the way down to the persistent storage, including NFS, does".
I'd have similar concerns about anything else less pedestrian,
e.g. sshfs, more or less anything fuse, etc., unless they make specific,
well tested promises.
bup relies on the fact that after you flush, close, fdatasync, rename,
and fsync-parent-dir (hmm, did we add that last one to bup?), the data
will be right, even if the power goes out just after the final sync
there.
I don't know what guarantees (a given version and/or flavor of) NFS
makes, but iirc it's potentially less reliable on that front. If it's
not, then that's great.
We also rely on git to be similarly careful, e.g. when we run it to
update refs, etc.
> * Do you know if it is possible that files vanish when written onto an NFS
> drive when there is only one user involved? I am the only one who has
> access to that folder.
I don't know NFS's semantics/guarantees well enough to comment (and of
course, the implementation could also have its own semantics/guarantees,
whatever the standards say), but if you're curious, there was a good bit
of detail with respect to linux NFS on
lwn.net a bit back. I believe
that had notable information about the (cache) consistency semantics,
but don't recall much about fsync, etc.:
https://lwn.net/Articles/897917/
https://lwn.net/Articles/898262/
> ($BUPDIR, $PSTRP, and $PATHS were set to some machine-specific paths)
>
> $ bup -d $BUPDIR prune-older --unsafe --keep-yearlies-for forever
> --keep-monthlies-for 1y --keep-dailies-for 3m --keep-all-for 1m
>
> (Completed successfully)
>
> $ bup -d "$BUPDIR" index "${PATHS[@]}"
> $ bup -d "$BUPDIR" save --strip-path "$PSTRP" -n qg-10 "${PATHS[@]}"
>
>
> error: refs/heads/qg-10 does not point to a valid object!
Not good, of course. I'm not sure whether bup itself did something
wrong (at least after your manual intervention, repacking, etc.), or
whether the manual intervention left things in a state that gc didn't
expect, or similar.
If I'm recalling correctly, prune-older would have used rm to rewrite
the gq-10 branch, assuming it decided anything needed to be dropped.
But if so, rm would have been writing a new commit, i.e. if anything
changed on the branch at all, the tip hash would change (as with git
rebase), and so the (new) commit really should exist unless there's a
bug, or something went wrong with the filesystem somehow, or...
> fatal: update_ref failed for ref 'refs/heads/qg-10': cannot lock ref
> 'refs/heads/qg-10': reference already exists
Hmm, I wouldn't have expected that from save. I'll have to think about
it. I did see one thing in a net search where the cause might have been
case (in)sensitivity on the server. (Unlikely the issue, I'd guess, but
I suppose you might double-check whatever your NFS arrangement does
there. bup expects full case-sensitivity, or rather, I don't know that
anyone who's worked on bup has ever considered the possibility the
filesystem won't be case-sensitive.)
Hope this helps.
--
Rob Browning
rlb @
defaultvalue.org and @
debian.org
GPG as of 2011-07-10 E6A9 DA3C C9FD 1FF8 C676 D2C4 C0F0 39E9 ED1B 597A
GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4