
Databases are great, but of little use if you can’t get your data into them. Probo.CI provides several ways to import your database and a built in helper to get your database into your application with a few short configurations. Helper imports are available for all of our supported database types.
You can only have one database type per build. You can’t have a MySQL and a Postgres database in the same build. You can have multiple databases in a single build, but only one can be imported with a helper. The others must be installed using a sequence of Script Plugins.
With that out of the way, lets talk about how you use helpers.
Helper imports are available as soon as you assign a database to your application in your .probo.yaml file. You do this by adding the database file as an asset and then usinbg the database tag for your respective plugin. The following plugins have support for database import helpers:
Helpers are magic. They take your database file and import it into the database in a default database. The name of the database differs depending on the plugin type but follow a common pattern. For example, the default database for a LAMPApp/PHP plugin is lampdb.
To use a helper import, you will need to add the database file as an asset and then use the database tag for your respective plugin. For example:
1 2 3 4 5 6 7 8 9 | database: mariadb:11.4 assets: - database.sql.gz steps: - name: LAMPApp Plugin With Database plugin: LAMPApp database: database.sql.gz databaseGzipped: true |
That’s pretty much it. This will take your database.sql.gz file, decompress it and iomport it into MariaDB. If you had specified mysql as your database, it would import it into MySQL database.
You will need to make sure the database you are importing is appropriate to the database being used. You can’t, for example, import a MySQL database dump into a Postgres database. That will cause errors and likely end badly.
When your build uses a MySQL or MariaDB database, the LAMPApp plugin (and every plugin that inherits from it, such as Drupal and WordPress) gives you control over how the database is created and how the server is configured before your import runs.
The helper creates the database, the user, and the access grants before importing your file. Each of these can be overridden in your plugin step:
| OPTION | DESCRIPTION | DEFAULT |
databaseName | The name of the database to create and import into. | lampdb |
databaseUser | The database user to create and grant access to the database. | probo |
databasePass | The password for the database user. | strongpassword |
databaseGzipped | Whether the database file is gzipped and should be gunzipped before importing. | false |
databaseBzipped | Whether the database file is bzipped and should be bunzipped before importing. | false |
dbOptionsThe dbOptions hash lets you set any MySQL or MariaDB server setting for your build. Each key/value pair is written to /etc/mysql/probo-settings.cnf - under the [mysqld] section for MySQL or the [mariadb] section for MariaDB - and the server is restarted before your database is created and imported, so the settings are in effect for the import itself. This is useful for large imports that exceed the default packet size or for matching your production server’s configuration:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | database: mariadb:11.4 assets: - database.sql.gz steps: - name: LAMPApp Plugin With Database plugin: LAMPApp database: database.sql.gz databaseGzipped: true databaseName: mydb databaseUser: myuser databasePass: mypassword dbOptions: max_allowed_packet: 128M key_buffer_size: 16M innodb_buffer_pool_size: 256M |
Some older examples use a mysqlCnfOptions key for these settings. The dbOptions hash is the current mechanism used by the database setup helper and works for both MySQL and MariaDB.
Here are the ways to export your data to prepare it for Probo.CI:
Export the database via mysqldump and then compress it with gzip.
Export the database via pg_dump and then compress it with gzip.
Export the database via mariadb-dump and then compress it with gzip.
Export your database as a .bacpac file and then compress it with gzip. Note that the sqlpackage command is only available to .NET builds natively. If you need to use SQL Server with another applicaion type (non .NET) then please click here for instructions on installing dotnet on your build and using the sqlpackage command to import the database.

When you sign up for a Probo.CI registration code, you will get a two week trial of the plan of your choosing. For more information on how to get started, click here .
LEARN MORE ABOUT PROBO.CI'S PRICING