clickhouse-backup icon indicating copy to clipboard operation
clickhouse-backup copied to clipboard

Error when restoring a backup with name like "dirname/backupname"

Open IvanShilnikov opened this issue 3 years ago • 3 comments

I can create a backup in the folder(clickhouse-backup create "25042021_1115/clickhouse/" --table dbname.*), but I can't list it or restore it. when restore, I get an error: "error can't restore: backup '25042021_1115/clickhouse/' is not found".

IvanShilnikov avatar Apr 27 '22 12:04 IvanShilnikov

could you share

LOG_LEVEL=debug clickhouse-backup create "25042021_1115/clickhouse/" --table dbname.*

and

LOG_LEVEL=debug clickhouse-backup retroe "25042021_1115/clickhouse/" --table dbname.*

?

as quick workaround i propose replace / character to -, to avoid wrong interprets with directory name

Slach avatar Apr 27 '22 12:04 Slach

I want to use "/" to store backups inside folders, like /var/lib/clickhouse/data/backup/25042021_1115/clickhouse/metadata.json. it seems to me that the problem is only in the GetLocalBackups function. If i make some changes to the func GetLocalBackups for support restoring backup from folders, will you accept our pull request and will it spoil any other functionality

IvanShilnikov avatar Apr 27 '22 12:04 IvanShilnikov

@IvanShilnikov welcome to make PR, but please add covered test case to ./tests/testflows or ./test/intergetion/

Slach avatar Apr 27 '22 12:04 Slach

close after intactivity, @IvanShilnikov looks like store backups inside /var/lib/clickhouse/data/backup is bad idea, /var/lib/clickhouse/backup/backup_name looks much better

Slach avatar Oct 20 '22 10:10 Slach