PCLinuxOS-Forums
News: ...FLASH!!! ...New PCLinuxOS Testing board now open. Register today! Be an active contributor to the PCLinuxOS future! ... Read all about it now, on THIS forum!!!..
 
*
Welcome, Guest. Please login or register. May 25, 2012, 09:11:19 PM


Login with username, password and session length


Pages: [1]   Go Down
  Print  
Author Topic: Perfect Backups With Mondo Archive  (Read 6205 times)
Texstar
Administrator
Super Villain
*****
Offline Offline

Posts: 11805



« on: July 13, 2009, 05:57:55 AM »

catlord17

If you want to do a backup in Linux, there are many tools for the job.  But if you want the ability to recover from a disaster, as well as back up, only a handful are left.  Of those, less than half are able to replace the functionality of Ghost or Acronis TrueImage in a Linux environment, and of those, only one or two (that I know of) can do this without either being ridiculously confusing or requiring a network or backup server.

The winner for me (and my mission critical business computers) is Mondo Archive.  With Mondo Archive, you can do all sorts of nifty things, such as back up your windows/linux dual boot and automatically restore them to a completely different computer, restoring to a different disk setup or file system, and more. Here is a simple guide to using it.

Step 1: Install Mondo from Synaptic by first starting Synaptic, entering your root password, and then doing a search for the word "mondo" (without the quotes).  Select it for installation.  Several dependencies will be added. 

Step 2: After you have installed them all, determine whether you will be using hard disk, CD, DVD or something else to back up to.  Mondo supports CD-Rs, CD-RWs, DVDs, creating .ISO images on your hard disk, tape drives, CD Streamers and NFS mounts for backing up to.  If you have the disk space to spare, and you plan to make CDs or DVDs, I suggest creating .ISO files on your hard disk and then later burning them to whatever media you have chosen later, although Mondo can do direct to device burning, too.  I do it this way to make sure the run ends successfully before I overwrite my DVD-RW backup set.  The alternative is to have multiple backup sets if you use RW media.  Right now, that's not feasible for me.  If you do store your images on the hard drive, you will want to have a specific directory set up to hold them.  I use /home/myhomedir/backup.  You would replace myhomedir with your login name, of course.

Step 3a: Decide how you want to run Mondo.  I used to run it in its GUI mode.  Note that this is a CLI based GUI.  You can do this by invoking the program from a terminal you are logged into as root, like so:

Code:
[root@localhost backup]# mondoarchive

Mondo will then automatically detect as much information as possible, and will walk you through the rest.  When it asks you whether your kernel is sane, for PCLinuxOS, the answer is YES.  (Of course it is!)

Step 3b: If you need greater control than you can get from the GUI, as I do, you will need to use the CLI and type in a rather long command.  Here is the command I use to create full system backups, which I will dissect for you afterwards:

Code:
mondoarchive -O -V -i -s 4480m -d /home/shannon/backup -I / -E /home/shannon/backup -T /home/shannon/backup -x /dev/sda1 -x /dev/sda2 -9 -f /dev/sda -l GRUB

Dissection:

-O tells Mondo to do a backup.
-V tells Mondo to verify the results.  This won't work on a laptop unless you save the images to hard disk.
-i tells Mondo that I am backing up to the hard drive, using .iso images.
-s specifies the size of the images in megabytes (m).  4480 is recommended for DVD images on single layer media.
-d is the destination for the image files.
-I is what to back up or include. Specifying / will back up the whole system, minus the obvious exclusions.
-E is what you don't want backed up. You can repeat this with as many specific directories as necessary.
-T is where to set the temp directory.  You don't really need to specify this usually.
-x is telling Mondo that the device that follows should be backed up as a Windows NTFS partition, using NTFSclone.  You can specify as many such partitions as you need to, or leave it out if you have no Windows partitions to back up.
-9 is telling Mondo to use maximum compression.
-f is the device that the system boots from.  Usually this is auto detected, but if Mondo can't understand your boot sector, you might need to specify this.
-l is the boot loader you want to use.  Again, usually auto-detected, but in case...

man mondoarchive will give you a lot more options.

Restoring with Mondo

You can restore from a live system to restore things that you want, or you can restore from the bootable first disc.  Your restore options, from the bootable first disc, are NUKE, INTERACTIVE, COMPARE and EXPERT. 

NUKE is for a fully automated restore in which the hard drive(s) are completely erased, re-partitioned, reformatted and then everything is restored to the exact same state it was backed up from.

INTERACTIVE allows you to specify what you want done, or let Mondo do the default.  If you change from /dev/hdx to /dev/sdx for instance, new drive bus type, you would need to specify the changes manually by editing the mount list to reflect this change.  Mondo makes this easy.  You can also change the filesystem format, size of the partitions, and so forth if you like.  (Remember that your backed up FSTAB will have to be changed to reflect these changes also if you change the filesystem of the boot partition.) Interactive allows you to restore all, some or none of your backed up files, and choose which files and where to restore to.

COMPARE does not restore anything, but it compares your backed up files against the system that it is an image of.  You can verify the viability of your backup set this way, and also discover which files have changed since backup.

EXPERT allows you to do whatever you like before you manually invoke the restore sequence.

Mondo can also be used for incremental backups.  This is the command I use to do that:

