Starting a database
Last updated
Last updated
To start a database, you can either:
Create a completely new database from a base image or volume
Copy an existing Tonic Ephemeral database
For a new database, you can create the database from either:
A user snapshot. The new database is populated with the data from the snapshot. This might be:
A user snapshot created from another Ephemeral database. For more information, go to Creating a user snapshot from an Ephemeral database.
A user snapshot created by importing data from an external source. For more information, go to Creating a user snapshot from imported data.
A user snapshot created from a Tonic Structural data generation where the workspace is configured to write output to an Ephemeral user snapshot. For more information, in the Structural documentation, go to .
A data volume that is in your container registry. The database is populated from the data volume. This might be a data volume created from a Tonic Structural data generation where the workspace is configured to write output to a container repository. For more information, in the Structural documentation, go to . The data volumes are in a location that you configure in Ephemeral. For more information, go to Setting the registry location for data volumes.
An image that Ephemeral provides. This creates an empty database.
When you copy an existing database, it uses the current data in the copied database.
For both new and cloned databases, you can configure the allocated disk storage and expiration.
To start and configure a new database, on the Databases page, click Start Database.
The database creation panel displays.
In the Name field, provide a name for the database.
Optionally, in the Description field, provide a longer description of the database.
To create the database from a user snapshot:
On the database creation panel, under Source data from, click Snapshot.
From the User snapshots dropdown list, select the user snapshot to use for the database. To search for a specific snapshot, begin to type the snapshot name.
Note that you can also start a database from a snapshot on the Snapshots page. From the Snapshots page, you can create a database from either a user snapshot or an auto snapshot.
To create the database from a data volume in your container registry, under Source data from, click Registry.
In the Volume field, specify the volume.
An Ephemeral data volume is an OCI artifact that contains one layer. The layer consists of a tar.gz of the database’s data directory, and a JSON file that provides database metadata. To specify the volume, use one of the following formats:
<registry URL>/<repository path>:<tag>
(For example, quay.io/tonicai/ephemeral-volumes:myvolume
)
<registry URL>/<repository path>@<digest>
(For example, quay.io/tonicai/ephemeral-volumes@sha256:930513081gpwl92fda75560fa67ul9afe03bc19e250258c915abceb72f8329da2
)
To create an empty database:
Under Source data from, click Create an empty database.
Under Select database type, click the type of database Ephemeral currently supports the following database types:
MySQL
Oracle
PostgreSQL
SQL Server
From the Image dropdown list, select the image to use. The list includes the images for different versions of the database type that you selected.
For Ephemeral Cloud, you can only select the Oracle 23c image that we provide. This image has the following limitations:
A maximum of 12GB of user data
A maximum of 2CPU cores and 2GB of RAM
On a self-hosted instance, the available images include any custom images that you added. For more information, go to Managing custom images.
After you set the source information for the database:
Configure the storage and compute resources for the database. For more information, go to Setting the required resources for a database.
Configure the expiration for the database. For more information, go to Setting the database expiration.
For a MySQL database, optionally provide a custom configuration file. For more information, go to Providing a custom configuration file.
After you complete the configuration, to start the database, click Start.
Tonic Ephemeral adds the database to the list, and creates an auto snapshot of the database.
You can also start a new database by copying an existing database. When you copy a database, you start with the data that is currently in the copied database.
For a cloned database, you can only change the allocated space and the expiration settings.
To copy an existing database to a new database:
On the Databases page, click the options menu for the database to clone.
In the options menu, click Copy Database.
On the details panel, in the Name field, provide the name for the new database.
Optionally, in the Description field, provide a longer description for the new database.
Configure the storage and compute resources for the database. For details, go to Setting the required resources for a database. Note that the allocated disk space for the copy cannot be less than the allocated space for the original database.
Configure the expiration for the database. For details, go to Setting the database expiration.
Click Save. Ephemeral adds the database to the list, and creates an auto snapshot of the database.