How I deleted some files and easily got them back

|

I just did a stupid error that sometimes happens. I was logged in to my web hosting account over SFTP and wanted to delete some files. BUT… the wrong directory was highlighted and instead of those specific files, it started deleting everything in my web directory. OOOOOOOOOPS.

Fortunately, deleting with SFTP takes a bit of time as it has to go through every file and directory individually, and I could hit Cancel fairly fast, so only some files were gone.

But they were still gone and I was panicking a bit. What do I do now??? I didn’t have local backups as, well, Dreamhost is supposed to backup them. But is there an easy way to get them back or do I have to contact support?

Fortunately there’s an easy way. Dreamhost has backup instructions on their wiki, and specifically this one lets you get back stuff easily. Just sign in over SSH, change to appropriate hourly/nightly/daily/weekly backup directory and copy the appropriate files to their actual place. Cool. Well done Dreamhost, that’s some good hosting. If only everything in the world was so easy to recover.

Leave a comment