LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-06-2013, 08:34 AM   #1
davemcc
LQ Newbie
 
Registered: Oct 2013
Posts: 2

Rep: Reputation: Disabled
newbie wants to backup system before playing around...


Hopefully, this is an easy question. The system is red hat enterprise server 5.5. Kernel 2.6.18-194el5PAE
thx
 
Old 10-06-2013, 08:46 AM   #2
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Linux From Scratch, Slackware64, Partedmagic
Posts: 2,252

Rep: Reputation: 559Reputation: 559Reputation: 559Reputation: 559Reputation: 559Reputation: 559
Simplest solution is boot to a live cd mount the system you want to back up mount a drive thats got enough space to back everything up cd into the root of the system you want to back up and do:
Code:
tar -cvzf /path/to/mounted/disk/for/backup/systembackup.tar.gz .
When backing up a system like ythis do it as root.

To restore just do the reverse see the tar info/man page
 
Old 10-06-2013, 09:01 AM   #3
edorig
Member
 
Registered: Apr 2013
Location: France
Distribution: Slackware; Scientific Linux
Posts: 107

Rep: Reputation: Disabled
It depends a bit on how much disk space you have to back up, whether you use RAID or not etc...
Moreover, it depends also whether you only want to backup user accounts or you want to restore
a full system in case to install of the new one goes wrong.
In the former case, you can do the following. I assume you
have a simple workstation, with a single disk not exceeding 1TB and USB 2.0 ports.
1) take an external 1TB HD and format it as ext3 (mkfs -t ext3 /dev/sdX1 )
2) mount it mount -t ext3 /dev/sdX1 /mnt
3) rsync -avz /home /mnt/home ; rsync -avz /etc /mnt/etc etc...

The important difference with the solution proposed by Keith Hedger is that in step 3 you
are only making a backup of user accounts, system configuration etc...

You could in principle back up in that manner the whole system by rsync -avz /bin /mnt/bin etc...
in order to restore it in case the install of the new OS fails, but then Keith Hedger's approach is better.
 
Old 10-06-2013, 09:17 AM   #4
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Linux From Scratch, Slackware64, Partedmagic
Posts: 2,252

Rep: Reputation: 559Reputation: 559Reputation: 559Reputation: 559Reputation: 559Reputation: 559
I agree with edorig you may only need to back up user accounts and configs if you have a full backup tool like rsync installed then by all means use that, the main advantage to using the tar approach is that it is available on just about every distro whether using live media or not and can therefore probably get you out of most bad situations, ideally though you should decide on what you are going to use for backups and then get into the habit of doing regular backups, if you don't you will eventually regret it! I know from experience!

I personally use the standard linux dump/restore apps statically linked on a rescue partition based on pmagic.
 
Old 10-06-2013, 12:56 PM   #5
davemcc
LQ Newbie
 
Registered: Oct 2013
Posts: 2

Original Poster
Rep: Reputation: Disabled
Thx for your help

Thx, I am no hurry to start this. I will most likely follow your suggestions, but I will also do a little more research as well.
 
Old 10-06-2013, 05:09 PM   #6
Stealth Bot
LQ Newbie
 
Registered: Sep 2013
Distribution: Slackware 14 | NetBSD 5.1
Posts: 11

Rep: Reputation: Disabled
I would use clonezilla and a second hard drive either internal or external. Clonezilla is a specialty type distro for cloning filesystems. If you decide on this option watch a couple of youtube videos on using clonezilla.

The best part of this method is if you mess up your system, you don't need to reinstall the operating and configure files and services over again. All you do is restore the image file clonezilla created and your system will be fully restored as before.

Good luck

Last edited by Stealth Bot; 10-06-2013 at 05:36 PM.
 
Old 10-06-2013, 05:59 PM   #7
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,258

Rep: Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947
For a one-time backup I would use a dd dump or clonezilla to create a mirror image of the drive, like Stealth Bot suggested. This makes restoration after a catastrophe simple and complete.

For regular backups, I would use a tool like rsync to just transfer over the modified/new files since the last backup and leave the rest alone, like edorig suggested. This makes backups efficient so you're not wasting time backing up the same files over and over again. Note that you can use this approach for the entire OS if you want, no need to just relegate it to a limited set of subdirectories.

It's all about using the right tool for the job.

Last edited by suicidaleggroll; 10-06-2013 at 06:04 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Phone System reload backup system addtheice Linux - Server 4 10-11-2010 12:54 PM
Newbie trying to write a simple backup script to backup a single folder Nd for school stryker759a Linux - Newbie 2 09-16-2009 09:52 AM
how to take system backup like system restore in windows piyush.ml20 Linux - Newbie 3 09-26-2008 04:57 PM
Backup system ala rdiff-backup, but without mirror and with dst encryption dr_dex Linux - Software 0 08-04-2008 04:39 AM


All times are GMT -5. The time now is 10:16 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration