<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/"><channel><title>Mapletree on mapletree.moe</title><link>https://mapletree.moe/categories/mapletree/</link><description>Recent content in Mapletree on mapletree.moe</description><generator>Hugo -- 0.160.1</generator><language>en-us</language><copyright>This work is licensed under the MIT0 License.</copyright><lastBuildDate>Thu, 29 Oct 2026 17:00:00 +0900</lastBuildDate><atom:link href="https://mapletree.moe/categories/mapletree/index.xml" rel="self" type="application/rss+xml"/><item><title>Lifecycles are Important</title><link>https://mapletree.moe/posts/lifecycles-are-important/</link><pubDate>Thu, 29 Oct 2026 17:00:00 +0900</pubDate><author>bakayuki</author><guid>https://mapletree.moe/posts/lifecycles-are-important/</guid><description>&amp;lt;no value&amp;gt;</description><content type="text/html" mode="escaped"><![CDATA[<h1 id="oops">Oops<a href="#oops" class="anchor" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
      stroke-linecap="round" stroke-linejoin="round" class="feather">
      <path d="M15 7h3a5 5 0 0 1 5 5 5 5 0 0 1-5 5h-3m-6 0H6a5 5 0 0 1-5-5 5 5 0 0 1 5-5h3"></path>
      <line x1="8" y1="12" x2="16" y2="12"></line>
   </svg></a></h1>
<p>I use a lot of object storage. Not a lot from the perspective of (insert your
favorite example tech company here), but for a private user/small community
manager, a good amount. Looking back over things, my spend this year peaked at
about 35 euro in a 30 day period, which at my current pricing is about 5.8TB.</p>
<p>Most of that goes toward the &ldquo;Tokisaki Memory Engine&rdquo; I run, which is really
just a fancy name for kopia plus a dedicated repo server, and some special
sauce that is usually lost in the weeds, like object locking, restricted keys,
etc. We even have automated daily testing of restores to <code>/dev/null</code>. Neat!</p>
<p>The main goal is to let someone get all the benefits of kopia with just an
username and password, while only giving up the same thing they give up with
most other cloud storage providers (Mainly the fact that if I really <em>really</em>
wanted to, I suppose I could look through your stuff, but it&rsquo;d be damn
obnoxious to do because of how the server works, and its built that anyone
could catch me at any time, so, why bother).</p>
<p>I migrated last year to Hetzner&rsquo;s Object Storage after B2 became VERY UNHAPPY
with how many API calls my little harness around kopia uses. The migration was
kind of in a rush, and I forgot some things!</p>
<p>This won&rsquo;t detail all the fun that I have had growing tokisaki-v4 along-side
Hetzner&rsquo;s Object Storage (which has been having its own growing pains), but
a fun little oops I just found.</p>
<h2 id="huh-thats-weird">Huh, that&rsquo;s weird<a href="#huh-thats-weird" class="anchor" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
      stroke-linecap="round" stroke-linejoin="round" class="feather">
      <path d="M15 7h3a5 5 0 0 1 5 5 5 5 0 0 1-5 5h-3m-6 0H6a5 5 0 0 1-5-5 5 5 0 0 1 5-5h3"></path>
      <line x1="8" y1="12" x2="16" y2="12"></line>
   </svg></a></h2>
