Altinity / clickhouse-backup

Tool for easy backup and restore for ClickHouse® using object storage for backup files.
https://altinity.com
Other
1.29k stars 227 forks source link

Action restore remote fails if backup is available locally #427

Closed DrissiReda closed 2 years ago

DrissiReda commented 2 years ago

Running the action restore_remote works perfectly if I start from an empty clickhouse cluster, with backups in my s3 bucket.

But if I run a backup, then a restore I get an error:

backup is already exists

And the restore fails.

Can't the restore_remote action just skip the download and restore the already present backup?

Slach commented 2 years ago

before run restore_remote second time, you need run clickhouse-backup delete local

moreover, use restore_remote --rm <backup_name> if your current database is not empty and contains old invalid data whcih not match with backup data in /var/lib/clickhouse/backups/