When ransomware strikes, the most important question is simple: will your backups still be standing after the attacker has been inside your servers? Modern attacks do not stop at encrypting production data. They first look for the backup system, delete or corrupt it, and only then start the real encryption. This guide explains what an immutable backup is, how S3 Object Lock works, and how to use it step by step in your own backup design.
When an attacker gets into a network, the first job is usually reconnaissance: which servers exist, where are the backups stored, and what permissions does the backup software account have? If an account that can reach the backup server or the backup repository is compromised, the attacker does not need any extra vulnerability to wipe the backups. The legitimate permission already in hand is enough. The company then loses both the production data and its way back at the same moment.
This is why saying "we have backups" is not enough in a backup design. The real question is who can delete the backup, and under which conditions. If a backup can be deleted by an administrator account, then compromising that account also means losing the backups. The core idea of the solution is to make sure that, for a defined period, nobody can delete the backup, not even your own account.
An immutable backup is a copy that cannot be deleted, overwritten or modified for a defined retention period after it is written. The concept is based on WORM logic: write once, read many. Until the retention period ends you can read the object, but any request to delete or change it is rejected.
This protection works even when the attacker holds a valid access key or an administrator password, because the rule is part of the storage layer itself rather than part of authentication. A compromised account can send the delete command, but the storage will not accept it.
On S3-compatible object storage services this feature is called Object Lock. The lock is enabled on a bucket, and each object version is assigned a retention period. Object Lock is built from three basic concepts:
| Property | Governance | Compliance |
|---|---|---|
| Can a normal user delete it? | No | No |
| Can a specially privileged user bypass the lock? | Yes | No |
| Can the retention period be shortened? | Yes, with permission | No, it can only be extended |
| Typical use | Testing, flexible policy | Ransomware protection, regulatory retention |
The real protection against ransomware is Compliance mode. In Governance mode the special permission is assigned to an account, so if that account is compromised the lock can be bypassed as well. In Compliance mode no user, the account owner included, can delete the object version through the S3 API before the period ends.
Object Lock works together with versioning. If you try to delete an object without giving a version identifier, the storage does not really delete it; it only adds a delete marker and the earlier versions stay in place. To permanently delete a specific version you must name its version identifier, and for a locked version that request is rejected.
The practical result is this: even when your backup software says it is cleaning up old backups, versions whose lock has not expired stay where they are. Once the period ends, the same versions can be deleted normally. In a locked bucket, cleanup therefore takes effect after a delay, and locked versions keep using storage space during that time.
Get information about S3-compatible object storage
Let us review object storage options with Object Lock support for your backups together.
Explore the S3 Object Storage packagesThe classic 3-2-1 rule says to keep three copies of your data, on two different media, with one copy in a different place. In the ransomware era the rule has grown into 3-2-1-1-0. The added "1" means one copy is immutable or offline, and the "0" means backups are verified without errors through restore tests.
Object storage is a natural choice for the immutable copy because Object Lock is a built-in feature of the storage layer and most modern backup software supports it directly. Products such as Veeam offer an immutability option for object storage repositories and manage the retention period themselves. Tools such as restic and rclone are used together with the default retention period of the bucket.
The examples below use the AWS CLI against an S3-compatible endpoint. Define your access key and secret key as environment variables first; do not type keys into the command line or store them in a code repository.
This option must be given when the bucket is created.
aws --endpoint-url https://s3.example-provider.com s3api create-bucket --bucket locked-backups --object-lock-enabled-for-bucket
This example protects every written version in Compliance mode for 30 days.
aws --endpoint-url https://s3.example-provider.com s3api put-object-lock-configuration --bucket locked-backups --object-lock-configuration '{"ObjectLockEnabled":"Enabled","Rule":{"DefaultRetention":{"Mode":"COMPLIANCE","Days":30}}}'
Object Lock requires it.
aws --endpoint-url https://s3.example-provider.com s3api get-bucket-versioning --bucket locked-backups
A delete request that names the version identifier should be rejected.
aws --endpoint-url https://s3.example-provider.com s3 cp test.txt s3://locked-backups/test.txt
aws --endpoint-url https://s3.example-provider.com s3api list-object-versions --bucket locked-backups
aws --endpoint-url https://s3.example-provider.com s3api delete-object --bucket locked-backups --key test.txt --version-id VERSION_ID
If the last command returns an access denied error, the lock is working. Run this test first with a short retention period, and before going to production also check that your backup software can write to the bucket.
The retention period is decided by the answer to the question: how late could I notice an attack? Because an attacker can stay quiet inside a system for weeks, a very short period, for example a few days, may let the backup leave its lock before the attack is even noticed. A practical starting point is the longer of your attack detection time and the retention policy of your backup software.
SistemDC's S3-compatible Object Storage service is designed so that you can use the structure described above. The service supports the S3 API signed with AWS Signature V4, together with Object Lock in Compliance mode and versioning per bucket. Connections are encrypted with TLS 1.2 or later, data on disk is stored encrypted, every account works in its own isolated space and buckets are private by default. The storage quota is a hard limit: when the quota is full, new uploads are rejected and existing data is preserved.
It is also important to know the limits of the service: only the S3 API is offered, Swift and AWS IAM/STS are not supported, and addressing is path-style. When a service is cancelled, access is closed immediately and the data is deleted automatically after 7 days; objects locked with Object Lock are retained for the duration of the lock. If you suspect your key has leaked, you can renew your keys from the service page in the client area; the old keys stop working. For details, see the S3 getting started document, the frequently asked questions and the service agreement.
Object Lock protects against deletion and modification at the same location; it does not create a second copy against hardware failure and does not mean a separate location. To run the service itself from another location, our Disaster Recovery (DR) service is planned project by project; the second location in Istanbul is still at the planning stage. To define target recovery time and the data-loss window, see the RTO and RPO guide.
If you are also planning your server infrastructure together with object storage for your backups, you can review our dedicated server options and our VDS packages.
Let us design your backup plan together
Contact us about immutable backups, retention periods and capacity planning.
Open the contact formWhat is the difference between an immutable backup and a normal backup?
A normal backup can be deleted or overwritten by anyone with enough permissions. An immutable backup cannot be deleted or changed by anyone until the retention period you set has expired, even if an administrator account is compromised.
What is the difference between Object Lock Governance and Compliance mode?
In Governance mode, users with special permissions can bypass the lock. In Compliance mode no user, the account owner included, can delete an object version through the S3 API or shorten the retention period before it ends.
Can I enable Object Lock on an existing bucket later?
On many S3-compatible services Object Lock must be enabled when the bucket is created and cannot be added afterwards. For that reason, the bucket you use for backups should be created with Object Lock from the start.
Do locked backups count towards my storage quota?
Locked versions cannot be deleted until the retention period ends, so they keep using storage space and quota. Choosing the retention period carefully is therefore important for cost and capacity planning.
What happens if I set the retention period incorrectly?
In Compliance mode the period can only be extended, never shortened. If you enter a very long period, the backups cannot be deleted for that whole time, so it is wise to test with a short period before moving to the production value.
Is an immutable backup enough on its own?
No. An immutable copy is one part of the 3-2-1 backup rule. You also need regular restore tests, protected access keys and a second copy in a separate location to have a complete backup strategy.