Starting a database
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 Writing output to Tonic Ephemeral.
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 Writing output to a container repository. 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.
Starting a completely new database
To start and configure a new database, on the Databases page, click Start Database.
The database creation panel displays.
Setting the database name and description
In the Name field, provide a name for the database. For database connections, the name is used for the database server.
Optionally, in the Description field, provide a longer description of the database.

Starting from a user snapshot
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.
Starting from a data volume
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
)
Creating an empty database
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.
Setting other configuration settings
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.
Configuring advanced settings for PostgreSQL and MySQL
For a PostgreSQL or MySQL database, the Advanced Settings section provides additional options.

Custom database name
The database name identifies the actual database or schema. After you create the database, you cannot change the name.
By default, Ephemeral generates a name that is based on the value in the Name field. It strips out spaces and invalid characters.
If the generated name is too short, Ephemeral uses mydb
for MySQL and postgres
for PostgreSQL. The generated names never exceed 64 characters for MySQL, and 63 characters for PostgreSQL.
To instead provide a custom name:
Toggle Set database name to the on position.
In the field, provide the database name.
Custom configuration file
To ensure that the database is configured correctly, you can provide a custom configuration file. For more information, go to Providing a custom configuration file.
Starting the new database
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.
Copying an existing 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.
Last updated
Was this helpful?