Between the Lines

Larry Dignan, Andrew Nusca and Rachel King

Geek Sheet: Bare-metal backup and recovery

By | May 7, 2008, 10:40am PDT

Summary: Tired of the same old punditry and OS wars? Want to read something practical you can actually use and apply to your real job? Or perhaps you need some light reading material to help you get some sleep on the plane between consulting engagements – either way, welcome to the first in what I hope [...]

Geek Sheet Logo (Courtesy Brandon Perlow)Tired of the same old punditry and OS wars? Want to read something practical you can actually use and apply to your real job? Or perhaps you need some light reading material to help you get some sleep on the plane between consulting engagements – either way, welcome to the first in what I hope will be a series of technical HOWTO articles, entitled “Geek Sheets”.

One of my favorite Linux tools and live CD distributions is the System Rescue CD. It allows you to boot up on any x86-based, PowerPC and SPARC-based machine and perform any number of backup and recovery tasks on Linux, Mac, Solaris and Windows-based systems. The System Rescue CD can even be booted on completely diskless systems on a USB stick or PXE-booted over the network. In another publication, I went into depth on how to use some of System Rescue CD’s basic functions and how to bare-metal image a typical desktop and server Linux or Windows configuration.

However, that article was aimed at an end-user or utility computing scenario using fixed file system configurations using local storage and not on an enterprise server machine. For storage flexibility, many Linux server systems today now use LVM, or Logical Volume Manager, rather than use fixed file system partitioning that desktop distributions such as Ubuntu typically use. This adds a layer of abstraction on top of the bare metal partition layout and introduces some complexity as to how these systems can be imaged.

Logical Volume Manager Layout

As a best practice, enterprises should look to do SAN-based replication and disaster recovery for a system imaging and snapshot solution. However, we all know that it isn’t always cost effective or practical to have a boot from SAN or SAN-replicated server infrastructure, and it may sometimes be desirable – such as during a data center move – to have a bare-metal “snapshot” backup of an entire system on a network file store or a portable storage device where everything can be quickly restored as it was without having to do some sort of complicated rebuild. I recently had to perform this for an engagement I was working on and it dawned on me that this procedure, while probably very useful, was not documented anywhere in one place.

The good news is that it can still all be done with standard Linux tools, System Rescue CD and without any expensive proprietary software. The bad news is that nobody has automated the process. I’m hoping that some enterprising college or high school kid looking for a summer project will take the information I am posting here and create a utility or script for inclusion in the next System Rescue CD build. Can you say “Google Summer of Code?

I would like to give special thanks to Durham, NC-based Linux sysadmin Mike Brennan for helping me to develop this procedure.

Next: Storing System Images and creating the NFS mount –>

Topics

Disclosure

Jason Perlow

http://blogs.zdnet.com/BTL/?page_id=8181

Biography

Jason Perlow

