Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am currently using my Linux box as a firewall, squid proxy server, Intranet server, mysql server and email server.
I am a little concerned that I don't have a good backup system in place. At the moment all my cgi scripts, mysql databases, html files and the etc directory are tared and copied to my Novell server every night. I use cron to execute some shell script to do this. All my Novell files are then stored on tape.
I am happy to tar the file and copy them to my Novell server but I need to know if there are any important files that need to be backed up that I might be missing. For example, if the hard drive fails will I be able to restore all the user accounts with just the files in the etc directory or do I need to backup others?
What are the most important files to backup? Will I be able to restore the system if it fails?
I will be grateful of any advice. (Sensible advice)
/etc - Contains (nearly) all config files
/home - User data
/root - Contains some system sensitive data like the backup scripts itself.
/var/named - Name daemon configfiles.
/usr/local - Contains general purpose programs not coming from any installation package (self written utilities etc.).
Besides these directories I also keep the following lists:
rpm -q -a : List of all installed packages (RPM).
fdisk -ul /dev/hda : Layout of disk partitions.
vgdisplay -v : Layout of volume groups.
A suggestion that might be helpful:
If you make a tar-file of all files to be backuped, and the tar file becomes corrupt for some reason (tape corrupt at a location containing the tar-file ?), the whole backup is useless.
On the other hand, if you copy the files in a directory and you put the directory file per file on the tape, the problem is much smaller; you might find some files that don't suffer from the corrupted area on the tape.
I use cp -d -R -p to copy the files to another location (-p preserves the file permissions).
What also could be handy -if you have the diskspace- is to keep the most recent backup somewhere on the hard-disk of the machine itself. In case something goes wrong and you don't manage to get the network up, the files are still somewhere on the system.
Suppose the all disks crash (worst case). It will take some time and possibly not 100% bullet proof, but you will manage to get a running system.
Partition new HDD as described in the output of the fdisk command.
Reinstall Linux.
Recreate the Logical Volumes.
Make sure the list of installed packages matches the list on the backup and upgrade where needed.
Put back the backup.
Reboot.
That's it.
The safest and fastest way to recover from a failure is backup the whole system. With the quality of todays computer systems, I find that a bit exaggerated. If you have your data and the install media, you can recover.
Another way to cover you from failures is to use some kind of raid system (software or hardware raid). There are many sources of documentation on the net about this.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.