Cloning a Database
Cloning a database creates a copy of that database inside the same ClickHouse cluster. This can be useful for testing applications against realistic data.
NOTE: This operation creates a clone of the database, not a replica. Any changes to the original database will not be reflected in the clone, and any changes to the clone will not be reflected in the original database.
To get started, click the EXPLORE button in the Clusters view:
Figure 1 – The EXPLORE button
In the Explorer view, switch to the Schema tab:
Figure 2 – The Schema tab
Click the vertical dots icon next to the table you want to clone and select Clone Database:
Figure 3 – The Clone Database menu item
You’ll be asked for a database name for the clone. The database name for the clone must begin with an upper- or lowercase letter or an underscore. It can contain letters, numbers, and underscores:
weather2024
- Valid2024weather
- Not valid - names must start with a letter or underscoreWeather_2024
- ValidWEATHER_2024
- ValidwEaThEr_2024
- ValidWEATHER-2024
- Not valid - only letters, numbers, and underscores are allowed_WEATHER_2024
- Valid - names must start with a letter or underscore
Figure 4 - Clone database dialog
If the name you enter isn’t valid, you’ll see this message:
Figure 5 - Database name error message
Click CONFIRM to clone the database. The cloned database and its tables will show up in the display after a few minutes.