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 using linux7.2
My question is about backup. What to back, how to back and when to back up.
I have two hard disk.
Primary HDD is linux 10GB
Secondary HDD is FAT32 40GB.
How do I take backup of linux on other hard disk. So that after reinstalling the linux. I can restore the backup and all the settings including all the users and settings as it is now.
What folders should to be backup. Is there any script that can take backup everytime I run.
Can I restore the backup if I upgrade from 7.2 to 8.0.
Thanks.
I always grab these folders (in redhat):
/etc
/var/log
/var/spool
/usr/local
/home
/var/lib/mysql
that should cover most things
as far as upgrading, what do you mean? The backup from 7.2 will be 7.2 specific. As soon as you upgrade to 8.0, perform a backup and that problem is solved. the configuration is pretty much the same but newer packages may have added removed options from the configs.
depends on what files. The upgrade process from 8 to 9 is pretty painless and I recommend it. You _should_ be able to restore the /etc directory without problems, that will give you your usernames and passwords, and any service configs, like apache, sendmail, etc...
I exclude some folders, I usually ftp a copy of the backup to another system. If needed any or all of the backup can be extracted to the system restoring files.
If you need to do a complete recovery on a new drive for instance, your boot loader may need to be installed after the recovery, the best way to do it would be a root/boot floppy that will have access to the backups, via cdroms, networking, whatever media you choose, and the tools needed to restore the system.
You would create the excluded folders after restore.
I have not had to restore the system yet, but I can't see why this would not work. It might be a good idea to test it at some point. I just don't want to bring down the system to try it.
I do not really backup the partition info, just the files. I feel that with this system the disks are obsolete anyway, I can restore if needed with a new partitioning scheme that suits the disks I use at the time of restore.
Adding this to the backup script ahead of the tar command should do it if you want..
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.