The process for migrating Posit/RStudio Workbench from one instance to another is similar, whether you're going from on-prem to the cloud or just upgrading to a new machine.
Once you have R and Posit Workbench installed and working on the new machine, there are a few different categories of data you may wish to migrate: R packages, your user's data on the system, your license key, and your system configuration.
How you migrate R packages will depend somewhat on how you intend to manage your package environment. If users are entirely responsible for managing their own packages, migrating user data will also migrate their packages.
If some packages are installed by an administrator, you should reinstall these packages on the new server. You should not simply copy over the folder containing the packages, as changes in operating systems, R versions, and other architectural packages could result in breakages. Packages should be reinstalled on the new system by running the
install.packages() from within an R session.
Administrators can determine the set of packages available to a particular user by logging in as that user and running
installed.packages() in an R session or the system-wide packages installed by scanning the
/lib/R/library/ directory under the R installation (at
/opt/R/<version> if you followed Posit's instructions for installing R).
Migrating User Data
In order to migrate user data including their user-installed packages and RStudio projects, you should copy the entire user home directory onto the new server. A file sync-ing tool like rsync may be useful to accomplish this task.
R packages users have installed in their home folders can break upon a system upgrade. You may wish not to migrate the folders that contain packages within user home folders (generally at
~/R/ for each user). Users can then manually reinstall these packages, or you could choose to install them at a system level on the new machine.
License Key Migration
You will need to activate your license key on the new server. Detailed instructions for migrating your license key are available here.
All new installations of Posit Workbench come with a 45-day evaluation license, so you will not need a special license activation if you can accomplish your migration in that time. If you have special circumstances that will require longer than 45 days, please reach out to your Customer Success representative or firstname.lastname@example.org for assistance.
You may wish to migrate your RStudio Workbench configuration settings. These are contained in the configuration files in the
/etc/rstudio directory. Migrate these settings with care, as some may change on your new server.
Other system-level settings, like PAM authentication (often at
/etc/pam.d/) and database connections (often at
/etc/odbcinst.ini) can be migrated by copying the respective system-configuration files over to the new machine.
If you are using the default SQLite database with Posit/RStudio Workbench, it will be created by default at
/var/lib/rstudio-server. This will also need to be migrated by copying that directory over to the new machine.
If you are using an external Postgres server for your database, it should be sufficient to copy over your Workbench configuration settings as described above.