v.24.2Improvement

Add config setting backups.remove_backup_files_after_failure

Add new config setting backups.remove_backup_files_after_failure: <clickhouse> <backups> <remove_backup_files_after_failure>true</remove_backup_files_after_failure> </backups> </clickhouse>. #60002 (Vitaly Baranov).
Introduces a new configuration setting backups.remove_backup_files_after_failure to automatically remove backup files if a backup operation fails.

Why it matters

This feature helps maintain storage hygiene by automatically deleting incomplete or failed backup files, preventing accumulation of corrupted or partial backups, and thus reducing manual cleanup effort for users.

How to use it

Enable this feature by adding the following configuration to the ClickHouse server config file:

<clickhouse>
<backups>
<remove_backup_files_after_failure>true</remove_backup_files_after_failure>
</backups>
</clickhouse>

This will ensure that any backup files from failed backup operations are automatically removed.