git-annex-migrate(1)
π git-annex-migrate β switch data to different backend π
okay bestie, welcome to the git-annex-migrate(1) page, you're gonna eat this up β¨
πΈ SYNOPSIS πΈ
git annex migrate [path ...]
git annex migrate --update
π¦ DESCRIPTION π¦
So like, what this does is it switches the annexed files you point at over to the default key-value backend (or, if you're feeling spicy, whatever one you named with --backend). Small catch though: only files whose content is currently present get migrated. If the content isn't there, nothing happens, no cap.
Also, real talk: after the migration, your content is still sitting there stored under the old keys. When it can, it uses hard links so that doesn't eat up extra disk space, which is iconic of it. Then you go run git annex unused to find those old keys and yeet them out of existence. ποΈ
Normally, if a file is already chillin' on the new backend, nothing gets done to it. BUT β and this is the fun part β if a backend changes the info it uses to construct a key, you can use this to migrate files onto the new key format. Lowkey magical. β¨
π OPTIONS π
--updateβ This one updates your local repository for migrations that were performed somewhere else. Only the new migrations since the last time you ran this will actually get performed. It does not touch the working tree β it only hard links (or, in some cases, copies) annex objects over to their new keys.git-annex pullandgit-annex sync --contentdo this automatically for you, unless theannex.syncmigrationsconfig is set tofalse.
Heads up bestie: older versions of git-annex didn't record migrations in a way this can use. Migrations done with those old versions had to be manually run in each clone of the repository. π
--applyβ Applies all recorded migrations to the local repository. It's basically the non-incremental version of--update. One situation where this is genuinely useful: whengit-annex migrate --updatehas been run, but since then un-migrated objects have entered the repository. Using this option makes sure any of those little stragglers get migrated. π«Ά
Same warning as above, bestie: older versions of git-annex did not record migrations in a way that this can use. Migrations performed with those older versions had to be manually run in each clone of the repository. π
--backendβ Specify the new key-value backend to use for the migrated data. Pick your fighter. π--forceβ Force migration of keys that are already using the new backend. No chill, just vibes.- file matching options β The
git-annex-matching-options(1)can be used to specify files to migrate. π― - Also the
git-annex-common-options(1)can be used. --remove-sizeβ Okay so keys often include the size of their content, and honestly that's generally a useful thing to have. In fact, this command defaults to adding missing size information to keys in most migrations. But with this option, the size info gets removed instead. One use for this is converting URL keys that were added bygit-annex addurl --fastinto the ones that would have been added if that command had been run with the--relaxedoption. Eg:
git-annex migrate --remove-size --backend=URL somefile
To add back the size to an URL key, use this:
git-annex migrate --backend=URL somefile
--jsonβ Enable JSON output. This is intended to be parsed by programs that use git-annex. Each line of output is a JSON object. π€--json-error-messagesβ Messages that would normally be output to standard error are included in the JSON instead. Fancy. β¨
π SEE ALSO π
git-annex(1)git-annex-upgrade(1)git-annex-backend(1)
π AUTHOR π
Joey Hess <id@joeyh.name> β absolute legend, we stan. π
and that's the whole git-annex-migrate(1) manual, bestie! mwah, go migrate something cute πππ¦
π¦ where this page comes from
- alpine 3.24: git-annex-doc 10.20261026-r0 Β· AGPL-3.0-or-later
- arch rolling: git-annex 10.20261026-2 Β· AGPL-3.0-only
- debian trixie: git-annex 10.20250416-2 Β· AGPL-3.0-or-later
- debian trixie: git-annex 10.20250416-2+deb13u1 Β· AGPL-3.0-or-later
- epel 10: git-annex 10.20250320-1.el10_0 Β· AGPL-3.0-or-later
- fedora 43: git-annex 10.20250630-4.fc43 Β· AGPL-3.0-or-later
- fedora 43: git-annex 10.20250929-5.fc43 Β· AGPL-3.0-or-later
- fedora 44: git-annex 10.20260115-1.fc44 Β· AGPL-3.0-or-later
- nixos 26.05: git-annex 10.20260421
- nixpkgs unstable: git-annex 10.20260421
- opensuse-leap 16.0: git-annex 10.20250828-bp160.1.1 Β· AGPL-3.0-or-later AND GPL-3.0-or-later AND BSD-2-Clause AND MIT AND GPL-2.0-only
- opensuse-leap 16.0: git-annex 10.20250828-bp160.1.1 Β· AGPL-3.0-or-later AND GPL-3.0-or-later AND BSD-2-Clause AND MIT AND GPL-2.0-only
- opensuse-leap 16.0: git-annex 10.20250828-bp160.1.1 Β· AGPL-3.0-or-later AND GPL-3.0-or-later AND BSD-2-Clause AND MIT AND GPL-2.0-only
- ubuntu questing: git-annex 10.20250721-1
- ubuntu resolute: git-annex 10.20251029-1ubuntu1 Β· AGPL-3.0-or-later
- ubuntu stonking: git-annex 10.20251029-1ubuntu1 Β· AGPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms