| 1 |
% bup-gc(1) Bup %BUP_VERSION% |
| 2 |
% Rob Browning <[email protected]> |
| 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 less RAM than might be required 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 `dev/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 and |
| 40 |
contains no unreachable trees or commits. The default threshold |
| 41 |
is 10%. |
| 42 |
|
| 43 |
-v, \--verbose |
| 44 |
: increase verbosity (can be used more than once). With one -v, bup |
| 45 |
prints every directory name as it gets backed up. With two -v, |
| 46 |
it also prints every filename. |
| 47 |
|
| 48 |
-*#*, \--compress=*#* |
| 49 |
: set the compression level to # (a value from 0-9, where |
| 50 |
9 is the highest and 0 is no compression). The default |
| 51 |
is 1 (fast, loose compression). |
| 52 |
|
| 53 |
\--ignore-missing |
| 54 |
: report missing objects, but don't stop the collection. |
| 55 |
|
| 56 |
# EXIT STATUS |
| 57 |
|
| 58 |
The exit status will be nonzero if there were any errors. |
| 59 |
Encountering any missing object is considered an error. |
| 60 |
|
| 61 |
# EXAMPLES |
| 62 |
|
| 63 |
# Remove all saves of "home" and most of the otherwise unreferenced data. |
| 64 |
$ bup rm home |
| 65 |
$ bup gc |
| 66 |
|
| 67 |
# SEE ALSO |
| 68 |
|
| 69 |
`bup-rm`(1) and `bup-fsck`(1) |
| 70 |
|
| 71 |
# BUP |
| 72 |
|
| 73 |
Part of the `bup`(1) suite. |