Question

By mistake execute the rm command in /

Posted January 11, 2020 361 views
Ruby on RailsUbuntuMySQLDokkuLinux Commands

When I mistakenly execute the command rm in / I delete some things and now I cannot enter the console, I get an error (error file ’/boot/grub/i386-pc/boot.mod’ not found) try to fix it with tutorials but none worked and I wanted to know if they know any way to fix it since I need to log in to take a backup of my database since I can’t access it remotely

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
2 answers

Hi @zamorabryan,

It seems like you’ve deleted a really crucial part of the files. Unfortunately, the best and only way would be a backup restore. If you don’t actually have one, I’ll recommend just recreating your droplet.

I know it sounds like a drag however doing an rm on / is pretty much irreversible.

Regards,
KDSys

Hey @zamorabryan

@KDSys is right in saying the RM command is a game over moment.

I would restore from your latest backup, if it exists.

If not maybe there is a slim chance you could look at the recovery console to see if any files you wanted where left. However I would not place much hope in that.

Regards
Simon
SnapShooter - DigitalOcean backups

Submit an Answer