Migration
Changing Database Provider#
Connect includes a migrate command for migrating data from one database
to another.
The migration utility is installed at
/opt/rstudio-connect/bin/migrate. It uses the configuration defined in
/etc/rstudio-connect/rstudio-connect.gcfg unless you specify an alternate
configuration file with the --config flag.
The migrate utility must be run as root.
The migrate utility can only be run when Connect is stopped. See the
Stopping and Starting for
information on stopping and restarting Connect.
Note
- Migration from PostgreSQL to SQLite is not supported at this time.
- Migration of instrumentation event data is not supported at this time.
If you are also migrating your RStudio Connect installation to a new server, see Server Migrations.
Database Migration Checklist#
Use this checklist to guide your migration process:
- Shut down Connect
- Back up your data
- Ensure that you have a
Postgresconfiguration section - Run the migration
- Update
Database.Providerto point to the new database - Restart Connect
Configuration Requirements#
When migrating data, the configuration file must contain valid configuration
sections for both SQLite and Postgres. The migration utility will connect
to the SQLite and PostgreSQL databases specified in the configuration.
Authentication Provider#
The Changing Authentication Provider section describes how to transition from one style of authentication to another.
Configuration Migration#
New version of RStudio Connect will automatically generate a migration file whenever a new setting needs to be added to the configuration of an existing installation. The migration file will be kept separated from the main configuration file. It is recommended that migrated settings be moved to the main configuration file at your earliest convenience.
See the Configuration appendix for details about the process and other information on this migration.