Jason Perlow is a technologist with over two decades of experience with integrating large heterogeneous multi-vendor computing environments in Fortune 500 companies. A long-time computer enthusiast starting the age of 13 with his first Apple ][ personal computer, he began his freelance writing career starting at ZD Sm@rt Reseller in 1996 and has since authored numerous guest columns for ZDNet Enterprise and Ziff-Davis Internet. Jason is currently Senior Technology Editor for Linux Magazine, where he has been writing about Open Source issues since 1999.

In his spare time, Jason is an avid amateur chef and food writer, where his work reviewing New Jersey restaurants has appeared in The New York Times. He is also the founder of the popular food web site eGullet and blogs about restaurants and cooking at OffTheBroiler.com.

Related Discussions on TechRepublic

Did you know you can take part in these discussions with your ZDNet membership?
21
Comments

Join the conversation!

Just In

Bare Metal Online Backup?
2012WillGO2012 3rd Mar
Does anyone know of a Bare Metal backup solution?
Crash Plant, etc. does not offer this. Can't find an online version.
Thanks.
0 Votes
+ -
rsync? Anyone? Bueler?
D T Schmitz 7th May 2008
rsync -auvPz //* /path to destination backup/
0 Votes
+ -
Contributr
rsync is for directories
jperlow 7th May 2008
not for system images.
0 Votes
+ -
Good Lord. Yes.
D T Schmitz 7th May 2008
Like dd or dd_rescue. Gotcha.
How does it deal with bad sectors Jason?

I keep bootable Knoppix on a pen-drive hanging around my neck for drive recoveries. dd_rescue is great for doing backups even over ssh to network drives.
0 Votes
+ -
Contributr
comparison with dd
jperlow 7th May 2008
obviously dd is the lowest level you can get, it simply duplicates a block device, and it is the most foolproof and simple method to cloning a disk since it it all done with a single command. However the disadvantage is on large filesystems you are in effect dumping the entire block device including the zero bits, so you then have to go an gzip or bzip that image for effective storage on your image dump directory. On a 500GB RAID set thats a lot of bits to send across the LAN.With partimage, it only saves the used bits and depending on the speed of your network and the speed of your processor you can set the compression level.
0 Votes
+ -
I also think rsync is a better solution. When hardware fails you are unlikely to be able to get exact replacements (unless you've squirreled away spares).

I think rsync's directory oriented back up is better than parimage's partition oriented backup when the restore target has changed.

I can edit /etc/fstab /boot/grub etc. to account for different hardware in the rsync backup prior to the restore.

--wally.
0 Votes
+ -
Contributr
You can conmbine rsync with system imaging and things like database exports. The point is you want to have the path of least pain to restoring a system as it was. Image, rsync critical user and data directories, export your db's to flat files. Then if your box fails, you restore the image, restore the deltas from an rsync, and then import your databases to your most current version or from incrementals if required.
0 Votes
+ -
Do what Texstar did with PCLinuxOS
johnf76@... 8th May 2008
MKLiveCD to remaster the OS/iso to a Live CD that can be easily automated to install just the way you like it:

http://www.linux.com/articles/44293
0 Votes
+ -
Hmmm
Spiritusindomit@... 8th May 2008
Yet, this is more punditry.
0 Votes
+ -
I will never need to do a bare metal restore since production servers are virtualized, and the host system can be brought up from scratch very quickly. The vm's are on the san, mirrored to another san.

Have you ever tried BartPE as a rescue disk?
0 Votes
+ -
I prefer Acronis True Image 11 to a "roll your own" solution.

I think that backups like editors are very much a case of "how comfortable are we with the interface"?

Acronis will do both Linus and Windows type of partition backups.
heck, its called Geek Sheet but I do not see a way to print out all 4 pages as one article ???
0 Votes
+ -
Agreed ... Print functionality is deficient
David A. Pimentel 8th May 2008
The print button on each displayed page only prints the article content displayed. It should just dump the entire article to the print device.
0 Votes
+ -
Or make available as PDF download?
seanferd 8th May 2008
Especially for good "How To..." articles. You know, like TechRepublic.
0 Votes
+ -
Print function only works for the page selected, so I had to
make 4 PDF files. Luckly, with Mac OS X pdf application, I
was able to bundle all 4 in 1.

I only don`t know if I can share them.
0 Votes
+ -
created a single html page
chips@... 8th May 2008
I use SeaMonkey, and editing the pages so that all the text and none of the ads, etc are collated wasn't that hard. Took about 3 minutes to do.

BUT it is shameful that there is no 'Print Whole Article' button.
0 Votes
+ -
Download PDF of Article Here:
blc1839 9th May 2008
I put the article together in a PDF file and it is available for download here: http://cid-f1d12a0e1e2ad2b4.skydrive.live.com/self.aspx/OpenShare/GeekSheetBareMetalBkup.pdf

I'll leave it posted for two or three weeks unless Jason or ZDNET requests me to take it down for some reason.
0 Votes
+ -
RE: Geek Sheet: Bare-metal backup and recovery
vhinzsanchez@... 11th May 2008
Thanks for uploading a pdf. grin
0 Votes
+ -
Ubuntu's default install uses LVM
angrykeyboarder 19th May 2008
Get your facts straight.
0 Votes
+ -
Mondo Rescue vs System Restore CD?
mariano.lopez@... Updated - 8th Oct 2008
Has anyone used Mondo Rescue to do a baremetal recovery? Pros and Cons between Mondo and System Recue CD?
0 Votes
+ -
RE: Geek Sheet: Bare-metal backup and recovery
tomlin21-24319035676893835085146735905770 11th Oct
without a doubt extremely ought to say you make countless exceptional components and most most certainly will document a handful of decisions to include nfl jersey in shortly on on a daily basis or two.
0 Votes
+ -
Bare Metal Online Backup?
2012WillGO2012 3rd Mar
Does anyone know of a Bare Metal backup solution?
Crash Plant, etc. does not offer this. Can't find an online version.
Thanks.

Join the conversation!

Formatting +
BB Codes - Note: HTML is not supported in forums
  • [b] Bold [/b]
  • [i] Italic [/i]
  • [u] Underline [/u]
  • [s] Strikethrough [/s]
  • [q] "Quote" [/q]
  • [ol][*] 1. Ordered List [/ol]
  • [ul][*] · Unordered List [/ul]
  • [pre] Preformat [/pre]
  • [quote] "Blockquote" [/quote]
ie8 fix

The best of ZDNet, delivered

ZDNet Newsletters

Get the best of ZDNet delivered straight to your inbox

Facebook Activity

White Papers, Webcasts, & Resources
ie8 fix