Monday, March 16, 2026

Issue trying to back up the clickhouse database

While trying to issue a backup database statement and receiving the following error.

Code: 627. DB::Exception: Received from localhost:9000. DB::Exception: Not found backup engine 'DISK'. (BACKUP_ENGINE_NOT_FOUND)


backup database test to DISK('backups','test_1');


BACKUP DATABASE test TO DISK('backups', 'test_1')
Query id: 19a96e04-a9f9-408a-956c-d1a60a72fe82
Elapsed: 0.050 sec.
Received exception from server (version 26.2.4):
Code: 627. DB::Exception: Received from localhost:9000. DB::Exception: Not found backup engine 'DISK'. (BACKUP_ENGINE_NOT_FOUND)


Added new entry into /etc/clickhouse-server/config.d/ and restarted the clickhouse-server.

<clickhouse>
<storage_configuration>
<disks>
<backups>
<type>local</type>
<path>/var/lib/clickhouse/backups/</path>
</backups>
</disks>
</storage_configuration>
<backups>
<allowed_disk>backups</allowed_disk>
<allowed_path>/var/lib/clickhouse/backups/</allowed_path>
</backups>
</clickhouse>


Resolution.

It turns out the disk is case sensitive as Disk.

BACKUP DATABASE test TO disk('backups', 'test_database_backup_1');

BACKUP DATABASE test TO disk('backups', 'test_database_backup_1')
Query id: a9867d40-6965-4ac5-b722-2dc90bb5bc71
Elapsed: 0.003 sec.
Received exception from server (version 26.2.4):
Code: 627. DB::Exception: Received from localhost:9000. DB::Exception: Not found backup engine 'disk'. (BACKUP_ENGINE_NOT_FOUND)



Test with "Disks"

BACKUP DATABASE test TO Disks('backups', 'test_database_backup_1');


BACKUP DATABASE test TO Disks('backups', 'test_database_backup_1')

Query id: def1034e-872c-4563-895c-cdde4df4b222

Elapsed: 0.037 sec.

Received exception from server (version 26.2.4):

Code: 627. DB::Exception: Received from localhost:9000. DB::Exception: Not found backup engine 'Disks'. (BACKUP_ENGINE_NOT_FOUND)


Test with Disk

Successful !

BACKUP DATABASE test TO Disk('backups', 'test_database_backup_1');

BACKUP DATABASE test TO Disk('backups', 'test_database_backup_1')
Query id: ca4a9b80-0193-4139-b79c-116df0990b4d
┌─id───────────────────────────────────┬─status────────┐
1. │ b2899464-7b17-48f6-92d0-933db17f5b44 │ BACKUP_CREATED │
└──────────────────────────────────────┴──────────────┘

1 row in set. Elapsed: 0.006 sec.

sudo ls -las /var/lib/clickhouse/backups/test_database_backup_1
total 16
4 drwxr-x--- 3 clickhouse clickhouse 4096 Mar 14 15:42 .
4 drwxr-x--- 3 clickhouse clickhouse 4096 Mar 14 15:42 ..
4 -rw-r----- 1 clickhouse clickhouse 300 Mar 14 15:42 .backup
4 drwxr-x--- 2 clickhouse clickhouse 4096 Mar 14 15:42 metadata


Test backup with Disk("xxx",)

backup database test to Disk('xxx','test_1');


BACKUP DATABASE test TO Disk('xxx', 'test_1')
Query id: a42ffb06-883a-41c6-a3aa-09a750980014
Elapsed: 0.008 sec.
Received exception from server (version 26.2.4):
Code: 36. DB::Exception: Received from localhost:9000. DB::Exception: Disk ''xxx'' is not allowed for backups, see the 'backups.allowed_disk' configuration parameter. (BAD_ARGUMENTS)


Test back with "Disk"

backup database test to Disk('backups','test_1');


BACKUP DATABASE test TO Disk('backups', 'test_1')

Query id: 3b527b9d-08a4-43cd-b80c-ff39d265bfcd
┌─id───────────────────────────────────┬─status─────────┐
1. │ 23d072bd-cf1a-46d0-9417-1e252e59851a │ BACKUP_CREATED │
└──────────────────────────────────────┴───────────────┘

1 row in set. Elapsed: 0.004 sec.


Point of Reference

https://github.com/ClickHouse/ClickHouse/issues/54966



No comments:

Post a Comment

Issue trying to back up the clickhouse database

While trying to issue a backup database statement and receiving the following error. Code: 627. DB::Exception: Received from localhost:9000....