Need help or documentation for Rstudio Migration from one instance to another.

Hi Rstudio Team,

We need to migrate the rstudio server from one ec2 instance to another.
Can you please help us with a proper documentation which can help to have a smooth migration.
How to migrate rstudio server?
How to migrate user data? etc...

Thanks,
Vinay Nallan.

A couple of alternatives

  1. The machine image
  2. RStudio server on an Ubuntu image

The choice depends on whether a turn-key solution is referred (one of the currently 13 Amazon Machine Images, including Posit Connect) or custom built is preferred, in which case I’d start with the vanilla Ubuntu instance and use r2u from Dirk Eddelbuettel, the World’s Foremost Authority™️ on all things at the intersection of R and Debian.

Key features that allow installing all of tidyverse in under 20 seconds after downloading.

  • Full integration with apt as every binary resolves all its dependencies: No more installations (of pre-built archives) only to discover that a shared library is missing. No more surprises.
  • Full integration with apt so that an update of a system library cannot break an R package: if a (shared) library is used by a CRAN, the package manager knows and will not remove it. No more (R package) breakage from (system) library updates.
  • Installations are fast, automated and reversible thanks to package management layer.
  • Fast and well-connected mirror at r2u.stat.illinois.edu on the Internet2
  • Complete coverage with (currently) ~ 20,000 CRAN packages (and 240+ from BioConductor).
  • Complete support for both Ubuntu 20.04 ("focal") and Ubuntu 22.04("jammy").
  • Optional (but recommeded) bspm use automagically connects R functions like install.packages() to apt for access to binaries anddependencies.

The World’s Foremost Authority™️ used in honor of Professor Irwin Corey.

User data depends totally on how it’s being done now. if it’s already all within AWS, it may be as simple, say as connecting existing S3 buckets to the new instance. But if it’s outside that universe, it could mean retracing all the steps in the instance being replaced or starting from scratch.

hi technocrat,

Thanks for the response.

The existing rstudio server is in Azure and we are planning to migrate to ec2 instance on AWS.

Will a normal rsync of the user data will work?
Existing rstudio version is 4.0.5 and the new version we are installing is 4.2.2. Will this cause any conflicts with the existing packages installed in the user home directory?

Thanks,
Vinay Nallan.

That is not the RStudio version, that is the R version. Updating RStudio will not bring any problem unless you (or any user) have custome configuration with deprecated options.

A major R version update requires recompiling of some packages so you would need to run this for each user and for your site-library if you have one

update.packages(checkBuilt = TRUE, ask = FALSE)

Also, you have to make sure the required system dependencies (for any installed package) are present on the new EC2 instance.

For this kind of task I like to use an "infrastructure as code" solution (Ansible in my case) that way I can automate any repetitive task and document the process in case anything goes wrong with the additional benefit of being reusable if I need to do this again in the future.

1 Like