Author Topic: Perfect Backups With Mondo Archive  (Read 9401 times)

Offline Texstar

  • Administrator
  • Super Villain
  • *****
  • Posts: 12660
Perfect Backups With Mondo Archive
« on: July 13, 2009, 04: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: [Select]
[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: [Select]
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: [Select]
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.

Thanks to everyone who donates. You keep the servers running.
Follow me on Twitter for the latest development info.

Offline pbowyer

  • PCLinuxOS Tester
  • Full Member
  • *******
  • Posts: 175
Re: Perfect Backups With Mondo Archive
« Reply #1 on: December 29, 2009, 02: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...
« Last Edit: January 01, 2010, 03:52:54 PM by pbowyer »

Offline Archie

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8821
  • Aurum nostrum non est aurum vulgi.
Re: Perfect Backups With Mondo Archive
« Reply #2 on: February 01, 2010, 06:22:30 PM »
Thanks for this post, Tex. I'm sure I would be able to put it into good use.
Since 2006 | LiCo 401868 | Bare Metal | What is necessary is never unwise. --Sarek, 2258.42


smcs_steve

  • Guest
Re: Perfect Backups With Mondo Archive
« Reply #3 on: February 02, 2010, 04:19:13 AM »
Thanks for this post, Tex. I'm sure I would be able to put it into good use.
+1
>Steve

Offline menotu

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 15515
  • ┌∩┐(◕_◕)┌∩┐
Re: Perfect Backups With Mondo Archive
« Reply #4 on: February 02, 2010, 07:57:26 AM »
+1
PCLinuxOS 32bit KDE 4.10.4; kernel-3.4.11-pclos1.bfs & 64bit 3.4.38bfs; NVidia GeForce 8400GS 1GB 310.19 driver

Sony Vaio SVE1513A4ESI Laptop, Intel Core i5, 2.6GHz, 6GB RAM, 750GB, 15.6" Intel HD Graphics 4000

Offline catlord17

  • Hero Member
  • *****
  • Posts: 784
Re: Perfect Backups With Mondo Archive
« Reply #5 on: July 25, 2011, 11:50:00 PM »
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?

Offline djohnston

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6224
  • I don't do Windows
Re: Perfect Backups With Mondo Archive
« Reply #6 on: July 26, 2011, 01: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.
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

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 11064
  • MLUs Forever!
Re: Perfect Backups With Mondo Archive
« Reply #7 on: July 26, 2011, 03:23:47 AM »
catlord17,
                nice write up  ......  glad it was saved ...... ;)  Yes definitely mag material  :D
MLUs rule the roost!

Linux XPS 3.4.48-pclos1.bfs  64 bit
Intel Core2 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 DTT