original in en S. Parthasarathy (Partha)
The BASH-shell-script : "shivalik" is a convenient way to make backups of essential files and information about your Linux installation. The script is profusely documented. It does not modify (or delete) any of your files or directories. It creates a well- protected backup of some essential files and information. The entire script is available for you to browse and understand its working (you can even modify shivalik if you want).
The script makes a backup of essential configuration files (/etc) and stores some information from the /proc filesystem in a text file called proc_info.txt (e.g which kernel modules are loaded, which partitions are mounted where, how much disk space is available).
Download shivalik-2.0.gz now (check also my homepage for future updates of the script)
After downloading the script:
To execute the script:
First, make sure that you have made the script executable
(chmod 700) as desribed above (by root only)
Now you can execute (run) the above script -- just type
shivalik /usr/local/backupcfg/ .
Remember you must be "root", to execute shivalik, because many
of the files being saved need root permissions and the script
itself is executable by "root" only.
Remember, the shivalik script is not a tool for
complete backup and recovery. Ideally, the best thing to do
would be to make a verbatim copy of your entire Linux
installation along with all files and directories. This is not
always possible, necessary, or advisable. The next best thing
would be to take a backup of the most essential information and
files. The shivalik script achieves this for you. The
script creates a subdirectory below the directory which you
specify on the command line (e.g
/usr/local/backupcfg/backup-2004-04-17_2029). This
sub-directory is named after the date and time when you create
the backup.
To be absolutely prepared for any eventuality, you can copy
the entire backup-YYYY-MM-DD_HHMM on a removable medium,
as soon as the script is executed.
In the event of any problems later, you can reconstruct the damaged configuration files from /etc by copying the files you have backed up. Do not untar the backup-YYYY-MM-DD_HHMM/etc.tar.gz to /etc as this would overwrite all files. Instead go to some other directory e.g /root and untar there. Then pick file you are interessted in and compare it with what you have in /etc (diff). You can also check the modification times of the files as tar preserves timestamps and permissions. Here is an example for /etc/fstab:
cd /root tar -zxvf /usr/local/backupcfg/backup-2004-04-17_2029/etc.tar.gz Note: above line will unpack the etc tree now to the current directory. That is /root/etc diff -u /root/etc/fstab /etc/fstab
The structure of the backup-YYYY-MM-DD_HHMM directory will be as follows:
etc.tar.gz -- complete backup of /etc proc_info.txt -- selected information from /proc (modules dma interrupts mounts version partitions meminfo pci)
rpm --verify --allThis will check all install files on the disk against the information in the rpm database. If you have e.g accidently deleted a file then rpm will tell you and you can just re-install ( rpm -i --replacepkgs --replacefiles rpm-package) the package.
Remember that shivalik is just a small part of a whole lot
of things which you have to do after your installation work is
complete. The post-installation procedures are now part of
LDP's mini-HOWTOs. You can download this from the www.tldp.org
or from http://algolog.tripod.com/postlnx.htm.
It is always a good idea to be prepared for any disaster.
No disaster should become a fatal catastrophe.