Merge branch 'master' of ssh://git-annex.branchable.com
This commit is contained in:
commit
a8d1d83c0b
4 changed files with 125 additions and 0 deletions
|
@ -0,0 +1,73 @@
|
|||
### Please describe the problem.
|
||||
|
||||
The borg special remote is awesome and works perfectly if the borg repo is local. However, fetching content (e.g., with `git annex get` or `git annex sync --content`) seems to fail if the borg repo is accessed over ssh.
|
||||
|
||||
### What steps will reproduce the problem?
|
||||
|
||||
On remote host:
|
||||
|
||||
[[!format sh """
|
||||
# Init borg repo
|
||||
borg init --encryption=none /home/remote_user/borg_repo
|
||||
"""]]
|
||||
|
||||
On local host:
|
||||
|
||||
[[!format sh """
|
||||
# Set environment variable for clarity
|
||||
export BORG_REPO=remote_user@remote_host:/home/remote_user/borg_repo
|
||||
|
||||
# Init git-annex repo on local host and add borg repo as semitrusted remote
|
||||
git init git_repo && cd git_repo
|
||||
git annex init git_repo
|
||||
git annex initremote borg type=borg borgrepo=$BORG_REPO appendonly=yes
|
||||
|
||||
# Commit content to git-annex, create borg archive, and sync
|
||||
echo content > file.txt
|
||||
git annex add file.txt
|
||||
git commit -m init
|
||||
borg create $BORG_REPO::archive_name .
|
||||
git annex sync borg
|
||||
|
||||
# Drop content from git-annex
|
||||
git annex drop file.txt
|
||||
|
||||
# NOTE: Up to this point, everything is fine.
|
||||
|
||||
# Now, attempt to retrieve content from borg
|
||||
git annex get file.txt
|
||||
"""]]
|
||||
|
||||
The final step results in error. Please see the output below in the additional information section.
|
||||
|
||||
### What version of git-annex are you using? On what operating system?
|
||||
|
||||
- git-annex version: 8.20210428
|
||||
- operation system: linux x86_64 (NixOS 21.05)
|
||||
|
||||
(NOTE: This was also tested on an old macOS machine with the same results.)
|
||||
|
||||
### Please provide any additional information below.
|
||||
|
||||
The following output shows an apparent concatenation of the local git-annex repo path with the remote borg repo path:
|
||||
|
||||
[[!format sh """
|
||||
$ git annex get file.txt
|
||||
get file.txt (from borg...)
|
||||
Repository /home/local_user/git_repo/remote_user@remote_host:/home/remote_user/borg_repo does not exist.
|
||||
|
||||
user error (borg ["extract","/home/local_user/git_repo/remote_user@remote_host:/home/remote_user/borg_repo::archive_name",".git/annex/objects/QV/p6/SHA256E-s8--12a61f4e173fb3a11c05d6471f74728f76231b4a5fcd9667cef3af87a3ae4dc3.txt/SHA256E-s8--12a61f4e173fb3a11c05d6471f74728f76231b4a5fcd9667cef3af87a3ae4dc3.txt"] exited 2)
|
||||
|
||||
Unable to access these remotes: borg
|
||||
|
||||
No other repository is known to contain the file.
|
||||
failed
|
||||
get: 1 failed
|
||||
exit 1
|
||||
"""]]
|
||||
|
||||
NOTE: I tried several variations of the ssh url syntax, but they all resulted in the same error.
|
||||
|
||||
### Have you had any luck using git-annex before? (Sometimes we get tired of reading bug reports all day and a lil' positive end note does wonders)
|
||||
|
||||
Definitely. I love git-annex. I LOVE it. It has no equal and is the secret to my productivity, not to mention peace of mind in this epoch. Much, much respect.
|
19
doc/forum/Can__39__t_get_some_files_from_bare_repo.mdwn
Normal file
19
doc/forum/Can__39__t_get_some_files_from_bare_repo.mdwn
Normal file
|
@ -0,0 +1,19 @@
|
|||
# Description
|
||||
I have a bare repo on a USB drive with ntfs. Files there sink from two PC: one with WSL/Ubuntu on Windows 10 and one with Manjaro linux.
|
||||
I found that though some files are on the usb git annex says: content is not present in remote as I getting them.
|
||||
|
||||
# Researching
|
||||
I tried drop files from the usb an copy them there again. And I discovered that on the usb now are two files in different folders:
|
||||
|
||||
Before dropping / copy it was:
|
||||
```.git/annex/objects/Pg/vw/SHA256E-s91600--aa3c4ec61a1b5642b8c9c0f04dd36884130b8f0135bc9dae9b48b71c26511e4f.xlsx/SHA256E-s91600--aa3c4ec61a1b5642b8c9c0f04dd36884130b8f0135bc9dae9b48b71c26511e4f.xlsx```
|
||||
|
||||
After this there appeared another one:
|
||||
```.git/annex/objects/d21/4c3/SHA256E-s91600--aa3c4ec61a1b5642b8c9c0f04dd36884130b8f0135bc9dae9b48b71c26511e4f.xlsx/SHA256E-s91600--aa3c4ec61a1b5642b8c9c0f04dd36884130b8f0135bc9dae9b48b71c26511e4f.xlsx```
|
||||
|
||||
# git-annex versions
|
||||
on the wsl: 8.20.200226
|
||||
on the manjaro linux: 8.20210428-g27e5f3cd5
|
||||
|
||||
# Question
|
||||
I understood that it's something about old and new hash format but how to get files in a such situation? Or how to unify hash format?
|
|
@ -0,0 +1 @@
|
|||
I'm using Amazon S3 (Glacier Deep Archive) as a special remote, and using pubkey encryption. Is there a command to get the encrypted file name for a file so that I can initiate restore on that file before calling `git annex get`?
|
|
@ -0,0 +1,32 @@
|
|||
[[!comment format=mdwn
|
||||
username="Atemu"
|
||||
avatar="http://cdn.libravatar.org/avatar/d1f0f4275931c552403f4c6707bead7a"
|
||||
subject="comment 5"
|
||||
date="2021-07-14T21:27:42Z"
|
||||
content="""
|
||||
> the hard link to an unlocked file risks it being modified, and losing the content of another key is outside the risk profile allowed by annex.thin
|
||||
|
||||
I see. I guess annex.thin's risk profile would simply need to be different when using SHA256H then. If you use annex.thin with hardlinks, you're at high risk of accidental modification anyways, so that wouldn't be much of a change tbh.
|
||||
|
||||
Also, since it'd be the exact same file and key, such behaviour should be expected and would be exactly the same as with the SHA256 backend.
|
||||
|
||||
> Moving all the object files to the same directory does not help in the case of git-annex get, where the object files don't exist yet. It would still need a way to find all the equivilant keys to populate those.
|
||||
|
||||
I'm not 100% familiar with how `get` works but what I'm thinking of might work like this:
|
||||
|
||||
`git annex get random.1`
|
||||
|
||||
```
|
||||
file = \"random.1\"
|
||||
key = keyOf file = \"SHA256-s104857600--2fdbdc9c3b23d1986a743aede593765e57ade9f173f9fd9766057f0efd63197a\"
|
||||
ext = extOf file = \".1\"
|
||||
pathWanted = hybridPathOf key ext = \".git/annex/objects/F9/Kk/SHA256-s104857600--2fdbdc9c3b23d1986a743aede593765e57ade9f173f9fd9766057f0efd63197a/SHA256H-s104857600--2fdbdc9c3b23d1986a743aede593765e57ade9f173f9fd9766057f0efd63197a.1\"
|
||||
sha256Path = pathOf key
|
||||
|
||||
when (!inLocalAnnex key) (fetch key)
|
||||
unless (fileExists pathWanted) (hardLink sha256Path pathWanted)
|
||||
```
|
||||
|
||||
SHA256H should behave just like SHA256 here; it gets the SHA256-indexed key with the same logic. The only difference should be that it adds another file with a suffix when writing.
|
||||
|
||||
"""]]
|
Loading…
Reference in a new issue