92 Migration
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.
The following steps should be taken to perform a successful migration from SQLite to PostgreSQL:
- Create an empty database called
rstudio
in PostgreSQL (or any custom name according to your RStudio configuration below). Ensure the connection credentials work for the new database. - Stop RStudio.
- 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 thedirectory
option in the file during the migration. - Run the command
sudo rstudio-server migrate-db
. Watch for the output and confirm that the migration was successful. - Once the data has been imported to the new database, restart RStudio.
Note
The migration from PostgreSQL to SQLite is not currently supported.