LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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


Reply
  Search this Thread
Old 05-07-2003, 03:45 PM   #1
jolly
Member
 
Registered: Mar 2001
Posts: 63

Rep: Reputation: 15
Angry what to backup and how to backup?


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.
 
Old 05-07-2003, 03:51 PM   #2
td3201
Member
 
Registered: Jan 2002
Location: Omaha, NE US
Distribution: Red Hat/CentOS
Posts: 226

Rep: Reputation: 30
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.
 
Old 05-07-2003, 03:58 PM   #3
jolly
Member
 
Registered: Mar 2001
Posts: 63

Original Poster
Rep: Reputation: 15
Not upgrading actually. If I install fresh linux8.0 then can I restore these folders. Will it keep intact the users and there settings.
 
Old 05-07-2003, 04:02 PM   #4
fancypiper
LQ Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 60
Have you found the Linux Documentation Project yet?

See the Linux Complete Backup and Recovery HOWTO.
 
Old 05-07-2003, 04:04 PM   #5
fancypiper
LQ Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 60
An upgrade should keep your settings. If not, you have the backup to play with.
 
Old 05-07-2003, 04:05 PM   #6
td3201
Member
 
Registered: Jan 2002
Location: Omaha, NE US
Distribution: Red Hat/CentOS
Posts: 226

Rep: Reputation: 30
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...
 
Old 05-07-2003, 09:31 PM   #7
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
I backup my entire system using tar

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.

There are many ways to do it.

here is what I use for a complete backup..


#!/bin/sh
cd /
NAME=`date +%m-%d-%y`
tar -cv . --exclude ./mnt --exclude ./proc --exclude ./var/spool/squid --exclude ./tmp --exclude ./var/tmp | gzip -9 > /mnt/backup/sys1_backup_$NAME.tar.gz


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..

fdisk -l > /partinfo
 
Old 05-07-2003, 11:21 PM   #8
nakkaya
LQ Guru
 
Registered: Jan 2003
Location: Turkey&USA
Distribution: Emacs and linux is its device driver(Slackware,redhat)
Posts: 1,398

Rep: Reputation: 45
i just backup my /home folder regularly using tar.
 
Old 05-08-2003, 02:43 AM   #9
jolly
Member
 
Registered: Mar 2001
Posts: 63

Original Poster
Rep: Reputation: 15
Thanks everyon for help.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
backup help sridhar11 Debian 1 08-30-2005 10:40 AM
backup LuckyABA Linux - Software 1 01-22-2005 12:51 PM
can I backup a root disk and boot from the new backup disk linuxbkp Linux - Enterprise 3 10-15-2004 06:42 PM
Selective backup to CDRW, or other backup methods. trekk Linux - Software 1 11-03-2003 02:46 PM
backup and update the backup file doris Linux - General 4 08-24-2002 07:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:36 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration