swift container retention
Hallo, I've gotten the assignment to implement a backup solution using openstack swift containers. What we want is that the files of customers are kept in the customers own container and for those files to retain their versions on updates of the file. So far so good, this is all possible, and extensively documented online. Now, the second part is more complicated it appears where I thougth this would be a quite common usage example of object storage. I cannot find how I can automagically delete versions of files that are older then X days. There is the X-delete-after header, but this header needs to be added for each transaction. What I want is for all objects in a container to get deleted after X days without having to add a header once the object is uploaded. Does anyone have suggestions on how I could implement this requirement? Please find below a grafical repesentation of what I want Versioning disabled Automated add headers delete-after Versioning enabled Usage on the account of LF Usage on the account of client │ │ │ │ │ │ ▼ ▼ ┌────────────────────────┐ ┌────────────────────────┐ │ │ │ │ │ Versions-container │ │ Current-container │ │ │ │ │ ├────────────────────────┤ ├────────────────────────┤ │ │ │ │ │File1 v123456 │ │ File1 │ │File1 v567899 │ │ File2 │ │ │ │ File3 │ │File3 v234567 │ │ ... │ │ │ │ FileN │ └────────────────────────┘ └─────────────┬──────────┘ ▲ │ │ │ └────────────────────────────────────────┘ Modifications cause current to be moved to Versioned-container Best regards, Geert
On Sun, 28 May 2023 14:13:32 +0200 Geert Geurts <geert.geurts@linuxfabrik.ch> wrote:
What I want is for all objects in a container to get deleted after X days without having to add a header once the object is uploaded. Does anyone have suggestions on how I could implement this requirement?
I'd write a proxy middleware that added the X-Delete-After automatically to objects in certain containers, according to configuraiton. -- Pete
participants (2)
-
Geert Geurts
-
Pete Zaitcev