Unfortunately, I have used rm -rf *
command in EC2 RHEL7.2 Instance. So the core dependency, utility files got deleted.
Is there any steps to recover those files ? or How to rollback the server as running ?
I followed few steps to resolve but that is not helpful,
I have attached another server root device volume(/dev/sda1) to failure server root volume and openssh got succeeded.
Then, I copied all those files from /
source location to failure server volume(device) location and re-attached in failure server. Now the openssh server is not working, My guess I have copied all the files with their permissions. Is there any steps needs to be done ?
Snapshot or otherwise backup the broken instance. Launch a new instance on a clean OS image. Deploy applications and restore from backup. Supplement the backup by attaching the broken instance and copying from it.
Repairing without rebuilding is much more difficult and delicate. If you removed binaries in used in package scripts, other packages may not install correctly, and you have a mess you have to fix one package at a time. If you really want to pursue this, provide where your pwd was at the time of the rm, and what software you have to reinstall.
I think you made mistake that you have copied each and everything is located at
/
partition. You just need to put required folders only like sys,bin,sbin etc.Hope it will work for you.