Here I am at 2 am and there is an emergency email from a client. Went to the Mac and meddle with some files, trying to right some wrong. Feeling like a boss, I started deleting all the redundant files and fucking hell, I deleted the entire album of photos. From 2007 til 2011. All the photos gone.
I started sweating. Images of cigarettes appear in my head. I sat there stoned. Ok calm down. Solutions solutions.
Option 1// .trash Folder
I navigated to each folder and start looking for the deleted folders. Especially in the Trash can. Nothing there. /.trash folder is empty too. FML
Option 2// SSH
Ok ok. fine fine. I’ll just log in to the cPanel and give myself a SSH access. No login credentials were given for either. After trying a few times, holy moly I am in the cPanel. Fuck yea meme – I feel like a hacker. No time to gloat, SSH settings here we go.
Generate public keys.. private keys. I have done this before. but the instructions are swimming in front of me cuz I am too fucking stressed. Great. And what’s that search function for Terminal again. I can’t remember. Damn.
Option 3//Backups in cPanel
Not likely to work. Since it wasn’t set up and there are just daily and partial downloads. But wait.
I mouse over the Home Directory button, I saw a tar.gz file with a DATE attached to it. I pumped my fist in the air and copy the link, change the date to the day before and downloaded it.
While I waited, I look at the server administrator email and did a google to find out who is the fucker that owns the server whom folders I deleted. Somehow I feel like it is all his fault. It is so nice to blame people at times like these.
Download is done. I unzipped. Took damn long. No luck, the date didn’t matter, it is a download of the current state of the files.
I have to try system backup. I click on the daily button. I am guessing they back up before I deleted the folders, since I made the changes 1 hour before. It couldn’t back up that fast. I had to download it before they started the new back up.
Downloading again. Paranoid, I search for the compression ratio of tar.gz. I calculated the current size and checked with my first download. It matched. Add that to the SQL file size and all I need is for this file to be WAY bigger than the first one in size. 641 mb. It’s a good sign.
I unzipped it. The files shown are weird. I saw a homedir.tar file. 634 mb. Hurray. I unzipped it.
It is all there. I lost a few files in the end but thats the recent files which I am sure my client still have them in her pc somewhere. In fact, this so called Daily backup is 5 days late. So I have 5 days worth of photos to apologize for in the end. Better than 4 years of photos.
Hope my experience help you if you are in a similar sticky situation.