List of Articles Icon

Knowledge Base

Guides and answers for your VPS, the client area, and billing

I deleted files by accident. Can they be recovered?

What this is

You deleted something that mattered, a directory, a database, the wrong rm target. Here's the honest picture of what's recoverable and how, worst news first so the good options get your attention fast.

First: stop writing to the disk

When a file is deleted, its data blocks aren't erased, they're marked free, and every write to the disk from now on may overwrite them permanently. If you intend to attempt any recovery, act immediately: stop services that write (the database, the web app, logging if you can), and don't download or install recovery tools onto the same disk you're trying to recover from.

The honest expectations

  • Undelete tools mostly don't work here. Utilities like extundelete or testdisk are built for offline disks; on a live server that kept writing (and journaling) after the deletion, recovery odds drop fast, and partial recovery of a database's files is usually as useless as none. They're a last resort, not a plan.
  • We hold no copy of your data. There are no snapshots or copies on our side beyond the backups you've set up, we can't "restore it from our end", however the ticket is worded.
  • What actually saves you is a backup taken before the deletion, and there are two kinds you might have:

If you have Nightly Backups (or a Premium VPS)

This is the good outcome, and it's self-service in minutes:

  • A few files or folders: use Browse Files on last night's backup, a web file browser over the backup image where you can download files directly or copy them straight back to your VPS over SFTP. No full restore needed.
  • A whole database: if you followed the dump-nightly advice, pull the latest dump file out via Browse Files and load it. If not, a full restore rolls the entire VPS back to last night (everything else rolls back with it, so weigh that).
  • Timing matters: retention is three nights, and tonight's backup will reflect the deletion. Recover what you need today, not next week.
  • Windows VPS backups are restored by ticket.

If you have your own backups

Restore from your off-site copies, restic and friends restore single files trivially (restic restore --include /path). This is also the moment you learn whether the backup job you set up months ago still works, which is why that guide nags about restore testing.

If you have neither

  • For genuinely irreplaceable data, the last resort is the undelete route: power the services down to stop writes and work with testdisk/extundelete (ideally against the disk image, a full disk download requires the backup add-on, so on a bare VPS you'll be working live). Set expectations at "maybe fragments".
  • If the data is gone, it's gone, and the only useful output of the incident is the setup that makes it a non-event next time: enable Nightly Backups ($5/month, tonight is your first restore point) and an off-site routine for the long retention. An evening of setup converts every future version of this page into a ten-minute fix.

Still need help?

You can open a support ticket. So we can help on the first reply, it's worth mentioning:

  • the VPS hostname or IP,
  • what was deleted and when,
  • whether the VPS has Nightly Backups, or you have backups of your own.
  • "I accidentally deleted files on my VPS, can you restore them?"
  • "Does VPSDime keep copies of my files?"
  • "How do I recover one file from my nightly backup?"
  • "Do undelete tools work on a VPS?"
  • "I deleted my database, what are my options?"
Last reviewed: 2026-07-02