Code:
mondoarchive -Oi -d /home/shannon/backup -s 4480m -9 -D -E "/home/shannon/backup"

-O is "make a backup".
-i sends the backup to an .iso on the hard disk.
-d is where to back up to.
-s is the size of the images. 
-9 is the compression level (maximum).
-D tells it to make a differential backup. 
-E is what to exclude from backup.

To restore differential backups, you simply restore the main backup, and then sequentially layer the differentials on top of it, replacing the files with newer versions as you go.

Mondo Archive has saved my business multiple times where even the likes of Ghost and Acronis True Image have failed me.  (What good is a backup that cannot be restored because of an error in making the backup that the program ignored, but which stops the restore process?)  Mondo Rescue is the ONLY program I have found that is able to back up every popular linux file system, as well as Windows 9x and higher (FAT and NTFS), and be both accurate and fault tolerant.  Mondo is, in my experience, AMAZING, and has literally saved me tens of thousands of dollars.  It is used by NASA, JPL, numerous Fortune 500 companies and thousands of other users, and as far as I can see, it is the best backup solution out there.

Any questions, I'll be glad to try to help with.
Logged

Follow the development of PCLinuxOS on Twitter
Help fund the PCLinuxOS project!

"I'm not so good on advice, can I interest you in a sarcastic reply?"
pbowyer
PCLinuxOS Tester
Full Member
*******
Offline Offline

Posts: 125


« Reply #1 on: December 29, 2009, 04:40:09 PM »

Texstar:

I stumbled across this post while I was looking for a way to move my PCLinuxOS.2009.1 system to another hard drive without losing existing settings and applications.

I thought about remastering, but the Mondo backup without /home included requires two DVDs and I understand remastering only allows one disk.

 I've been able to use Mondo to make the backup of the entire system by following your instructions, but the steps to relocate it, and have it boot properly once it's relocated, aren't clear to me. I suspect there may need to be changes in /boot/grub, but I'm uncertain exactly what they might be. Also, the new hard drive partitions will be in a different order than the original hard drive. I think I can manage them by changing fstab in the expert mode of Mondo, but I'm uncertain.

The reason I'm asking for assistance is that it takes over two hours to make the backup. I imagine it will take something close to that long to do the restore and I don't know how many trials I might have to make before I get a proper restore. Also, I don't want to ruin my running system by making a mistake in the process of experimenting.

 Would you, or some knowledgeable Mondo user please explain the steps required to relocate the backed-up system properly?

LATER:
I asked for assistance here also:
http://www.pclinuxos.com/forum/index.php/topic,46540.msg544839.html#msg544839
and then I finally took the plunge and tried it myself. I discovered, after much fiddling, how to get it done, I think...
Logged
Archie
Global Moderator
Hero Member
*****
Offline Offline

Posts: 6869


I will never forget you, uhhh...


« Reply #2 on: February 01, 2010, 08:22:30 PM »

Thanks for this post, Tex. I'm sure I would be able to put it into good use.
Logged

smcs_steve
Guest
« Reply #3 on: February 02, 2010, 06:19:13 AM »

Thanks for this post, Tex. I'm sure I would be able to put it into good use.
+1
>Steve
Logged
menotu
PCLinuxOS Tester
Super Villain
*******
Offline Offline

Posts: 11977

┌∩┐(◕_◕)┌∩┐


« Reply #4 on: February 02, 2010, 09:57:26 AM »

+1
Logged

If you can keep you head while all around you are losing theirs, then you have misunderstood the situation.

PCLinuxOS 32bit & 64bit; 3.2.17bfs kernel, KDE 4.8.3; nvidia 295.53, Athlon 64 X2 4200+; 4GB Ram; NVidia GeForce 8400GS 1GB; x.org 1.10.4 ; 500GB/320GB
catlord17
Hero Member
*****
Offline Offline

Posts: 770


« Reply #5 on: July 26, 2011, 12:50:00 AM »

Thanks for saving my original post on MondoArchive, Tex.  I haven't used it in a while, so my own post is going to be teaching me how to use it again!  How amusing. Maybe this should be in the magazine?
Logged

djohnston
PCLinuxOS Tester
Hero Member
*******
Offline Offline

Posts: 5699


I don't do Windows


« Reply #6 on: July 26, 2011, 02:29:17 AM »

Thanks for saving my original post on MondoArchive, Tex.  I haven't used it in a while, so my own post is going to be teaching me how to use it again!  How amusing. Maybe this should be in the magazine?

parnote had talked about doing an article (or two) on Mondo Rescue. I think this fits the bill. Lemme check with him.
Logged

Bare metal                           VBox
AMD Athlon 7750 Dual-Core    Single core
4GiB RAM                              1GiB RAM
nVidia GeForce FX 5200          64MB video
LXDE 32bit                            KDE 64bit

Registered Linux User #416378
Just18
PCLinuxOS Tester
Hero Member
*******
Offline Offline

Posts: 4621


MLUs Forever!


« Reply #7 on: July 26, 2011, 04:23:47 AM »

catlord17,
                nice write up  ......  glad it was saved ...... Wink  Yes definitely mag material  Cheesy
Logged

MLUs rule the roost!

Linux XPS 3.2.17-pclos1.pae.bfs  32 bit
Intel(R) Core(TM)2 Quad  CPU   Q9450  @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech ‎DVB-T 2 USB DTT
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM