In a shiny app hosted with shinyapps.io, I save data locally in RDS format. Can I access and delete the data outside the app?
If not, my plan is to have a "maintenance" button on the app to reset the data. From within the app, I'm able to access the data with this:
if (file.exists("data.Rds")){
vars$data <- readRDS("data.Rds")
}
and from here delete the file content (untested, but seems feasible). But that would expose the functionality to anyone using the app. Is there instead a sequence of steps I can follow via terminal and authentification to access and delete the data? Thanks!
Shinyapps.io (unless theres been a recent change I've not been notified of / and the documentation hasnt kept pace) doesnt offer permanent storage for hosted apps. Chapter 5 Storage | shinyapps.io user guide (rstudio.com)
any RDS you save into the filesystem during your apps runtime will be deleted when the session ends.
If you need permanent storage you should look into your options to achieve that. Depending on what you go with you can no doubt clear out the data in different ways.
I find that the RDS I save persists over several days.
I have set it to be deleted after it reaches a certain size, otherwise it does get stored for a while (not perhaps permanently). Is there a way to delete it manually?