]> arthur.barton.de Git - bup.git/blob - Documentation/bup-gc.md
288ab66cc259a69f542d5b258c8782ff63ed7d69
[bup.git] / Documentation / bup-gc.md
1 % bup-gc(1) Bup %BUP_VERSION%
2 % Rob Browning <rlb@defaultvalue.org>
3 % %BUP_DATE%
4
5 # NAME
6
7 bup-gc - remove unreferenced, unneeded data
8
9 # SYNOPSIS
10
11 bup gc [-#|--verbose] <*branch*|*save*...>
12
13 # DESCRIPTION
14
15 `bup gc` removes (permanently deletes) unreachable data from the
16 repository, data that isn't referred to directly or indirectly by the
17 current set of branches (backup sets) and tags.  But bear in mind that
18 given deduplication, deleting a save and running the garbage collector
19 might or might not actually delete anything (or reclaim any space).
20
21 With the current, proababilistic implementation, some fraction of the
22 unreachable data may be retained.  In exchange, the garbage collection
23 should require much less RAM than might by some more precise
24 approaches.
25
26 Typically, the garbage collector would be invoked after some set of
27 invocations of `bup rm`.
28
29 WARNING: This is one of the few bup commands that modifies your
30 archive in intentionally destructive ways.  Though if an attempt to
31 `join` or `restore` the data you still care about after a `gc`
32 succeeds, that's a fairly encouraging sign that the commands worked
33 correctly.  (The `t/compare-trees` command in the source tree can be
34 used to help test before/after results.)
35
36 # OPTIONS
37
38 \--threshold=N
39 :   only rewrite a packfile if it's over N percent garbage; otherwise
40     leave it alone.  The default threshold is 10%.
41
42 -v, \--verbose
43 : increase verbosity (can be used more than once).  With one -v, bup
44     prints every directory name as it gets backed up.  With two -v,
45     it also prints every filename.
46
47 -*#*, \--compress=*#*
48 :   set the compression level to # (a value from 0-9, where
49     9 is the highest and 0 is no compression).  The default
50     is 1 (fast, loose compression).
51
52 # EXAMPLES
53
54     # Remove all saves of "home" and most of the otherwise unreferenced data.
55     $ bup rm home
56     $ bup gc
57
58 # SEE ALSO
59
60 `bup-rm`(1) and `bup-fsck`(1)
61
62 # BUP
63
64 Part of the `bup`(1) suite.