.\" This is free documentation; you can redistribute it and/or .\" modify it under the terms of the GNU General Public License as .\" published by the Free Software Foundation; either version 2 of .\" the License, or (at your option) any later version. .\" .\" The GNU General Public License's references to "object code" .\" and "executables" are to be interpreted as the output of any .\" document formatting or typesetting system, including .\" intermediate and printed output. .\" .\" This manual is distributed in the hope that it will be useful, .\" but WITHOUT ANY WARRANTY; without even the implied warranty of .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the .\" GNU General Public License for more details. .\" .\" You should have received a copy of the GNU General Public .\" License along with this manual; if not, write to the Free .\" Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, .\" USA. .\" .TH mondoarchive 8 "PBDATE" "Mondo Rescue PBVER-rPBVER" .SH NAME mondoarchive \- a backup / disaster\-recovery tool. .SH SYNOPSIS .B mondoarchive -O [ .I options ] : backup your PC .br .B mondoarchive -V [ .I options ] : verify your backup .SH DESCRIPTION .PP .I mondoarchive 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. .pp With .BR \-O , it backs up your filesystem to CD, tape, ISO images or NFS share. A special boot CD will be created to allow you to restore from bare metal if necessary. .pp With .BR \-V , it verifies the backup against the live filesystem. This option may be used in combination with .BR \-O 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. .pp Call mondoarchive .BR without .BR flags 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. .pp To restore data, either run .I mondorestore from the command line or boot from the emergency CD generated during the backup process. The latter will come in handy if a gremlin wipes your hard disk. .SH BACKUP MEDIA .TP 13 You must specify one of the following:- .TP .BI "-w " speed Specify the speed to use for the writer (CR-RW|DVD-+RW|...). Mondo will wipe media before writing to them. .TP .BI "-r " Use DVD drive as backup device and its disks as backup media. Note that calling mondoarchive .B using sudo when writing to DVDs will fail because growisofs does not support this - see the growisofs manpage for details. .TP .BI "-C " Use CD-R drive as a streaming device, almost like a tape streamer. Use write-once disks as backup media. .B Experimental. .TP .BI "-p " prefix Use .B prefix to generate the name of your ISO images. By default, mondoarchive names images mondorescue-1.iso, mondorescue-2.iso, ... Using .B -p machine will name your images machine-1.iso, machine-2.iso, ... .TP .BI "-i " Use ISO files (CD images) as backup media. This is good for backing up your system to a spare hard drive. The .B -n switch is a wiser choice if you plan to restore from a remote filesystem. .TP .BI "-n " mount Use files residing on NFS partition as backup media. .I mount is the remote mount-point, e.g. '192.168.1.3:/home/nfs' for my file server. Please mount it before backing up/verifying. .TP .BI "-t " Use tape streamer as backup device and its tapes as backup media. .TP .BI "-u " 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. .B For experienced users only. .TP .BI "-U " 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 ir order for this to work. .B WARNING: All the data on the related devices will be removed. .SH MAJOR OPTIONS .TP 13 .BI "-D " 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. .TP .BI "-E " "\*(lqpath ...\*(rq" Exclude path(s) from backup. The paths should be separated with a whitespace. Note that mondo automatically excludes removable media (/mnt/floppy, /mnt/cdrom, /proc, /sys, /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. .TP .BI "-I " "\*(lqpath ...\*(rq" Include paths(s) in backup. The default backup path is \*(lq/\*(rq but you may specify alternatives, e.g. -I \*(lq/home /etc\*(rq to override that. .TP .BI "-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. .TP .BI "-N" 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). .TP .BI "-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 directory within the NFS mount where the backups are stored. The default for ISO and NFS is '/root/images/mondo'. .TP .BI "-g " 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'. .TP .BI "-k " "path" Path of user's kernel. If you are a Debian or Gentoo user then specify .B -k FAILSAFE as your kernel. Otherwise, you will rarely need this option. .TP .BI "-m " 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. .TP .BI "-o " Use LILO as boot loader of boot CD instead of SYSLINUX/ISOLINUX. By default, ISOLINUX is used for CD's. Use LILO if you prefer to use that boot loader. NB: This does not affect which boot loader you use to boot your PC, merely the boot loader used by the CD's created by Mondo. Use ELILO instead which is mandatory for IA64 machines. .TP .BI "-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. .TP .BI "-x " "'dev ...'" Specify non-Linux partitions which you want to backup, e.g. NTFS or BeOS. .SH MINOR OPTIONS .TP 13 .BI "-[0-9] " Specify the compression level. Default is 3. No compression is 0. .TP .BI "-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. .B -A 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 .I -A 'foobackup _ISO_; rm -f _ISO_' to feed each ISO to some magical new backup tool. .TP .BI "-B " "command" This command will be called before each CD/NFS/ISO file is written. See .B -A for more information. .TP .BI "-H " 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. .B Use with caution. .TP .BI "-L " 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. .TP .BI "-G " Use gzip, the standard and quicker Linux compression engine, instead of bzip2. .TP .BI "-R " EXPERIMENTAL. Do not use in mission-critical environments. Star is an alternative to afio. Mondo now supports POSIX ACLs and extended attributes, so -R is essentially redundant for now. .TP .BI "-P " "tarball" Post-nuke tarball. If you boot into Nuke Mode and everything is restored successfully then the .I post-nuke 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 just the .I post-nuke script (or binary, or whatever it is) but also any files it requires. .TP .BI "-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. .TP .BI "-T " "path" Specify the full pathname of the tempdir, the directory where temporary files (other than ISO images being assembled) are stored. See .B -S .TP .BI "-W " 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? .TP .BI "-b " 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 16384. .TP .BI "-e " Don't eject the CD or tape when backing up or restoring... unless cdrecord insists on it. If it does, well, tough. Sorry. :) .TP .BI "-f " "device" Specify the drive on which your Master Boot Record lives. Usually, this is discovered automatically. .TP .BI "-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 . ELILO is mandatory for IA64 machines. .TP .BI "-Q " Give more detailed information about the boot loader. .TP .BI "-K " "loglevel" Specify the loglevel. Use 99 for full debug. Standard debug level is 4. .TP .BI "-z " 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. .SH DIAGNOSTICS Mondo generates one additional, and extremely important file: .BI /var/log/mondoarchive.log. When seeking technical support, attach this file to your email. .SH FILES .IR /var/log/mondoarchive.log 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 support questions. .SH NOTES 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 .I http://www.mondorescue.org/docs.shtml - or in .I /usr/share/doc/mondo-x.xx on your hard drive. .SH BUGS 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. .SH EXAMPLES .BI ISO: 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:- .br .I "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: .br .I "mkdir -p /bkp/\`date +%A\`; mondoarchive -Oi -9 -d /bkp/\`date +%A\` -E /bkp" .BI DVD: Backup PC using DVD Media: .br .I "mondoarchive -OVr -d /dev/scd0 -gF -s 4480m" .BI TAPE: Backup to tape, using lzo compression (WARNING - can be unstable): .br .I "mondoarchive -Ot -d /dev/st0 -L" Verify existing tape backup which was made with lzo compression:- .br .I "mondoarchive -Vt -d /dev/st0 -L -g" Backup to tape, using max compression: .br .I "mondoarchive -Ot -9 -d /dev/st0 " .BI CD-R: Backup to 700MB CD-R disks using a 16x CD burner: .br .I "mondoarchive -Oc 16 -s 700m -g" Verify existing CD-R or CD-RW backup (works for either):- .br .I "mondoarchive -Vc 16" .BI CD-RW: Backup to 650MB CD-RW disks using a 4x CD ReWriter: .br .I "mondoarchive -Ow 4" Backup just your /home and /etc directory to 650MB CD-RW disks using a 4x CD ReWriter: .br .I "mondoarchive -Ow 4 -I \*(lq/home /etc\*(rq" .BI USB: Backup to your USB key, using gzip compression: .br .I "mondoarchive -OU -d /dev/sda -G" .BI NFS: Backup to an NFS mount: .br .I "mondoarchive -On 192.168.1.2:/home/nfs -d /Monday -E /mnt/nfs" Verify existing NFS backup:- .br .I "mondoarchive -Vn 192.168.1.2:/home/nfs -d /Monday" .BI RAID: Backup PC to a Software Raid mount point, iso size 700mb: .br .I "mondoarchive -O -s 700m -d /mnt/raid" .SH "SEE ALSO" afio(1), bzip2(1), find(1), mindi(8), mondorestore(8). .SH AUTHORS Bruno Cornec (lead-development) .I "bruno_at_mondorescue.org" .br Andree Leidenfrost (co-developper) .I "aleidenf_at_bigpond.net.au" .br .SH ORIGINAL AUTHORS Hugo Rabson (original author) .I "hugo.rabson_at_mondorescue.org" .br Jesse Keating (original RPM packager) .I "hosting_at_j2solutions.net" .br Stan Benoit (testing) .I "troff_at_nakedsoul.org" .br Mikael Hultgren (docs) .I "mikael_hultgren_at_gmx.net" .br See mailing list at http://www.mondorescue.org for technical support. .