Recovering deleted files from RStudio Server Pro

This has not happened yet but I'm sure it is only a matter of time before someone accidentally deletes a file on RSP and wants to recover it. The server is backed up nightly, but I'm not sure how easy it would be to recover a single file from those backups. Have other R Admins encountered this, and what is best practice for preventing accidental loss of work on RSP?

1 Like

The delete function in the RStudio IDE just performs a standard Linux rm, so recovering a single file is as easy or hard as it would be if someone were to perform a rm file on the command line. I'd recommend trying that yourself (with an unnecessary test file, naturally :grin:) and check and see if you're able to recover a single file from your backups.

Otherwise...we've suggested utilities like PhotoRec ( in the past for users who've accidentally deleted files they needed to recover. You have to run it as soon as possible though, and ideally with no one else using the server to write files to disk, to try and make sure the data you're trying to recover doesn't get overwritten.

In general I'd say best practices are backup, backup, backup, and make sure you're prepared to recover from those backups!


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.