Manpage of mondoarchive
Section: Maintenance Commands (8)
Return to Main Contents
mondoarchive - a backup / disaster-recovery tool.
] : backup your PC
] : verify your backup
backs up a subset of your files, your entire filesystem, or even images of
non-Linux filesystems to CD's, tape, ISO images or an NFS mount. In the event of
catastrophic data loss, you will be able to restore everything, taking a PC from
bare metal to its original state if necessary.
it backs up your filesystem to CD, tape, ISO images or NFS share. Boot media
or a special boot CD will be created to allow you to restore from bare metal if
it verifies the backup against the live filesystem. This option may be used in
to verify a backup after its creation, or on its own to see how much the live
filesystem has changed since the backup was made.
to make it auto-detect as many settings as possible, ask you politely for the
rest, and then backup and verify your OS or a subset thereof.
To restore data, either run
from the command line or boot from the emergency media generated during
the backup process. The latter will come in handy if a gremlin wipes your hard
- You must specify one of the following:-
- -c speed
Use CD-R drive as backup device and its (write-once) disks as backup media.
- -w speed
Use CD-RW drive as backup device and its (write/rewrite) disks as backup media.
Mondo will wipe media before writing to them.
Use DVD drive as backup device and its disks as backup media. Growisofs decides
on the best speed for your drive. Note that calling mondoarchive
using sudo when writing to DVDs will fail
because growisofs does not support this - see the growisofs manpage for
- -C speed
Use CD-R drive as a streaming device, almost like a tape streamer. Use
write-once disks as backup media.
- -p prefix
to generate the name of your ISO images.
By default, mondoarchive names images mondorescue-1.iso, mondorescue-2.iso, ...
will name your images machine-1.iso, machine-2.iso, ...
Use ISO files (CD images) as backup media. This is good for backing up your
system to a spare hard drive. The
switch is a wiser choice if you plan to restore from a remote filesystem.
- -n mount
Use files residing on a remote share as backup media.
is the remote mount-point, e.g. 'nfs://192.168.1.3:/home/nfs'
for my file server. If not mounted, mondoarchive will do it for you. So nice ;-)
If your NFS server only accept write from a backup user, you may specify it with the syntax:
and mondoarchive will try to do its best to support it.
Other protocols are available such as sshfs for fuse SSH based filesystem
mount, with the same syntax e.g. 'sshfs://firstname.lastname@example.org:/home/nfs' and
smbfs (aka cifs) for SaMBa or Windows based filesystem mount.
Use tape streamer as backup device and its tapes as backup media.
Use a generic USB device as backup device. Use this if you want to write
your backup to a USB key or USB disk, which will be make bootable.
The USB device should be attached to the system in order for this to work and
its device name passed to the
option. Do not use the partition name, but the raw device name (/dev/sda e.g.)
WARNING: All the data on the related device will be removed.
Use a generic streaming device as backup device. Use this if you want to write
your backup to a device that is not directly support by mondoarchive. This will
send the data directly to a raw device.
For experienced users only.
Make a differential backup: examine the filesystem and find which files have
changed since the last full backup was carried out. Backup only those files.
- -E ``dir|...''
Exclude dir(s) from backup. The dirs should be separated with a pipe and surrounded by quotes.
This is the prefered and recommended option when doing partial archiving.
Note that mondo automatically excludes removable media (/mnt/floppy,
/mnt/cdrom, /proc, /sys, /run, /tmp). For example, if you are backing up to an NFS mount but you
do not want to include the contents of the mount in a backup, exclude your
local mount-point with this switch. It will also work with partitions, e.g.
/dev/sdd4 if you have a peculiar SCSI zip drive which insists on showing up in
the mountlist. NB: If you exclude /dev/sdd4 then the /dev entry itself will
still be backed up, even though the mountlist entry will be suppressed.
N.B.: If you specify a directory with a final / its content will be
archived so it won't do what you expect.
You may also specify full disk device to this option as with -E
N.B.: If for example you have a disk /dev/mapper/vgsan-lvdir mounted on a /mnt mountpoint
excluding the /dev/mapper/vgsan-lvdir device prevents mondorestore to touch the LVM structure
of this device at restore time (no pv|vg|lvcreate will occur).
However, if you exclude the mount point /mnt, the LVM structure will be re-created at restore time.
ALL DATA WILL THEN BE LOST ON THIS DEVICE. Use what is required for your configuration.
- -I ``dir|...''
Include dirs(s) in backup. The dirs should be separated with a pipe and surrounded by quotes.
This option is mainly used to perform tests
in order to reduce the time taken by the archiving operation.
The default backup dir is ``/'' but you may specify alternatives,
e.g. -I ``/home|/etc'' to override that.
You may also specify full disk device to this option as with -I
N.B.: When using the
option with the
option, the -E content should be subdirectories of those mentioned in
the -I only, as -I takes precedence.
- -J file
Specify an explicit list of files and directories to include in a plain text file, one item
(file or directory) per line. Beware that directories placed in that file are not managed recursively contrary to what is done with the -I option.
Exclude all mounted network filesystems. This currently means NFS, SMB, Coda, MVFS, AFS
OCFS and Netware. In other words, only backup the local hard disk(s).
- -d dev|dir
Specify the backup device (CD/tape/USB) or directory (NFS/ISO). For CD-R[W] drives,
this is the SCSI node where the drive may be found, e.g. '0,1,0'. For tape
users, this is the tape streamers /dev entry, e.g. '/dev/st0'. For USB users,
this is the device name of your key or external disk. For ISO users,
this is the directory where the ISO images are stored. For NFS users, this is
the subdirectory under the NFS mount where the backups are stored. The default
for ISO and NFS is '/var/cache/mondo'.
GUI mode. Without this switch, the screen output of mondoarchive is suitable
for processing by an 'expect' wrapper, enabling the user to backup nightly via
a cron job. However, if you want to run this program with an attractive but
non-cron-friendly interface then use '-g'.
- -k path
Path of user's kernel. If you are a Debian (<3.0) or Gentoo (<1.4) user then specify
as your kernel. Otherwise, you will rarely need this option.
Manual (not self-retracting) CD trays are often found on laptops. If you are
a laptop user, your CD burner has BurnProof technology or you experience
problems with mondo then please call mondoarchive with this switch.
Use OBDR (One Button Disaster Recovery) type of tapes.
By default, tapes are not bootable. With this flag, tape will be made bootable
following the OBDR format.
- -s size
How much can each of your backup media hold? You may use 'm' and 'g' on the end
of the number, e.g. '700m' for an extra-large CD-R. You no longer need to
specify the size of your cartridges if you are backing up to tape.
- -x 'dev ...'
Specify non-Linux partitions which you want to backup, e.g. NTFS or BeOS.
Specify the compression level. Default is 3. No compression is 0.
- -A command
This command will be called after each CD/NFS/ISO file is written. It is useful
if you want to do something with an ISO after creating it, e.g. write it to a
CD burner using a non-standard command.
understands two tokens - _ISO_ and _CD#_ - which will be translated into the
ISO's filename and its index number (1, 2, ...) respectively. So, you could use
-A 'foobackup _ISO_; rm -f _ISO_'
to feed each ISO to some magical new backup tool.
- -B command
This command will be called before each CD/NFS/ISO file is written. See
for more information.
Do not retry when a command failed but just exits. This is useful for an
automated mode launched from cron where you want to avoid filling your logs
due to an answer which is impossible to give.
Use gzip, the standard and quicker Linux compression engine, instead of bzip2.
When you boot from the tape/CD, your hard drive will be wiped and the archives
will be restored. Your decision to boot from the tape/CD will be taken as
consent. No further permission will be sought.
Use with caution.
Use lzo, a fast compression engine, instead of bzip2. You may find lzo on
Mondo's website or via FreshMeat. WARNING! Some versions of LZO are unstable.
- -M max-size
Gives the maximum size of a biggie file (by default 64 MB). The value should
be given in kB. Example use -M 128000 to have biggie being more than 128 MB.
Star is an alternative to afio. Can be useful for distributions considering
that afio is not free enough due to its age and old licenses (wrongly in our
opinion). Star can be used to have a better support of sparse file compared to
afio. Also star supports natively POSIX ACLs, where as afio requires a special
- -P tarball
Post-nuke tarball. If you boot into Nuke Mode and everything is restored
successfully then the
script will be sought and executed if found. This is useful for post-restore
customization. It is assumed that the tarball (.tar.gz format) will contain not
script (or binary, or whatever it is) but also any files it requires.
- -S path
Specify the full pathname of the scratchdir, the directory where ISO
images are built before being archived. If you have plenty of RAM and
want to use a ramdisk for scratch space, specify its path here.
- -T path
Specify the full pathname of the tempdir, the directory where temporary
files (other than ISO images being assembled) are stored. See
Don't make your backup self-booting. This is a really bad idea, IMO. Don't do
this unless you have really great boot disks in your hand and you are an anally
retentive SOB who can't wait 2 minutes for Mindi to run in the background. If
you use -W then you'd better know what the hell you're doing, okay?
Specify the internal block size used by the tape drive. This is usually 32K but
some drives just don't like that. They should but they don't. That's what
happens when tape drive vendors don't talk to kernel driver writers. Try 512 or
Don't eject the CD or tape when backing up...
- -f device
Specify the drive on which your Master Boot Record lives. Usually, this is
discovered automatically. A good use case may be when you have software RAID.
- -l GRUB|LILO|ELILO|RAW
Specify the boot loader. By default, your Master Boot Record is examined and
the boot loader can usually be discovered. If you specify RAW then the MBR will
be backed up and restored byte-for-byte without any analysis. It is likely that
you will also need to specify the boot device with -f <dev>. ELILO is mandatory
for IA64 machines.
Give more detailed information about the boot loader.
- -K loglevel
Specify the loglevel. Use 99 for full debug. Standard debug level is 4.
Gives mondoarchive version.
Use extended attributes and acl for each file and store them in the
backup media. Use this option if you use SElinux e.g. but it will slow
down backup and restore time of course.
Mondo generates one additional, and extremely important file:
When seeking technical support, attach this file to your email.
This log contains important information required to analyse mondoarchive
problem reports. Did I already said that it's highly recommended to send this file with
This variable is passed to the environment by mondoarchive so that
parted2fdisk.pl is aware of the underlying hardware architecture.
This variable is passed to the environment by mondoarchive so that
mindi is aware that it's called from it and act accordingly. It contains
the shared directory for the mondo package.
This variable is modified internally by mondoarchive so that /sbin:/usr/sbin:/usr/local/sbin
are appended to it systematically in order to find the required tools.
This variable is used, if defined, as the target directory to create
all the temporary files needed during the operation (not the scratch files)
This variable is used, if defined and if TMPDIR is not defined, as the target
directory to create all the temporary files needed during the operation
(not the scratch files)
With none of these variables defined, nor the -T option on the CLI then
/tmp is used for temporary files.
This variable is used, if defined, as the target directory to create all the
scratch files needed during the operation such as the archives (not the temp
files). If this variable is not defined, /tmp is used for scratch files if
using the CLI without -S option specified, and the largest partition available
is proposed in the GUI if that one is used.
A link to Mondo's HTML-based manual (by Bruno Cornec, Mikael Hultgren,
Cafeole, Randy Delphs, Stan Benoit, and Hugo Rabson) may be found at
- or in
on your hard drive.
It is recommend that your system has more than 64 MB ram. SCSI device order
change with nuke can have unexpected results. It is recommended you use expert
mode with drastic hardware reconfigurations.
Backup to a directory; note that /mnt/foo's contents will be backed up except
for its ISO's unless you exclude it, as follows:
mondoarchive -Oi -d /mnt/foo -E '/mnt/foo|/mnt/foo2' -p `hostname`-`date +%Y-%m-%d`
Backup to ISO's non-interactively, e.g. as a job running in /etc/cron.daily:
mkdir -p /bkp/`date +%A`; mondoarchive -Oi -9 -d /bkp/`date +%A` -E /bkp
Backup PC using DVD Media:
mondoarchive -OVr -d /dev/scd0 -gF -s 4480m
Backup to tape, using lzo compression (WARNING - can be unstable):
mondoarchive -Ot -d /dev/st0 -L
Verify existing tape backup which was made with lzo compression:-
mondoarchive -Vt -d /dev/st0 -L -g
Backup to tape, using max compression:
mondoarchive -Ot -9 -d /dev/st0
Backup to 700MB CD-R disks using a 16x CD burner:
mondoarchive -Oc 16 -s 700m -g
Verify existing CD-R or CD-RW backup (works for either):-
mondoarchive -Vc 16
Backup to 650MB CD-RW disks using a 4x CD ReWriter:
mondoarchive -Ow 4
Backup just your /home and /etc directory to 650MB CD-RW disks using a 4x CD
mondoarchive -Ow 4 -I ``/home|/etc''
Backup to an NFS mount:
mondoarchive -On nfs://192.168.1.2:/home/nfs -d /Monday -E /mnt/nfs
Verify existing NFS backup:-
mondoarchive -Vn nfs://192.168.1.2:/home/nfs -d /Monday
Backup to your 4GB USB key, using gzip compression:
mondoarchive -OU -d /dev/sda -s 4g -G
Backup PC to a Software Raid mount point, iso size 700mb:
mondoarchive -O -s 700m -d /mnt/raid
afio(1), bzip2(1), find(1), mindi(8), mondorestore(8).
Bruno Cornec (lead-development)
Andree Leidenfrost (co-developer)
Hugo Rabson (original author)
Jesse Keating (original RPM packager)
Stan Benoit (testing)
Mikael Hultgren (docs)
See mailing list at http://www.mondorescue.org for technical support.
- BACKUP MEDIA
- MAJOR OPTIONS
- MINOR OPTIONS
- ENVIRONMENT VARIABLES
- SEE ALSO
- ORIGINAL AUTHORS
This document was created by
using the manual pages.
Time: 08:21:39 GMT, October 20, 2013