Performing a full system restore after a Linux server re-kick

Sometimes, a server becomes so corrupt that you need to re-install the operating system and perform a full system restore of the server from backups. After the OS re-install, but before you perform the restore, you need to create a backup of the files that are responsible for booting the server, defining the partition and file system layout, and naming the hardware. Once the full system restore has been completed, you should restore those files.

Here are the files that you should backup before performing the restore.

  • /boot
  • /etc/fstab
  • /etc/grub.conf
  • /etc/mtab
  • /etc/udev
  • /etc/modprobe.conf
  • /etc/modprobe.d

Here is a script that will help you out backup the needed files

Here is a script that will help you restore the needed files

After it’s all complete, you just need to reboot the server. Just watch the console to ensure that everything boots correctly.

Share on FacebookTweet about this on TwitterShare on LinkedInShare on RedditEmail this to someone

May 24, 2013

Posted In: Backup and Recovery, Bash Tips, Linux

Bash Shell Enumerator – Command Not Found

Make this script run when ever a user logs into their system and watch them freak out as it tells them that all their commands aren’t found. :)

 

Share on FacebookTweet about this on TwitterShare on LinkedInShare on RedditEmail this to someone

February 22, 2013

Posted In: Bash Tips, Pranks