Skip to content

feat(retention)!: drop Kopia retention policy usage - #311

Open
fcanovai wants to merge 1 commit into
mainfrom
dev/168-v2
Open

fcanovai wants to merge 1 commit into
mainfrom
dev/168-v2

Conversation

@fcanovai

Copy link
Copy Markdown
Contributor

Implement our own retention policy system.

Kopia retention policies could not consider Klio backups atomically, as Kopia applies its retention policies to the snapshots. A backup is composed by a set of snapshots, and a backup updated partially due to a failure could remove some of the snapshot and leave others, resulting in missing snapshots and misaligned data.

This PR drops the Kopia retention policies in favour of Klio managed ones. Currently only 'latest' is supported. The retention policies are still defined by the PluginConfiguration, but are sent to the Klio server on backup, and the Klio server has a worker that routinely cleans backups that are out of policy.

This implementation relies on the backup metadata being written last during a backup. A backup is the set of snapshots that is identified by the metadata. Snapshots without related metadata that older than an existing backup are considered orphans and deleted.

BREAKING CHANGE: old retention policies are no longer supported. Users should apply update their PluginConfiguration resources to use the new format.

Closes #168

Implement our own retention policy system.

Kopia retention policies could not consider Klio backups atomically,
as Kopia applies its retention policies to the snapshots. A backup is
composed by a set of snapshots, and a backup updated partially due to a
failure could remove some of the snapshot and leave others, resulting in
missing snapshots and misaligned data.

This PR drops the Kopia retention policies in favour of Klio managed
ones. Currently only 'latest' is supported. The retention policies are
still defined by the PluginConfiguration, but are sent to the Klio
server on backup, and the Klio server has a worker that routinely cleans
backups that are out of policy.

This implementation relies on the backup metadata being written last
during a backup. A backup is the set of snapshots that is identified by
the metadata. Snapshots without related metadata that older than an
existing backup are considered orphans and deleted.

BREAKING CHANGE: old retention policies are no longer supported. Users
should apply update their PluginConfiguration resources to use the new
format.

Closes #168

Assisted-by: Claude
Signed-off-by: Francesco Canovai <francesco.canovai@enterprisedb.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Retention policies are not atomic across a backup's snapshots

1 participant