Storage Classes
All storage locations default to subdirectories of the Server.DataDir setting. The available classes of variable data are listed below:
- Cache - Stores data to increase performance for computationally intensive operations. Certain operations, such as Git package building, also temporarily cache data here. Defaults to
<DataDir>/cache. - Metrics - This directory contains aggregated metrics data to improve Usage Stats performance. Defaults to
<DataDir>/metrics. Package Manager recomputes these summaries from the usage database when they are absent, but it does so on demand, while a Usage Stats request waits for them, and the scheduled aggregation controlled byServer.UsageDataSchedulebuilds only the most recent period rather than backfilling. Carry this class over when you move an installation to new storage, so that a request for a long period does not have to rebuild it. Summaries for periods that are no longer covered byServer.UsageDataRetentioncannot be recomputed at all, because the underlying rows have been removed from the usage database. This class is unused when usage statistics are disabled. - Packages - Content that originated as an upload or a local build is stored here. Defaults to
<DataDir>/packages. Nothing in this class can be downloaded again, so it must be carried over when you move an installation to new storage. This includes:- Package tarballs and README files for local packages.
- Package tarballs and README files for git packages.
- R package binaries that were uploaded, in
<DataDir>/packages/binaries. These are not the same as the Binaries class described below. - Plugin bundles built for git plugin sources, in
<DataDir>/packages/plugins. - Local VSX extension files (.vsix archives, README, LICENSE, icons, etc.) in
<DataDir>/packages/vsx. - Python distribution files for local and git Python sources, in
<DataDir>/packages/python/shared, along with the JSON index files in<DataDir>/packages/python/<source-id>that record which distributions belong to each project and snapshot. These two parts of the<DataDir>/packages/pythondirectory must be kept together.
- CRAN - Package tarballs and README files for CRAN are stored here. Defaults to
<DataDir>/cran. This includes:- Package tarballs for CRAN packages that have been downloaded.
- README files for CRAN packages.
- Persistent - Stores persistent data that may not be deleted. Defaults to
<DataDir>/persistent. This includes:- The encryption key, at
<DataDir>/persistent/encryption/rstudio-pm.key. This cannot be regenerated. Refer to the Configuration Encryption section. - Build logs for git R, Python, and plugin builds, in
<DataDir>/persistent/git. These cannot be regenerated. - Repository snapshot manifest files, and the pointer files that record the current snapshot, in
<DataDir>/persistent/rsf. Package Manager downloads these again from the service configured byManifest.URLwhen they are absent. - Committed curated closure files for curated CRAN, PyPI, and VS Code Extension sources, in
<DataDir>/persistent/cran/curated,<DataDir>/persistent/python/curated, and<DataDir>/persistent/vsx/curated. These are not downloaded, but Package Manager can recompute them from the database.
- The encryption key, at
- PyPI - Package wheel and source files for PyPI packages are stored here. Defaults to
<DataDir>/pypi. This includes:- Package wheels and source files for PyPI packages that have been downloaded.
- Bioconductor - Package tarballs and README files for Bioconductor are stored here. Defaults to
<DataDir>/bioconductor. This includes:- Package tarballs for Bioconductor packages that have been downloaded.
- README files for Bioconductor packages.
- Binaries - Pre-compiled R package binaries that Package Manager downloaded for CRAN and Bioconductor packages are stored here. Defaults to
<DataDir>/binaries. This class holds downloaded binaries only. Binaries that an administrator uploaded belong to the Packages class instead, in<DataDir>/packages/binaries. - VS Code Extensions (VSX) - Stores cached remote OpenVSX extension assets downloaded from open-vsx.org. Defaults to
<DataDir>/vsx.
Copy the Packages class in full when you move an installation to new storage. If the JSON index files under <DataDir>/packages/python are absent while the distribution files under <DataDir>/packages/python/shared are present, the scheduled packages eviction treats those distributions as orphaned and removes them, and they cannot be downloaded again. The schedule is controlled by the Server.PackagesEvictionSchedule setting, described in the EvictionPolicy section.
While it is not recommended, you can customize the storage directory for each storage class. For example:
/etc/rstudio-pm/rstudio-pm.gcfg
[FileStorage "cache"]
Location = /mnt/rstudio-pm-cache
[FileStorage "persistent"]
Location = /mnt/rstudio-pm-persistent
[FileStorage "metrics"]
Location = /mnt/rstudio-pm-metrics
[FileStorage "packages"]
Location = /mnt/rstudio-pm-packages
[FileStorage "cran"]
Location = /mnt/rstudio-pm-cran
[FileStorage "bioconductor"]
Location = /mnt/rstudio-pm-bioconductor
[FileStorage "pypi"]
Location = /mnt/rstudio-pm-pypi
[FileStorage "binaries"]
Location = /mnt/rstudio-pm-binaries
[FileStorage "vsx"]
Location = /mnt/rstudio-pm-vsxIf you customize any of the Package Manager storage directories, the rstudio-pm user must have permission to read, write, and create directories in each data directory.