leo.blog();

ClickHouse incremental backup

I recently switched from daily full backups in S3 for my ClickHouse server to incremental backups.

Daily backups are useful. But they take too much space. That’s bad. But most of your data doesn’t change every day, so you can store only the parts that change.

  1. Get a list of tables
  2. Freeze each table
  3. Copy the metadata folder into your frozen backup folder
  4. Use rsync to make an incremental backup using the --link-dest option.

I store my incremental backups in rsync.net. But any SSH host, or any path you can mount on Linux will also work.

Leave a Comment