.\" Automatically generated by Pandoc 1.17.2 .\" .TH "bup\-prune\-older" "1" "2017\-04\-01" "bup debian/0.29\-3" "bup debian/0.29\-3" .hy .SH NAME .PP bup\-prune\-older \- remove older saves (CAUTION: EXPERIMENTAL) .SH SYNOPSIS .PP bup prune\-older [options...] <\f[I]branch\f[]...> .SH DESCRIPTION .PP \f[C]bup\ prune\-older\f[] removes (permanently deletes) all saves except those preserved by the various keep arguments detailed below. At least one keep argument must be specified. This command is equivalent to a suitable \f[C]bup\ rm\f[] invocation followed by \f[C]bup\ gc\f[]. .PP WARNING: This is one of the few bup commands that modifies your archive in intentionally destructive ways. Though if an attempt to \f[C]join\f[] or \f[C]restore\f[] the data you still care about after a \f[C]prune\-older\f[] succeeds, that\[aq]s a fairly encouraging sign that the commands worked correctly. (The \f[C]t/compare\-trees\f[] command in the source tree can be used to help test before/after results.) .SH KEEP PERIODS .PP A \f[C]\-\-keep\f[] PERIOD (as required below) must be an integer followed by a scale, or "forever". For example, 12y specifies a PERIOD of twelve years. Here are the valid scales: .IP \[bu] 2 s indicates seconds .IP \[bu] 2 min indicates minutes (60s) .IP \[bu] 2 h indicates hours (60m) .IP \[bu] 2 d indicates days (24h) .IP \[bu] 2 w indicates weeks (7d) .IP \[bu] 2 m indicates months (31d) .IP \[bu] 2 y indicates years (366d) .IP \[bu] 2 forever is infinitely far in the past .PP As indicated, the PERIODS are computed with respect to the current time, or the \f[C]\-\-wrt\f[] value if specified, and do not respect any calendar, so \f[C]\-\-keep\-dailies\-for\ 5d\f[] means a period starting exactly 5 * 24 * 60 * 60 seconds before the starting point. .SH OPTIONS .TP .B \-\-keep\-all\-for PERIOD when no smaller time scale \-\-keep option applies, retain all saves within the given period. .RS .RE .TP .B \-\-keep\-dailies\-for PERIOD when no smaller time scale \-\-keep option applies, retain the oldest save for any day within the given period. .RS .RE .TP .B \-\-keep\-monthlies\-for PERIOD when no smaller time scale \-\-keep option applies, retain the oldest save for any month within the given period. .RS .RE .TP .B \-\-keep\-yearlies\-for PERIOD when no smaller time scale \-\-keep option applies, retain the oldest save for any year within the given period. .RS .RE .TP .B \-\-wrt UTC_SECONDS when computing a keep period, place the most recent end of the range at UTC_SECONDS, and any saves newer than this will be kept. .RS .RE .TP .B \-\-pretend don\[aq]t do anything, just list the actions that would be taken to standard output, one action per line like this: .RS .IP .nf \f[C] \-\ SAVE +\ SAVE \&... \f[] .fi .RE .TP .B \-\-gc garbage collect the repository after removing the relevant saves. This is the default behavior, but it can be avoided with \f[C]\-\-no\-gc\f[]. .RS .RE .TP .B \-\-gc\-threshold N only rewrite a packfile if it\[aq]s over N percent garbage; otherwise leave it alone. The default threshold is 10%. .RS .RE .TP .B \-\f[I]#\f[], \-\-compress \f[I]#\f[] set the compression level when rewriting archive data to # (a value from 0\-9, where 9 is the highest and 0 is no compression). The default is 1 (fast, loose compression). .RS .RE .TP .B \-v, \-\-verbose increase verbosity (can be specified more than once). .RS .RE .SH NOTES .PP When \f[C]\-\-verbose\f[] is specified, the save periods will be summarized to standard error with lines like this: .IP .nf \f[C] keeping\ monthlies\ since\ 1969\-07\-20\-201800 keeping\ all\ yearlies \&... \f[] .fi .PP It\[aq]s possible that the current implementation might not be able to format the date if, for example, it is far enough back in time. In that case, you will see something like this: .IP .nf \f[C] keeping\ yearlies\ since\ \-30109891477\ seconds\ before\ 1969\-12\-31\-180000 \&... \f[] .fi .SH EXAMPLES .IP .nf \f[C] #\ Keep\ all\ saves\ for\ the\ past\ month,\ and\ any\ older\ monthlies\ for #\ the\ past\ year.\ \ Delete\ everything\ else. $\ bup\ prune\-older\ \-\-keep\-all\-for\ 1m\ \-\-keep\-monthlies\-for\ 1y #\ Keep\ all\ saves\ for\ the\ past\ 6\ months\ and\ delete\ everything\ else, #\ but\ only\ on\ the\ semester\ branch. $\ bup\ prune\-older\ \-\-keep\-all\-for\ 6m\ semester \f[] .fi .SH SEE ALSO .PP \f[C]bup\-rm\f[](1), \f[C]bup\-gc\f[](1), and \f[C]bup\-fsck\f[](1) .SH BUP .PP Part of the \f[C]bup\f[](1) suite. .SH AUTHORS Rob Browning .