LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   How to backup system (https://www.linuxquestions.org/questions/linux-software-2/how-to-backup-system-303189/)

seangg 03-18-2005 10:25 AM

How to backup system
 
I use red-hat 9.0 and I know little about Linux

I don't know how to backup my system, for it's likely for me to damage it.

I've heard from some friends that I should use "tar", bu I don't know the exact steps.


Thanks for reply!

alienDog 03-22-2005 03:55 PM

Alan Keates described a somewhat clever solution to this in LinuxGazette if you have a cdrw drive (and plan to use it for backup), see:

http://www.linuxgazette.com/node/view/612

SirGertrude 03-22-2005 07:00 PM

Here is how I do it:

First make a directory called backup in the root directory
Code:

mkdir /backup
Then create a compressed tarball of all relevant files/folders in the root directory

Code:

tar --exclude=/backup/* --exclude=/dev/* --exclude=/mnt/* --exclude=/proc/* --exclude=/sys/* --exclude=/tmp/* -cvzf /backup/backup.tar.gz /
This will create the file "backup.tar.gz" in the /backup folder without unnecessary files contained in the /dev, /proc, /sys, and /tmp folders.

This is a very simple yet effective way to create a backup of your system.

av.dubey 06-15-2008 07:52 AM

i also had the same doubt..and i did as told by you..have successfully made backup.tar.gz file in backup folder..

now wat to do next..suppose i want to restore my system to an earlier date ..like the date when i made this tar.gz file...

wat are the steps / commands to do so...

chrism01 06-15-2008 08:25 PM

First of all, copy that file to a an external store eg CD/DVD/gmail.
If you have disk probs you'll lose it. Also, you'd want to do backups regularly, so add some sort of date to the filename eg

backup_yyyymmdd.tgz

To extract a gzipped tar, you can use

tar zxvf <yourfilename>

man tar
man gzip

av.dubey 06-16-2008 11:56 AM

well this is the command wat we use to extract and install some software in linux...
if i use this tar command to extract the file..will the replace existing file with the original ones ...that is the files whose backup i have taken in tar.gz file..????????


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