From cb36451f268570365c41c6865a642ce3b89881ba Mon Sep 17 00:00:00 2001 From: "https://christian.amsuess.com/chrysn" Date: Fri, 13 Aug 2021 20:53:48 +0000 Subject: [PATCH] Tool to drop migrated files for good --- doc/forum/Migrate_mark_files_dead.mdwn | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 doc/forum/Migrate_mark_files_dead.mdwn diff --git a/doc/forum/Migrate_mark_files_dead.mdwn b/doc/forum/Migrate_mark_files_dead.mdwn new file mode 100644 index 0000000000..e8aa56f8fa --- /dev/null +++ b/doc/forum/Migrate_mark_files_dead.mdwn @@ -0,0 +1,23 @@ +Through several migrations, and migrations leave duplicate files. + +The man page warns about this and tells to use `annex unused` to find them. +I'd usually copy the new files around, drop the old ones and mark the old ones dead, +but alas, manual things are not always done. + +To clean up after sloppy migrations, +or after deciding that I really want to get rid of the old files, +I'd like a tool to + +* find files that were migrated, +* do some sanity checks, +* drop them from all the remotes (with extreme prejudice, as even unused files are usually subject to numcopies), and +* declare them dead (which can only happen once they're gone from all remotes). + +I've written a tool that does all these. It's available at [[migrate-mark-dead.py]]; +see its head for documentation. +This is a tool for forcibly dropping files, +so use with the adaequate caution and at your own risk. + +Since, I can reclaim my disk space *and* run `git annex fsck --all` with good results again. + +--[[chrysn]]