git-annex/doc/git-annex-rekey.mdwn
Joey Hess 51b73ea1fc
migrate: New --remove-size option
While intended for converting URL keys added by addurl --fast to be
as if added by addurl --relaxed, it can also be used to remove size
from other types of keys. Although that is not likely to be useful
for checksummed keys, I suppose it could be used for WORM or other
non-checksum keys.

Specifying the --remove-size option does not prevent other migrations
from taking effect if there's a key upgrade to perform, or if the
backend has changed. So --backend=URL needs to be used to prevent
migrating an URL key to the default backend.

Note that it's not possible to use git-annex migrate to convert from a
non-URL key to an URL key, as URL keys cannot be generated, except by
addurl. So while this can get the same effect as --relaxed would have
when addurl --fast was used, when --fast was not used, it won't work, or
if --backend=URL is not used will remove the size but not prevent
checksum verification, which is not useful. Due to this complexity, I
decided not to mention it in the git-annex addurl man page.

Sponsored-by: Jochen Bartl on Patreon
2021-11-12 13:28:28 -04:00

49 lines
1 KiB
Markdown

# NAME
git-annex rekey - change keys used for files
# SYNOPSIS
git annex rekey `[file key ...]`
# DESCRIPTION
This plumbing-level command is similar to migrate, but you specify
both the file, and the new key to use for it.
Multiple pairs of file and key can be given in a single command line.
Note that, unlike `git-annex migrate`, this does not copy over metadata,
urls, and other such information from the old to the new key
# OPTIONS
* `--force`
Allow rekeying of even files whose content is not currently available.
Use with caution.
* `--batch`
Enables batch mode, in which lines are read from stdin.
Each line should contain the file, and the new key to use for that file,
separated by a single space.
* `-z`
Makes the `--batch` input be delimited by nulls instead of the usual
newlines.
* Also the [[git-annex-common-options]](1) can be used.
# SEE ALSO
[[git-annex]](1)
[[git-annex-migrate]](1)
# AUTHOR
Joey Hess <id@joeyh.name>
Warning: Automatically converted into a man page by mdwn2man. Edit with care.