Object Storage Swift - Configure automatic object deletion
Configure automatic object deletion
Objective
To easily manage your Object Storage, you may need to define the lifespan of some of your files. This allows you, for example, to keep some backups only for a specific period.
This guide shows you how to set up automatic file deletion after a specified period or on a specific date.
Requirements
Instructions
There are two ways to delete your objects/files
- After a certain number of seconds
- On a specific date
After a certain number of seconds
To do this, configure your request's X-Delete-After header
The test.txt file will be deleted in an hour.
On a specific date
First, you need to know what the deletion date is in epoch format. To help you find the value you need to insert, use a converter.
Then you can enter this date in the X-Delete-At header:
The file will therefore be deleted on the 19th November 2022.
Go further
For training or technical assistance implementing our solutions, contact your sales representative or visit our Professional Services page to request a quote and have your project analysed by our experts.
Join our community of users.