summaryrefslogtreecommitdiff
path: root/doc/special_remotes.mdwn
blob: 7e4b9d377b93c133253412af300b1531a556773f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
Most [[backends]] can transfer data to and from configured git remotes.
Normally those remotes are normal git repositories (bare and non-bare),
that store the file contents in their own git annex directory.

But, git-annex also extends git's concept of remotes, with these special
types of remotes. These can be used just like any normal remote by git-annex.
They cannot be used by other git commands though.

* [[Amazon_S3]]
* [[bup]]
* [[directory]]
* [[rsync]]
* [[hook]]
  * [tahoe-lafs][] - limited testing

## Unused content on special remotes

Over time, special remotes can accumulate file content that is no longer
referred to by files in git. Normally, unused content in the current
repository is found by running `git annex unused`. To detect unused content
on special remotes, instead use `git annex unused --from`. Example:

	$ git annex unused --from mys3
	unused  (checking for unused data on mys3...) 
	  Some annexed data on mys3 is not used by any files in this repository.
	    NUMBER  KEY
	    1       WORM-s3-m1301674316--foo
	  (To see where data was previously used, try: git log --stat -S'KEY')
	  (To remove unwanted data: git-annex dropunused --from mys3 NUMBER)
	  Please be cautious -- are you sure that the remote repository
	  does not use this data?
	$ git annex dropunused --from mys3 1
	dropunused 12948 (from mys3...) ok

Do be cautious when using this; it cannot detect if content in a remote
is used by that remote, or is the last copy of data that is used by
some *other* remote.

[tahoe-lafs]: http://git-annex.branchable.com/forum/tips:_special__95__remotes__47__hook_with_tahoe-lafs/