From cb9bb2027c2e7c3f7fea4ef29a8d4eedd0a6b3f0 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 8 Dec 2023 14:39:38 -0400 Subject: [PATCH] update for distributed migration --- doc/tips/migrating_data_to_a_new_backend.mdwn | 21 ++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/doc/tips/migrating_data_to_a_new_backend.mdwn b/doc/tips/migrating_data_to_a_new_backend.mdwn index b9acb8bd15..d81a42e0f9 100644 --- a/doc/tips/migrating_data_to_a_new_backend.mdwn +++ b/doc/tips/migrating_data_to_a_new_backend.mdwn @@ -1,14 +1,29 @@ -Maybe you started out using the WORM backend, and have now configured -git-annex to use SHA1. But files you added to the annex before still -use the WORM backend. There is a simple command that can migrate that +Maybe you started out using the SHA1 backend, and have now configured +git-annex to use SHA256. But files you added to the annex before still +use the SHA1 backend. There is a simple command that can migrate that data: # git annex migrate my_cool_big_file migrate my_cool_big_file (checksum...) ok +This stages a change to the file, which you can `git commit` like any other +change. + You can only migrate files whose content is currently available. Other files will be skipped. +## distributed migration + +When you pull changes into your repository that include migration of files, +your repository then needs to be updated to follow the migration. + + # git-annex migrate --update + migrate my_cool_big_file (checksum...) ok + +This is done automatically by commands like `git-annex pull`. + +## unused old content + After migrating a file to a new backend, the old content in the old backend will still be present. That is necessary because multiple files can point to the same content. The `git annex unused` subcommand can be