.\" Automatically generated by Pandoc 3.1.3 .\" .\" Define V font for inline verbatim, using C font in formats .\" that render this, and otherwise B font. .ie "\f[CB]x\f[]"x" \{\ . ftr V B . ftr VI BI . ftr VB B . ftr VBI BI .\} .el \{\ . ftr V CR . ftr VI CI . ftr VB CB . ftr VBI CBI .\} .TH "bup-prune-older" "1" "0.33.3" "bup 0.33.3" "bup 0.33.3" .hy .SH NAME .PP bup-prune-older - remove older saves .SH SYNOPSIS .PP bup prune-older [options\&...] <\f[I]branch\f[R]\&...> .SH DESCRIPTION .PP \f[V]bup prune-older\f[R] 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[V]bup rm\f[R] invocation followed by \f[V]bup gc\f[R]. .PP WARNING: This is one of the few bup commands that modifies your archive in intentionally destructive ways. Though if an attempt to \f[V]join\f[R] or \f[V]restore\f[R] the data you still care about after a \f[V]prune-older\f[R] succeeds, that\[cq]s a fairly encouraging sign that the commands worked correctly. (The \f[V]dev/compare-trees\f[R] command in the source tree can be used to help test before/after results.) .SH KEEP PERIODS .PP A \f[V]--keep\f[R] PERIOD (as required below) must be an integer followed by a scale, or \[lq]forever\[rq]. 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[V]--wrt\f[R] value if specified, and do not respect any calendar, so \f[V]--keep-dailies-for 5d\f[R] means a period starting exactly 5 * 24 * 60 * 60 seconds before the starting point. .SH OPTIONS .TP --keep-all-for PERIOD when no smaller time scale \f[V]--keep\f[R] option applies, retain all saves within the given period. .TP --keep-dailies-for PERIOD when no smaller time scale \f[V]--keep\f[R] option applies, retain the newest save for any day within the given period. .TP --keep-monthlies-for PERIOD when no smaller time scale \f[V]--keep\f[R] option applies, retain the newest save for any month within the given period. .TP --keep-yearlies-for PERIOD when no smaller time scale \f[V]--keep\f[R] option applies, retain the newest save for any year within the given period. .TP --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. .TP --pretend don\[cq]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[R] .fi .RE .TP --gc garbage collect the repository after removing the relevant saves. This is the default behavior, but it can be avoided with \f[V]--no-gc\f[R]. .TP --gc-threshold N only rewrite a packfile if it\[cq]s over N percent garbage; otherwise leave it alone. The default threshold is 10%. .TP -\f[I]#\f[R], --compress \f[I]#\f[R] 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). .TP -v, --verbose increase verbosity (can be specified more than once). .SH NOTES .PP When \f[V]--verbose\f[R] 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[R] .fi .PP It\[cq]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[R] .fi .SH EXAMPLES .IP .nf \f[C] # Keep all saves for the past month, and any newer 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[R] .fi .SH SEE ALSO .PP \f[V]bup-rm\f[R](1), \f[V]bup-gc\f[R](1), and \f[V]bup-fsck\f[R](1) .SH BUP .PP Part of the \f[V]bup\f[R](1) suite. .SH AUTHORS Rob Browning .