I'm moving all of the apps from one posit connect instance to another as part of a server migration. I noticed that there are many broken packrat symlinks in the apps folder. However the apps seem to work ok even though the links to cached R packages are broken (they point to R packages that don't exist). Has anyone encountered this before?
How are you moving the files--what commands are you using? What options have you specified for that command?
Is this purely a transfer or files or are other things about the server environment changing, like the operating system or the versions of R on the system?
When you say the R packages "don't exist", what exactly do you mean?
When you say the "apps seem to work ok" -- what are you seeing?
There are a couple of docs you may want to check out here:
It sounds like the migration you're performing is one for which we would advise the rebuilding of the package caches--this will happen automatically when the content is visited if Connect detects that the environment needs rebuilding, but you can also trigger it programatically as described in the docs above.
Hopefully that's helpful context--feel free to open a support ticket if you run into problems.
How are you moving the files--what commands are you using? What options have you specified for that command?
I'm using rsync as described here. I log into the older server and run rsync to move the copy the data folder to the prod server. I'm using root to copy the files and then resetting the owner of all the files to posit-connect after the copy is completed.
The posit connect app data is in a network drive mounted to /data.
Is this purely a transfer or files or are other things about the server environment changing, like the operating system or the versions of R on the system?
Other things are changing as well. The OS is the same. I'm also migrating from sqlite to postgres which I do after running rsync. We have multiple versions of R on both systems but there are more versions of R installed on the new machine than the old one.
When you say the R packages "don't exist", what exactly do you mean?
In the /data/apps folder I see the shiny apps that have been deployed to Connect. The folders are named with a number which I think is the app id.
Inside each app folder there are folders for each deployment.
Inside each deployment folder there is a packrat folder with symlinks to cached R packages.
For example /data/apps/108/553/packrat/lib/x86_64-pc-linux-gnu/4.2.1 contains many symlinks. One of them is tidyr -> /opt/rstudio-connect/mnt/packrat/4.2.1/v2/library/tidyr/0asdfasdfasdf/tidyr
However the folder '/opt/rstudio-connect/mnt/packrat' is empty so I think these links are broken meaning that the data they are pointing to does not exist.
When you say the "apps seem to work ok" -- what are you seeing?
When I visit app 553 on the connect server it seems to start up and work fine. I don't see any broken functionality or errors.
Even after the content is visited the directory /opt/rstudio-connect/mnt/packrat is still empty so the links in data/apps/108/553/packrat/lib/x86_64-pc-linux-gnu/4.2.1 still point to data that that does not exist.
I'm assuming the symlinks in /data/apps/{appdir}/{deploymentdir}/packrat/... are not necessary to run the apps.