Upgrade
This page describes how to upgrade your DoltLab instance. We always recommend upgrading to the latest version of DoltLab, as older releases do not get patch updates.
Also note that upgrading to a newer version of DoltLab will require downtime, as the old version of DoltLab will need to be stopped in order to install the newer one.
Additionally, some early versions have different database schemas than newer ones. If the Docker volumes of an old version of DoltLab contain non-precious or test-only data, then DoltLab administrators can simply remove these Docker volumes and run the their DoltLab start script from the newer DoltLab version. This script will simply create new Docker volumes with the appropriate schema for that DoltLab version.
Upgrade from DoltLab v2.1.6
to v2.2.0+
v2.1.6
to v2.2.0+
There are important differences to be aware of when upgrading from DoltLab v2.1.6
to DoltLab >= v2.2.0
. In DoltLab >= v2.2.0
, organizations and teams are exclusive to DoltLab Enterprise.
This means that if you're old DoltLab instance uses organizations or teams, after upgrading to DoltLab >= v2.2.0
, you will see 404 errors when attempting to view the profile pages for existing organizations or teams. Any databases owned by those organizations will still be available, and function normally.
Additionally, use of an SMTP server is also exclusive to DoltLab Enterprise. This means that new users created on your DoltLab instance will be automatically verified, database collaborator invitations will be automatically accepted, and two-factor authentication will be disabled.
If a user needs to reset their password, the DoltLab administrator can reset the password on the user's behalf by navigating to Profile > Settings > Reset user passwords.
Finally, in the installer_config.yaml
, the smtp configuration is now part of the enterprise configuration section. Please see connecting DoltLab to an SMTP server for more information.
Aside from the smtp
configuration change in the installer_config.yaml
, no other changes are need to installer_config.yaml
to upgrade to DoltLab v2.2.0
, simply ensuring that the version
is v2.2.0
is sufficient.
Upgrade from DoltLab v2.1.4
to v2.1.5+
v2.1.4
to v2.1.5+
When upgrading from DoltLab v2.1.4
that uses an installer_config.yaml
to newer DoltLab, which also uses that configuration file, you can simply reuse your previous installer_config.yaml
with the newer DoltLab version.
First, be sure to stop your running DoltLab instance with ./stop.sh
.
Simply copy the old file into the same directory as the new DoltLab's installer binary, and rerun it.
Be sure rename your old doltlab
directory and unzip the new version of DoltLab using the name doltlab
. Currently, changing the parent directory name will change cause Docker to load the wrong data volumes.
You can also run the installer for the newer version of DoltLab with the config flag:
Upgrade from DoltLab v2.1.3
to v2.1.4+
v2.1.3
to v2.1.4+
DoltLab v2.1.4
no longer writes or maintains a .secrets
directory co-located with the installer
. Instead, DoltLab >= v2.1.4
ships with a configuration file that the installer
uses called ./installer_config.yaml
.
The default configuration file contains default values for all passwords the DoltLab requires, and is much simpler to maintain. Please see the Installer Configuration File Reference for more information.
Upgrade from DoltLab v2.1.2
to v2.1.3+
v2.1.2
to v2.1.3+
DoltLab v2.1.2
wrote generated passwords to a .secrets
directory co-located with the installer
.
Before upgrading to a newer DoltLab version, collect the values of these passwords from the .secrets
directory of the DoltLab instance you will replace. It is important to reuse these same values in the newer installation of DoltLab, since the older version was initialized with these values.
After collecting the values, when running the installer
for the newer DoltLab for the first time, supply the values to the installer
using their corresponding flag argument to ensure the installer
will use them and not generate new values, which will cause your instance to crash.
./.secrets/default_user_pass.priv
, use--default-user-password
with theinstaller
to save the password for the default user../.secrets/dolt_admin_password.priv
, use--doltlabdb-admin-password
with theinstaller
to save thedolthubadmin
password for DoltLab's application database../.secrets/dolt_dolthubapi_password.priv
, use--doltlabdb-dolthubapi-password
with theinstaller
to save thedolthubapi
password for DoltLab's application database../.secrets/smtp_username.priv
, use--smtp-username
with theinstaller
to save the SMTP username for an SMTP server. This is only required if your previous installation was connected to an SMTP server usinglogin
orplain
authentication../.secrets/smtp_password.priv
, use--smtp-password
with theinstaller
to save the SMTP password for an SMTP server. This is only required if your previous installation was connected to an SMTP server usinglogin
orplain
authentication../.secrets/smtp_oauth_token.priv
, use--smtp-oauth-token
with theinstaller
to save the SMTP oauth token for an SMTP server. This is only required if your previous installation was connected to an SMTP server usingoauthbearer
authentication.
Upgrade from DoltLab v2.0.8
to v2.1.0+
v2.0.8
to v2.1.0+
The upgrade process for DoltLab v2.0.8
to v2.1.0
has not changed, and only requires replacing DoltLab v2.0.8
with DoltLab v2.1.0
, the way previous upgrades did.
However, DoltLab v2.1.0
requires configuring DoltLab using the included installer
binary. This binary uses flag arguments to replace environment variables that were required by DoltLab <= v2.0.8
. Please see the list of environment variables below, and use their counterpart flags arguments with the installer
instead.
HOST_IP
, the IP address or domain name of the Linux host running DoltLab. Use --host
with the installer
.
DOLT_PASSWORD
, the dolthubadmin
password for DoltLab's application database. Use --doltlabdb-admin-password
with the installer
.
DOLTHUBAPI_PASSWORD
, the dolthubapi
password for DoltLab's application database. Use --doltlabdb-dolthubapi-password
with the installer
.
EMAIL_USERNAME
, the username authorized to use existing SMTP server. Use --smtp-username
with the installer
.
EMAIL_PASSWORD
, the password for the aforementioned username of the SMTP server. Use --smtp-password
with the installer
.
EMAIL_PORT
, the port of an SMTP server. Use --smtp-port
with the installer
.
EMAIL_HOST
, the host of an SMTP server. Use --smtp-host
with the installer
.
NO_REPLY_EMAIL
, the email address that sends DoltLab emails. Use --no-reply-email
with the installer
.
DOLTLAB_ENTERPRISE_ONLINE_PRODUCT_CODE
, the DoltLab Enterprise product code. Use --enterprise-online-product-code
with the installer
.
DOLTLAB_ENTERPRISE_ONLINE_SHARED_KEY
, the DoltLab Enterprise shared key. Use --enterprise-online-shared-key
with the installer
.
DOLTLAB_ENTERPRISE_ONLINE_API_KEY
, the DoltLab Enterprise api key. Use --enterprise-online-api-key
with the installer
.
DOLTLAB_ENTERPRISE_ONLINE_LICENSE_KEY
, the DoltLab Enterprise license key. Use --enterprise-online-license-key
with the installer
.
TLS_CERT_CHAIN
, the absolute path to a TLS certificate chain. Use --tls-cert-chain
with the installer
.
TLS_PRIVATE_KEY
, the absolute path to a TLS private key. Use --tls-private-key
with the installer
.
Upgrade from DoltLab v1.1.1
to v2.0.0+
v1.1.1
to v2.0.0+
The upgrade process for DoltLab v1.1.1
to v2.0.0
has not changed, and only requires replacing DoltLab v1.1.1
with DoltLab v2.0.0
, the way previous upgrades did.
However, DoltLab v2.0.0
is the first version of DoltLab that supports Enterprise mode, a configuration exclusive to DoltLab Enterprise customers. Prior to v2.0.0
, DoltLab was released with enterprise features included. However, these exclusive features are now unsupported by DoltLab v2.0.0
for non-enterprise customers.
If you are currently using the any of the following enterprise features in DoltLab <= v1.1.1
, you will lose them by upgrading to DoltLab v2.0.0
:
Upgrade from DoltLab v0.8.4
to v1.0.0+
v0.8.4
to v1.0.0+
DoltLab v0.8.4
is the final version of DoltLab released using PostgreSQL as the database backing DoltLab's API. Starting with DoltLab v1.0.0
, DoltLab runs on Dolt.
If your current DoltLab instance is older than v0.8.4
, you must first upgrade to this version before upgrading to DoltLab v1.0.0
. This ensures your DoltLab instance contains the necessary schema changes required to run the database migration script included with DoltLab v1.0.0
called ./migrate_postgres_dolt.sh
.
./migrate_postgres_dolt.sh
will copy all existing PostgreSQL data from your old DoltLab instance into DoltLab v1.0.0
's Dolt database.
Let's walkthrough how to perform this upgrade and database migration with an example.
On a host running DoltLab v0.8.4
, we first stop DoltLab with docker-compose stop
. Next, we download and unzip DoltLab v1.0.0
to the same location as the previous version of DoltLab.
Before running the migration script, we will start DoltLab v1.0.0
for the first time using the ./start-doltlab.sh
script, then once DoltLab is started, shut it back down. Doing this quick, start-then-stop will create the new Docker volumes required for running DoltLab v1.0.0
and the migration script. Now, we can run ./migrate_postgres_dolt.sh
included with DoltLab v1.0.0
and supply the environment variable values we used for our DoltLab v0.8.4
instance. This script will automatically move our data from PostgreSQL to Dolt:
Once the script completes, DoltLab v1.0.0
can be started and all data from v0.8.4
will be present.
Upgrade from DoltLab v0.6.0
to v0.7.0+
v0.6.0
to v0.7.0+
Starting with DoltLab v0.7.0
, the ./start-doltlab.sh
script will create a doltlab
docker network externally, instead of allowing Docker Compose to create the network automatically. If you're upgrading to v0.7.0
or higher from an earlier DoltLab version, remove any doltlab
or *_doltlab
networks on the host before installing v0.7.0
.
Upgrade from DoltLab v0.3.0+
v0.3.0+
DoltLab versions >= v0.3.0
support schema migrations without data loss. To upgrade to a DoltLab version after v0.3.0
, simply stop your old version of DoltLab, then download and unzip the newer DoltLab version to the same location as your previous version. This will ensure that when you start the new version of DoltLab using the start-doltlab.sh
script, the old DoltLab version's Docker volumes get attached to the new version's containers.
Upgrade from DoltLab v0.2.0
to v0.3.0
v0.2.0
to v0.3.0
To upgrade without data loss, follow the same instructions for upgrading found in the Upgrade from DoltLab v0.1.0
v0.2.0
section.
Upgrade from DoltLab v0.1.0
to v0.2.0
Without Data Loss
v0.1.0
to v0.2.0
Without Data LossTo upgrade DoltLab v0.1.0
to v0.2.0
, leave DoltLab v0.1.0
's services running and connect a PostgreSQL client from inside the doltlab_doltlab
Docker network to the running doltlab_doltlabdb_1
server. On the DoltLab host machine, run:
The value of PGPASSWORD
should be the POSTGRES_PASSWORD
set when DoltLab v0.1.0
was first deployed. You should now see the SQL dump file called doltlab-v0.1.0-dump-data-only.sql
.
Next, edit the doltlab-v0.1.0-dump-data-only.sql
file by adding the line SET session_replication_role = replica;
near the top of the file:
You can now stop the DoltLab v0.1.0
services and delete the Docker caches and stopped containers on the host by running:
Next, remove the Docker volume used with DoltLab v0.1.0
's doltlab_doltlabdb_1
postgres server by running:
Download DoltLab v0.2.0
, unzip it's contents, and start DoltLab v0.2.0
's services by running the start-doltlab.sh
script.
After the script completes, confirm DoltLab v0.2.0
's services are running with docker ps
:
Now, connect a PostgreSQL client from inside the doltlab_doltlab
Docker network to the running doltlab_doltlabdb_1
server to perform the data dump import. Then, update the has_dolt
column in the users
table.
You have now completed the upgrade, and should no be running DoltLab v0.2.0
with your postgres data from DoltLab v0.1.0
.
Last updated