I panicked today after doing the worst thing anyone could do on their VPS CentOS server. I ran the command, RM -RF /* and what this meant was files from the Operating System was being removed. I managed to stop the transfer when access denied error messages started appearing on the console. That’s when I realised I ran the wrong command and the etc, bin folders were missing, however, there was still the home folder where all the web files were located. Luckily I still had access to the SSH session but running commands such as FTP, RSYNC and basic commands like cp, vi were not working. After some research, the only way to resolve the issue was to either restore the missing files from backup or to reinstall the OS. Now since I am using a VPS, it was difficult to try to use a rescue disc to perform any recovery. I contact the VPS provider and they told me they don’t perform any backups – that’s when my heart sank.
After a few hours, I really hit a road block. All I wanted to do was to copy some of the files or transfer them across to another VPS. After some investigation, I realised I still had access to the user/bin folder. When I browsed through the folder, I noticed the command wget was still there. So I had the idea zip up the etc and bin folder from a working VPS and then use the wget commands on the non working VPS to download the zipped folders.
Guess what? This proved to work! I managed to ge ther server working up to a state where I could zip up the files and the database and copy them to another server. I can’t believe this worked and was just lucky the wget file was there.
Below is a summary of today’s main activities, tasks and accomplishments:
- Restored backup. Tried to clean up the VPS to save space
- Since it was the 5th day after Chinese New Year, I attended a festival and it was good to see all the young kids playing with each other
[bar group=”124″]
Rest – I was quite tired from staying up the previous night.
[bar group=”126″]
Fried rice – used left over rice from the previous day
Pasta
Vegetarian Noodle
[bar group=”125″]
Red packets – I’ve been collecting my kids red packets and today they asked me what happens with the money. I’ve been banking the money into their accounts but recently I’ve just kept a record of how much they had so I can eventually put that money into their accounts but in the meantime, I told them the money gets used to pay for their food and their daily fees – yes I’m a mean dad
[bar group=”127″]
If this article helped you in any way and you want to show your appreciation, I am more than happy to receive donations through PayPal. This will help me maintain and improve this website so I can help more people out there. Thank you for your help.
HELP OTHERS AND SHARE THIS ARTICLE
LEAVE A COMMENT
I am an entrepreneur based in Sydney Australia. I was born in Vietnam, grew up in Italy and currently residing in Australia. I started my first business venture Advertise Me from a random idea and have never looked back since. My passion is in the digital space, affiliate marketing, fitness and I launched several digital products. You will find these on the portfolio page.
I’ve decided to change from a Vegetarian to a Vegan diet and started a website called Veggie Meals.
I started this blog so I could leave a digital footprint of my random thoughts, ideas and life in general.
If any of the articles helped you in any way, please donate. Thank you for your help.
Affiliate Compensated: there are some articles with links to products or services that I may receive a commission.