This commit is contained in:
parent
abd4e1192f
commit
b3bbc1cbb6
1 changed files with 47 additions and 0 deletions
47
doc/bugs/old_data_isn__39__t_unused_after_migration.mdwn
Normal file
47
doc/bugs/old_data_isn__39__t_unused_after_migration.mdwn
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
Old data isn't listed as unused after migrating backends:
|
||||||
|
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
BASE=/tmp/migrate-bug-2
|
||||||
|
set -x
|
||||||
|
chmod -R +w $BASE
|
||||||
|
rm -rf $BASE
|
||||||
|
mkdir -p $BASE
|
||||||
|
cd $BASE
|
||||||
|
|
||||||
|
# create annex
|
||||||
|
git init .
|
||||||
|
git annex init
|
||||||
|
|
||||||
|
# make a big (sparse) file and add it
|
||||||
|
dd if=/dev/zero of=bigfile bs=1 count=0 seek=1G
|
||||||
|
git annex add --backend WORM bigfile
|
||||||
|
git commit -m 'added bigfile'
|
||||||
|
|
||||||
|
# migrate it
|
||||||
|
git annex migrate --backend SHA256 bigfile
|
||||||
|
|
||||||
|
# status shows 2 keys taking up 2G
|
||||||
|
git annex status
|
||||||
|
|
||||||
|
# but nothing is unused
|
||||||
|
git annex unused
|
||||||
|
|
||||||
|
Output:
|
||||||
|
|
||||||
|
++ git annex status
|
||||||
|
supported backends: SHA256 SHA1 SHA512 SHA224 SHA384 SHA256E SHA1E SHA512E SHA224E SHA384E WORM URL
|
||||||
|
supported remote types: git S3 bup directory rsync web hook
|
||||||
|
known repositories:
|
||||||
|
ede95a82-1166-11e1-a475-475d55eb0f8f -- here
|
||||||
|
local annex keys: 2
|
||||||
|
local annex size: 2 gigabytes
|
||||||
|
visible annex keys: 1
|
||||||
|
visible annex size: 1 gigabyte
|
||||||
|
backend usage:
|
||||||
|
WORM: 1
|
||||||
|
SHA256: 1
|
||||||
|
++ git annex unused
|
||||||
|
unused . (checking for unused data...) (checking master...) ok
|
||||||
|
|
||||||
|
The two files are hardlinked, so it's not taking up extra space, but it would be nice to be able to remove the old keys.
|
Loading…
Add table
Add a link
Reference in a new issue