One Unified Global Perspective
Communications with a Global Perspective
Home
Intro
Contact Us
Voice over IP
PBX Solutions
Services
Support
Glossary
Open Source
Blog
Forum

WebMail





2006 Nov 15 - Wed

Backups With Mondo and LVM

Mondo Rescue is an excellent backup for Linux based boxes. With Debian, it is a one line install:

apt-get install mondo

As the existing partitions on the machine I needed to backup did not have enough space for the backup archive, I used LVM to create another partition out of spare drive space, created a jounalled ext3 filesystem, mounted in a directory I created for Mondo backups, and then started the archive program.

mkdir /var/backups/mondo/src
mkdir /var/backups/mondo/dst

lvcreate --size 20G --name lvBackup vg01
mke2fs -v -j /dev/vg01/lvBackup
mount /dev/mapper/vg01-lvBackup /var/backups/mondo/dst
mondoarchive
As this is a quick and dirty backup, just to get things backed up, in the archive program I selected '/' as the root of the backup, and excluded /var/backups/mondo so that backup related stuff isn't re-archived.

As part of the backup process, an image of /root/images/mindi/mondorescue.iso should be made to a CD. This will be used in the initial part of the restore process.

One more trick having to do with the LVM (Logical File Manager) has to do with snapshots. Since databases are typically being updated during the backup, the backup process will have obtained files in an inconsistent state. Use LVM to make a snapshot, use Mondo to backup the snapshot, and then use LVM to delete the snapshot.

lvcreate --size 500M --name lvBackupSource --snapshot /dev/vg01/lvVar
mount /dev/mapper/vg01-lvBackupSource /var/backups/mondo/src
mondoarchive
umount /var/backups/mondo/src
lvremove /dev/vg01/lvBackupSource

For the size parameter in the lvcreate command, use a size that will readily accomodate any changes made to the primary partition during the backup phase.



Blog Content ©2008
Ray Burkholder
All Rights Reserved
ray@oneunified.net
(441) 505 7293
Available for Contract Work
Resume

RSS: Click to see the XML version of this web page.

View Ray 
Burkholder's profile on LinkedIn
technorati
Add to Technorati Favorites



November
Su Mo Tu We Th Fr Sa
     
15
   


Main Links:
Monitoring Server
SSH Tools
QuantDeveloper Code

Special Links:
Frink

Blog Links:
Sergey Solyanik
Marc Andreessen
HotGigs
Micro Persuasion
... Reasonable ...
Chris Donnan
BeyondVC
lifehacker
Trader Mike
Ticker Sense
HeadRush
TraderFeed
Stock Bandit
The Daily WTF
Guy Kawaski
J. Brant Arseneau
Steve Pavlina
Matt Cutts
Kevin Scaldeferri
Joel On Software
Quant Recruiter
Blosxom User Group
Wesner Moise
Julian Dunn
Steve Yegge

2006
Months
Nov




Mason HQ

Disclaimer: This site may include market analysis. All ideas, opinions, and/or forecasts, expressed or implied herein, are for informational purposes only and should not be construed as a recommendation to invest, trade, and/or speculate in the markets. Any investments, trades, and/or speculations made in light of the ideas, opinions, and/or forecasts, expressed or implied herein, are committed at your own risk, financial or otherwise.