詳細検索

I tried using Mondo Rescue (Part 1)

Avatar
by miyashitak
4 min read

I tried using Mondo Rescue (Part 1)
Translated from 日本語 • View original

Good morning. This is the Miyashita of infrastructure.

Recently, I've been creating images in a cloud environment, so sometimes in an on-premises environment
I will also try to get a full backup.


Table of Contents

  1. introduction
  2. environment
  3. Installing MondoRescue
  4. Full server backup
  5. reference site

1. Introduction

It was not a project to take a regular OS backup, but it was necessary to obtain a backup before the update process, so I was considering various backup tools. I have conducted some commercial validations, but this time I would like to use an open-source backup tool called "Mondo Rescue".
The biggest reasons to use open source are cost and delivery time. If it is a planned project, I think the first thing to consider is a commercial backup tool.
The biggest attraction of choosing "Mondo Rescue" is that files can be stored in the NFS mount destination and can be restored from there. It was also good that it seemed easy (actually easy) to restore from the media.

2. Environment

Location: Physical server (manufactured by Fujitsu) OS: Red Hat Enterprise Linux Server release 6.4

3. Installing MondoRescue

Add the mondorescue repository first.

[shell] vi /etc/yum.repos.d/mondorescue.repo [mondorescue] name=rhel 6 x86_64 - mondorescue Vanilla Packages baseurl=ftp://ftp.mondorescue.org//rhel/6/x86\_64 #baseurl=ftp:// 213.30.161.23//rhel/6/x86_64 enabled=0 gpgcheck=1 gpgkey=ftp://ftp.mondorescue.org//rhel/6/x86\_64/mondorescue.pubkey #gpgkey=ftp://213.30.161.23//rhel/6/x86\_64/ mondorescue.pubkey [/shell]

Now that you're ready, use the mondorescue repository to install the mondo resucue itself.
[shell] # yum install mondo --enablerepo=mondorescue =================================================================================================================================== Package Arch Version Repository Size =================================================================================================================================== Installing: mondo x86_64 3.0.4-1.rhel6 mondorescue 1.3 M Installing for dependencies: afio x86_64 2.5-1.rhel6 mondorescue 81 k buffer x86_64 1.19-4.rhel6 mondorescue 24 k mindi x86_64 2.1.7-1.rhel6 mondorescue 331 k mindi-busybox x86_64 1.18.5-3.rhel6 mondorescue 306 k syslinux x86_64 4.02-4.el6 mondorescue 855 k

Transaction Summary =================================================================================================================================== Install 6 Package(s) [/shell]

In addition to mondo, the necessary rpm will also be installed.

If you just need to make a backup, you're good to go.
This time, due to the reckless requirement to get backups during maintenance time,
We also install the high-speed compression tool "LZO" to shorten the processing time.

[shell] # rpm -ivh lzo-2.06-1.el6.rfx.x86_64.rpm # rpm -ivh lzop-1.02-0.9.rc1.el6.x86_64.rpm [/shell] Your environment is now ready.

4. Full Server Backup

Eventually, it is output and stored on an NFS server.
For now, I'll output it to my local DISK. (Focus on speed)

[shell] # /usr/sbin/mondoarchive -Oi -L -s 4700m -d /backup -E /backup -S /tmp -T /tmp -p `hostname`_`date +%Y%m%d` [/shell]

Each option is

-O… Perform a backup
 -i… Output as ISO image
 -L… Compress with lzo, not bzip2
 -s… Maximum ISO size (4700m is for DVDs)
 -d… ISO output destination
 -E… Excluded paths from backup
   *If you want to exclude multiple paths, write something like "-E '/backup|/backup2'".  -S… Temporary directory path
 -T… TMP directory path
 -p… Name ISO files

The /backup area is originally an area where there is nothing, so I decided to output data to it as not subject to backup. When you run this, the following message will be output and the backup will proceed.

[shell] Initializing... See /var/log/mondoarchive.log for details of backup run. Checking sanity of your Linux distribution Done. BusyBox's sources are available from http://www.busybox.net Making catalog of files to be backed up ---evalcall---1--- Making catalog of / ---evalcall---2--- TASK: [** ..................] 6% done; 0:15 to go ---evalcall---E--- ---evalcall---1--- Making catalog of / ---evalcall---2--- TASK: [***.................] 15% done; 0:11 to go ---evalcall---E--- omitted) ---evalcall---1--- Running mkisofs to make ISO #1 ---evalcall---2--- TASK: [******.... ] 90% done; 0:00 to go ---evalcall---E--- Call to mkisofs to make ISO (ISO #1) ... OK Done. Done. Backup and/or verify ran to completion. Everything appears to be fine. /var/cache/mindi/mondorescue.iso, a boot/utility CD, is available if you want it Data archived OK. Mondoarchive ran OK. See /var/log/mondoarchive.log for details of backup run. Execution run ended; result=0 Type 'less /var/log/mondoarchive.log' to see the output log [/shell]

Wait a little and the ISO file will be created in the path you specified.

By the way, as for the comparison of the processing results of bzip2 and lzo,

The time was reduced to about one-quarter. However, the file size has become about 1.5 times larger.
If lzo can fit in 4.7GB, it is definitely better to choose lzo.
I will talk about restoration next time.

5. Reference site

Official websiteHow to use Mondo RescueEasy backup with Mondo RescueCreate a system image using Mondo Rescue

Related Articles