When changing database providers, you must migrate your existing database data from your current database provider to the new provider to prevent unexpected data loss.

Posit Workbench uses the database for storing the status of users and for sharing information between servers when load balancing. It also has a schema_version table that is used to record the current database schema version so that Workbench can apply any necessary updates when installing a new version.

The following steps should be taken to perform a successful migration from SQLite to PostgreSQL:

  1. Create an empty database called rstudio in PostgreSQL (or any custom name according to your Workbench configuration). Ensure the connection credentials work for the new database.
  2. Stop Workbench.
  3. Switch to PostgreSQL by modifying the /etc/rstudio/database.conf file. If you are storing the SQLite database in a different location be sure to keep the directory option in the file during the migration.
  4. Run the command sudo rstudio-server migrate-db. Watch for the output and confirm that the migration was successful.
  5. Once the data has been imported to the new database, restart Workbench.
  6. Validate the active users information in the Administrative Dashboard, and/or inspect the old and new tables: schema_version, licensed_users, and revoked_cookie.

The migration from PostgreSQL to SQLite is not currently supported.