You may need to migrate your Package Manager installation:
- When moving from one environment to another (e.g., physical to virtual or on-prem to cloud)
- To facilitate HA setup with more than one node
Several factors must be considered before migrating your Package Manager installation from one server to another. We recommend that you don't make any configuration changes (or as few as possible) during the initial migration. If, for instance, you will be migrating to a new server and upgrading to a new default version of R, complete the migration first. Then upgrade R in subsequent steps.
Before you migrate the server, you need to perform a backup to obtain a consistent copy of the data in the necessary directories. These directories can then be copied to the new server.
- Install Package Manager on the new server, then stop the service.
- Mirror the Unix accounts used by Package Manager on the existing server to the new server. See the Account for Processes section. If you are using the default
rstudio-pmaccount and group, then you will only need to consider the user account that needs permission to use the CLI.
- Copy the config and data directories while preserving the permissions and file ownership. Not all file transfer clients can preserve these attributes, so consider using
-aflag to copy the data.
- Update your
/etc/rstudio-pm/rstudio-pm.gcfgfile if you've changed settings like the path to your data directory.
- Install the same version(s) of R on the new server to mimic existing behavior. If you must install a different version of R, Package Manager will still function correctly, but certain functions (like building Git packages) may be affected.
If you are also migrating to a different database provider, see the section on Changing the Database Provider.
Server log messages related to this component can be shown by enabling the
readme-migration regions. More information about activating log regions is in the configuration appendix.