<p>So after fixing some earlier corruption this year and reaching out to Hetzner
and making everything kosher, I&rsquo;ve been trying to keep a close eye on things
and I noticed today that while kopia was reporting <code>75272 blobs (1.7TB)</code> under
management, the hetzner dashboard was showing <code>174782 blobs (2.5TB)</code> (!!) under
that bucket.</p>
<p>That&rsquo;s weird!</p>
<p>So I go to list any &ldquo;incomplete multipart uploads&rdquo; or &ldquo;delete markers&rdquo; or any
file with a version that isn&rsquo;t current.</p>
<p>Huh I only have 86 unfinished multipart uploads. That&rsquo;s not too bad!
Wait.. there&rsquo;s 86 delete markers too? Weird, but that could make sense&hellip;
&hellip;there&rsquo;s 86 old version files&hellip;</p>
<p>Hey, did you know that hetzner paginates <em>massive</em> responses into groups of
86? Me neither!</p>
<h2 id="but-why">But why<a href="#but-why" class="anchor" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
      stroke-linecap="round" stroke-linejoin="round" class="feather">
      <path d="M15 7h3a5 5 0 0 1 5 5 5 5 0 0 1-5 5h-3m-6 0H6a5 5 0 0 1-5-5 5 5 0 0 1 5-5h3"></path>
      <line x1="8" y1="12" x2="16" y2="12"></line>
   </svg></a></h2>
<p>This shouldn&rsquo;t be a thing. See when you build an object locked bucket on top
of kopia, it&rsquo;s a little weird because its actually <strong>kopia</strong> that manages the
object locking. It&rsquo;s really not advised that you have the bucket do it, because
kopia&rsquo;s maintenance wants to touch those flags (Side note: this urge to touch
all the flags was a source of GREAT SUFFERING for me earlier this year). So
what you do instead is designate the object locking to kopia and write a policy
to manage object lifecycle.</p>
<p>You did write a policy to manage object lifecycle right?</p>
<h2 id="whats-a-lifecycle">What&rsquo;s a lifecycle<a href="#whats-a-lifecycle" class="anchor" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
      stroke-linecap="round" stroke-linejoin="round" class="feather">
      <path d="M15 7h3a5 5 0 0 1 5 5 5 5 0 0 1-5 5h-3m-6 0H6a5 5 0 0 1-5-5 5 5 0 0 1 5-5h3"></path>
      <line x1="8" y1="12" x2="16" y2="12"></line>
   </svg></a></h2>
<p>Excellent question. A lifecycle is the cycle of life of an object.</p>
<p>Now that that&rsquo;s cleared up&hellip;</p>
<p><em>(A lifecycle is a set of policies that tell the backend processes running an
object storage provider when it should clean things up. If you enable
versioning, but forget to write a lifecycle policy, you&rsquo;ve basically created
a world with aging and disease but missing the grim reaper. There&rsquo;s excellent
fiction written about this. NONE OF THEM END WELL)</em></p>
<h2 id="a-quick-migration">A quick migration<a href="#a-quick-migration" class="anchor" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
      stroke-linecap="round" stroke-linejoin="round" class="feather">
      <path d="M15 7h3a5 5 0 0 1 5 5 5 5 0 0 1-5 5h-3m-6 0H6a5 5 0 0 1-5-5 5 5 0 0 1 5-5h3"></path>
      <line x1="8" y1="12" x2="16" y2="12"></line>
   </svg></a></h2>
<p>Apparently when I was moving over from B2, I set everything up correctly but
forgot to write a lifecycle policy and apply it to the bucket. This means that
for OVER A YEAR, kopia has been dutifully pronouncing files deceased, shoving
them in a body bag, tagging them with a 90 day tag that says &ldquo;only send to the
mortuary after this date, just in case we need to do anything else with the
body&rdquo; then shoving them in the file freezer.</p>
<p>Except the hearst has just.. never pulled up. What, you think that&rsquo;s kopia&rsquo;s
job? Kopia&rsquo;s job ends after chucking the file into the body bag and putting
it away. It&rsquo;ll keep piling the dead up inside that freezer all day long, likely
while complaining about the terrible service from the Hetzner funeral home, and
then will cheerily report &ldquo;All&rsquo;s well!&rdquo;</p>
<p>A quick back of the envelope calculation reveals this has likely cost me well
over 70 euro throughout the past twelve months.</p>
<p>So yeah!</p>
<p>Lifecycles are important!</p>
]]></content></item></channel></rss>