I've made a small mess of things and hoping I could get some advice to clean things up.
I was experimenting with using a special remote (backblaze over s3). I had it synced to a repo, working fine, but then I wanted to re-use the bucket for another repo (and I removed the annex-uuid file so I can re-init -- I realize now that there is a better way).
I'm in a situation now where the bucket has: - all the content for my current repo - content from my previous repo (unencrypted, but unwanted by me)
Is there a way to tell git-annex to "remove all files/keys from the special remote that aren't in my current repo"?
I tried "git annex unused --from=backblaze", but this finds nothing.
There is not a way to do that using only git-annex.
If the new S3 remote is encrypted and the old one was unencrypted, you can easily tell which files in the bucket are encrypted and not based on their names and delete those. The encrypted files have names starting with "GPGHMAC"
If the new S3 remote is not encrypted, you can generate a list of all the keys that are expected to be in it like this:
If you then use some S3 tool to generate a list of all the files in the bucket, and put that list in a file named "all", you can then use
comm
to find the files that are in "all" that are not in "wanted":Then you can use some S3 tool to delete the other files.