<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>I'd like to delete the attached email, but it's not possible.
      Sorry. I did not see that the object version that I tried to
      retrieve had a content type of
      "application/x-deleted;swift_versions_deleted=1". That explains
      the behaviour.</p>
    <p>Bernd.<br>
    </p>
    <div class="moz-cite-prefix">On 5/31/2020 4:33 PM, Bernd Bausch
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:f3ad66df-90b5-56ac-2b0c-0e5ecdbb4c73@gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <p>According to documentation of Swift's new object versioning
        middleware [1], a deleted object won't be visible but previous
        version content is still recoverable.</p>
      <p>Documentation doesn't say how, though. After deleting <i>myobject</i>,
        I can see its versions:</p>
      <p><tt>$ openstack object delete testcontainer myobject<br>
          $ curl <a class="moz-txt-link-freetext"
            href="http://192.168.1.200:8080/v1/$ACCOUNT/testcontainer?versions"
            moz-do-not-send="true">http://192.168.1.200:8080/v1/$ACCOUNT/testcontainer?versions</a>
          -H "x-auth-token: $T" | python -m json.tool | grep -e
          version_id -e name</tt><tt><br>
        </tt><tt>        "name": "myobject",</tt><tt><br>
        </tt><tt>        "version_id": "1590896642.07497"</tt><tt><br>
        </tt><tt>        "name": "myobject",</tt><tt><br>
        </tt><tt>        "version_id": "1590892906.83929"</tt><tt><br>
        </tt><tt>        "name": "myobject",</tt><tt><br>
        </tt><tt>        "version_id": "1590892899.36921"</tt><br>
      </p>
      <p>But I can't GET old versions of <i>myobject</i>:<br>
      </p>
      <p><tt>$ curl -i
          <a class="moz-txt-link-freetext"
href="http://192.168.1.200:8080/v1/$ACCOUNT/testcontainer/myobject?version-id="
            moz-do-not-send="true">http://192.168.1.200:8080/v1/$ACCOUNT/testcontainer/myobject?version-id=</a>"1590896642.07497" 
          -H "x-auth-token: $T"</tt><tt><br>
        </tt><tt>HTTP/1.1 404 Not Found</tt></p>
      <p>After creating another object with the same name <i>myobject</i>,
        old versions are accessible again. This is a solution, but dare
        I say not a very elegant one. <b>Can </b><b>a deleted,
          versioned object be recovered without creating a dummy object
          with the same name?</b><br>
      </p>
      <p>[1]
        <a class="moz-txt-link-freetext"
href="https://docs.openstack.org/swift/latest/middleware.html#object-crud-operations-to-a-versioned-container"
          moz-do-not-send="true">https://docs.openstack.org/swift/latest/middleware.html#object-crud-operations-to-a-versioned-container</a><br>
      </p>
    </blockquote>
  </body>
</html>