RStudio autosave environment and session

How can RStudio Server be configured to autosave all environment and session info?
So that if the machine running the server restarts, users could just continue transparently form wherever they left off, even if they were just running stuff interactively in the R Console without saving scripts in files?