1bup-prune-older(1)                bup 0.29.2                bup-prune-older(1)
2
3
4

NAME

6       bup-prune-older - remove older saves (CAUTION: EXPERIMENTAL)
7

SYNOPSIS

9       bup prune-older [options...] <branch...>
10

DESCRIPTION

12       bup prune-older  removes  (permanently  deletes) all saves except those
13       preserved by the various keep arguments detailed below.  At  least  one
14       keep argument must be specified.  This command is equivalent to a suit‐
15       able bup rm invocation followed by bup gc.
16
17       WARNING: This is one of the few bup commands that modifies your archive
18       in intentionally destructive ways.  Though if an attempt to join or re‐
19       store the data you still  care  about  after  a  prune-older  succeeds,
20       that's  a  fairly  encouraging sign that the commands worked correctly.
21       (The t/compare-trees command in the source tree can  be  used  to  help
22       test before/after results.)
23

KEEP PERIODS

25       A  --keep  PERIOD  (as required below) must be an integer followed by a
26       scale, or “forever”.  For example, 12y specifies  a  PERIOD  of  twelve
27       years.  Here are the valid scales:
28
29       · s indicates seconds
30
31       · min indicates minutes (60s)
32
33       · h indicates hours (60m)
34
35       · d indicates days (24h)
36
37       · w indicates weeks (7d)
38
39       · m indicates months (31d)
40
41       · y indicates years (366d)
42
43       · forever is infinitely far in the past
44
45       As  indicated,  the  PERIODS  are  computed with respect to the current
46       time, or the --wrt value if specified, and do not respect any calendar,
47       so  --keep-dailies-for 5d means a period starting exactly 5 * 24 * 60 *
48       60 seconds before the starting point.
49

OPTIONS

51       –keep-all-for PERIOD
52              when no smaller time scale  –keep  option  applies,  retain  all
53              saves within the given period.
54
55       –keep-dailies-for PERIOD
56              when no smaller time scale –keep option applies, retain the old‐
57              est save for any day within the given period.
58
59       –keep-monthlies-for PERIOD
60              when no smaller time scale –keep option applies, retain the old‐
61              est save for any month within the given period.
62
63       –keep-yearlies-for PERIOD
64              when no smaller time scale –keep option applies, retain the old‐
65              est save for any year within the given period.
66
67       –wrt UTC_SECONDS
68              when computing a keep period, place the most recent end  of  the
69              range  at  UTC_SECONDS,  and  any  saves newer than this will be
70              kept.
71
72       –pretend
73              don't do anything, just list the actions that would be taken  to
74              standard output, one action per line like this:
75
76                     - SAVE
77                     + SAVE
78                     ...
79
80       –gc    garbage  collect  the  repository  after  removing  the relevant
81              saves.  This is the default behavior, but it can be avoided with
82              --no-gc.
83
84       --gc-threshold N
85              only  rewrite  a packfile if it's over N percent garbage; other‐
86              wise leave it alone.  The default threshold is 10%.
87
88       -#, --compress #
89              set the compression level when rewriting archive data  to  #  (a
90              value from 0-9, where 9 is the highest and 0 is no compression).
91              The default is 1 (fast, loose compression).
92
93       -v, --verbose
94              increase verbosity (can be specified more than once).
95

NOTES

97       When --verbose is specified, the save periods  will  be  summarized  to
98       standard error with lines like this:
99
100              keeping monthlies since 1969-07-20-201800
101              keeping all yearlies
102              ...
103
104       It's possible that the current implementation might not be able to for‐
105       mat the date if, for example, it is far enough back in time.   In  that
106       case, you will see something like this:
107
108              keeping yearlies since -30109891477 seconds before 1969-12-31-180000
109              ...
110

EXAMPLES

112              # Keep all saves for the past month, and any older monthlies for
113              # the past year.  Delete everything else.
114              $ bup prune-older --keep-all-for 1m --keep-monthlies-for 1y
115
116              # Keep all saves for the past 6 months and delete everything else,
117              # but only on the semester branch.
118              $ bup prune-older --keep-all-for 6m semester
119

SEE ALSO

121       bup-rm(1), bup-gc(1), and bup-fsck(1)
122

BUP

124       Part of the bup(1) suite.
125

AUTHORS

127       Rob Browning <rlb@defaultvalue.org>.
128
129
130
131bup 0.29.2                        2018-10-20                bup-prune-older(1)
Impressum