LinuxQuestions.org
Help answer threads with 0 replies.
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 02-15-2007, 08:38 AM   #1
baddah
Member
 
Registered: Feb 2006
Location: Cape Town,South Africa
Distribution: Fedora Core 8
Posts: 188

Rep: Reputation: 30
Backup Remote HardDrive and Restore


Hi all,

What is the best way to make an image of a remote server(on a cron monthly basis for instance) and keep the image on an external drive for easy restoration?

i'd like to have a cron making the image every month,to a second harddrive,maybe copy the image over the network to a backup server.And if the drive server crashes,restore the image in the quickest possible manner.I would prefer it if i dont need to worry about filesystems,partition tables,even not formatting if possible etc.

In other words,stick a new harddrive in the server,or a new server.Boot from a live cd with network support and restore the image.

Also i know the command

Code:
dd if=/dev/hda | gzip --fast > hda.img.gz
makes a complete image of the drive.does this mean if the drive is 40GB but only 5GB used(35GB free) it needs 40GB space or 5GB space?

To Restore the image

Code:
gzcat -dc hda.img.gz | dd of=/dev/hdb
Does hdb need to be formatted in this case or not?

Any other suggestions?thanks for any help?
 
Old 02-15-2007, 08:49 AM   #2
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
The problem here is that you are going to be attempting to image a drive which is currently in use. Files are changing constantly while the system is running. Making an image of it in that state is either going to outright fail, or it is going to be unusable when you try and restore it.
 
Old 02-15-2007, 09:00 AM   #3
baddah
Member
 
Registered: Feb 2006
Location: Cape Town,South Africa
Distribution: Fedora Core 8
Posts: 188

Original Poster
Rep: Reputation: 30
ok,so the only thing i can really do is sent someone their each month,and let him do the make the image from a live cd?

Is their no way to do it remotely?

Also will the above procedure work in that case?

Thanks for the reply
 
Old 02-15-2007, 10:02 AM   #4
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
You could make an image from a live CD, or just use something like G4U/G4L (Ghost for Unix/Ghost for Linux), which will make full disk images and save them onto an FTP server.

You could make full backups of the actual file system remotely, but even then the drive should be mounted read-only during the backup to prevent any files from being changed.

With a little creative partitioning, you should be able to remount / read-only during operation. You would need to move everything that plays host to changing files (for example, /var) to a different partition, and just have the core system on it's own partition. You should then be able to remount it read-only, make the filesystem copy (a compressed tar, for example) and then send that off to a server before mounting it read-write again.

I imagine there are already scripts available to do just that, but I don't know of any off hand.
 
Old 02-15-2007, 10:23 AM   #5
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Sounds to me like you'd be planning for a Bare Metal Recovery.. Try searching the topic on google which results in many articles and howto's in setting up the best scenario for yourself.
 
  


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
cannot restore backup jon23d Linux - General 2 11-02-2006 05:24 PM
restore backup nkeever Linux - Newbie 2 06-19-2006 09:03 AM
Tried to create a partition on my harddrive and boots with a system restore BWhere Linux - Newbie 1 01-23-2006 12:44 AM
Backup and restore? tradewind Red Hat 2 07-02-2004 10:18 PM
RH 7.3 Backup and Restore MrJoshua Linux - General 1 06-18-2003 11:39 AM

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

All times are GMT -5. The time now is 10:27 PM.

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