source: MondoRescue/branches/3.0/mondo-doc/mondoarchive.8 @ 3155

Last change on this file since 3155 was 3155, checked in by Bruno Cornec, 7 years ago
  • Update man pages wrt to the new environment variables used for temp and scratch files
  • Property svn:keywords set to Id
File size: 17.7 KB
Line 
1.\" This is free documentation; you can redistribute it and/or
2.\" modify it under the terms of the GNU General Public License as
3.\" published by the Free Software Foundation; either version 2 of
4.\" the License, or (at your option) any later version.
5.\"
6.\" The GNU General Public License's references to "object code"
7.\" and "executables" are to be interpreted as the output of any
8.\" document formatting or typesetting system, including
9.\" intermediate and printed output.
10.\"
11.\" This manual is distributed in the hope that it will be useful,
12.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
13.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14.\" GNU General Public License for more details.
15.\"
16.\" You should have received a copy of the GNU General Public
17.\" License along with this manual; if not, write to the Free
18.\" Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
19.\" USA.
20.\"
21.TH mondoarchive 8 "PBDATE" "Mondo Rescue PBVER-rPBREV"
22
23.SH NAME
24mondoarchive \- a backup / disaster\-recovery tool.
25
26.SH SYNOPSIS
27.B mondoarchive \-O
28[
29.I options
30] : backup your PC
31.br
32.B mondoarchive \-V
33[
34.I options
35] : verify your backup
36
37.SH DESCRIPTION
38.PP
39.I mondoarchive
40backs up a subset of your files, your entire filesystem, or even images of
41non-Linux filesystems to CD's, tape, ISO images or an NFS mount. In the event of
42catastrophic data loss, you will be able to restore everything, taking a PC from
43bare metal to its original state if necessary.
44
45.PP
46With
47.BR \-O ,
48it backs up your filesystem to CD, tape, ISO images or NFS share. Boot media
49or a special boot CD will be created to allow you to restore from bare metal if
50necessary.
51
52.PP
53With
54.BR \-V ,
55it verifies the backup against the live filesystem. This option may be used in
56combination with
57.BR \-O
58to verify a backup after its creation, or on its own to see how much the live
59filesystem has changed since the backup was made.
60
61.PP
62Call mondoarchive
63.BR without
64.BR flags
65to make it auto-detect as many settings as possible, ask you politely for the
66rest, and then backup and verify your OS or a subset thereof.
67
68.PP
69To restore data, either run
70.I mondorestore
71from the command line or boot from the emergency media generated during
72the backup process. The latter will come in handy if a gremlin wipes your hard
73disk.
74
75.SH BACKUP MEDIA
76.TP 13
77You must specify one of the following:-
78
79.TP
80.BI "\-c " speed
81Use CD-R drive as backup device and its (write-once) disks as backup media.
82
83.TP
84.BI "\-w " speed
85Use CD-RW drive as backup device and its (write/rewrite) disks as backup media.
86Mondo will wipe media before writing to them.
87
88.TP
89.BI "\-r "
90Use DVD drive as backup device and its disks as backup media. Growisofs decides
91on the best speed for your drive. Note that calling mondoarchive
92.B using sudo when writing to DVDs will fail
93because growisofs does not support this \- see the growisofs manpage for
94details.
95
96.TP
97.BI "\-C " speed
98Use CD-R drive as a streaming device, almost like a tape streamer. Use
99write-once disks as backup media.
100.B Experimental.
101
102.TP
103.BI "\-p " prefix
104Use
105.B prefix
106to generate the name of your ISO images.
107By default, mondoarchive names images mondorescue-1.iso, mondorescue-2.iso, ...
108Using
109.B \-p machine
110will name your images machine-1.iso, machine-2.iso, ...
111
112.TP
113.BI "\-i "
114Use ISO files (CD images) as backup media. This is good for backing up your
115system to a spare hard drive. The
116.B \-n
117switch is a wiser choice if you plan to restore from a remote filesystem.
118
119.TP
120.BI "\-n " mount
121Use files residing on a remote share as backup media.
122.I mount
123is the remote mount-point, e.g. 'nfs://192.168.1.3:/home/nfs'
124for my file server. If not mounted, mondoarchive will do it for you. So nice ;-)
125If your NFS server only accept write from a backup user, you may specify it with the syntax:
126.B nfs://user@machine:/mount/path
127and mondoarchive will try to do its best to support it.
128Other protocols are available such as sshfs for fuse SSH based filesystem
129mount, with the same syntax e.g. 'sshfs://user@192.168.1.3:/home/nfs' and
130smbfs (aka cifs) for SaMBa or Windows based filesystem mount.
131
132.TP
133.BI "\-t "
134Use tape streamer as backup device and its tapes as backup media.
135
136.TP
137.BI "\-U "
138Use a generic USB device as backup device. Use this if you want to write
139your backup to a USB key or USB disk, which will be make bootable.
140The USB device should be attached to the system in order for this to work and
141its device name passed to the
142.BR \-d
143option. Do not use the partition name, but the raw device name (/dev/sda e.g.)
144.B WARNING: All the data on the related device will be removed.
145
146.TP
147.BI "\-u "
148Use a generic streaming device as backup device. Use this if you want to write
149your backup to a device that is not directly support by mondoarchive. This will
150send the data directly to a raw device.
151.B For experienced users only.
152
153.SH MAJOR OPTIONS
154.TP 13
155.BI "\-D "
156Make a differential backup: examine the filesystem and find which files have
157changed since the last full backup was carried out. Backup only those files.
158
159.TP
160.BI "\-E " "\*(lqdir|...\*(rq"
161Exclude dir(s) from backup. The dirs should be separated with a pipe and surrounded by quotes.
162This is the prefered and recommended option when doing partial archiving.
163Note that mondo automatically excludes removable media (/mnt/floppy,
164/mnt/cdrom, /proc, /sys, /run, /tmp). For example, if you are backing up to an NFS mount but you
165do not want to include the contents of the mount in a backup, exclude your
166local mount-point with this switch. It will also work with partitions, e.g.
167/dev/sdd4 if you have a peculiar SCSI zip drive which insists on showing up in
168the mountlist. NB: If you exclude /dev/sdd4 then the /dev entry itself will
169still be backed up, even though the mountlist entry will be suppressed.
170N.B.: If you specify a directory with a final / its content will be
171archived so it won't do what you expect.
172You may also specify full disk device to this option as with \-E
173\*(lq/dev/sda|/dev/cciss/c0d0\*(rq
174N.B.: If for example you have a disk /dev/mapper/vgsan-lvdir mounted on a /mnt mountpoint
175excluding the /dev/mapper/vgsan-lvdir device prevents mondorestore to touch the LVM structure
176of this device at restore time (no pv|vg|lvcreate will occur).
177However, if you exclude the mount point /mnt, the LVM structure will be re-created at restore time.
178ALL DATA WILL THEN BE LOST ON THIS DEVICE.  Use what is required for your configuration.
179
180.TP
181.BI "\-I " "\*(lqdir|...\*(rq"
182Include dirs(s) in backup. The dirs should be separated with a pipe and surrounded by quotes.
183This option is mainly used to perform tests
184in order to reduce the time taken by the archiving operation.
185The default backup dir is \*(lq/\*(rq but you may specify alternatives,
186e.g. \-I \*(lq/home|/etc\*(rq to override that.
187You may also specify full disk device to this option as with \-I
188\*(lq/dev/sda|/dev/cciss/c0d0\*(rq
189N.B.: When using the
190.BR \-I
191option with the
192.BR \-E
193option, the \-E content should be subdirectories of those mentioned in
194the \-I only, as \-I takes precedence.
195
196.TP
197.BI "\-J " "file"
198Specify an explicit list of files and directories to include in a plain text file, one item
199(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.
200
201.TP
202.BI "\-N"
203Exclude all mounted network filesystems. This currently means NFS, SMB, Coda, MVFS, AFS
204OCFS and Netware. In other words, only backup the local hard disk(s).
205
206.TP
207.BI "\-d " "dev|dir"
208Specify the backup device (CD/tape/USB) or directory (NFS/ISO). For CD-R[W] drives,
209this is the SCSI node where the drive may be found, e.g. '0,1,0'. For tape
210users, this is the tape streamers /dev entry, e.g. '/dev/st0'. For USB users,
211this is the device name of your key or external disk. For ISO users,
212this is the directory where the ISO images are stored. For NFS users, this is
213the subdirectory under the NFS mount where the backups are stored. The default
214for ISO and NFS is '/var/cache/mondo'.
215
216.TP
217.BI "\-g "
218GUI mode. Without this switch, the screen output of mondoarchive is suitable
219for processing by an 'expect' wrapper, enabling the user to backup nightly via
220a cron job. However, if you want to run this program with an attractive but
221non-cron-friendly interface then use '\-g'.
222
223.TP
224.BI "\-k " "path"
225Path of user's kernel. If you are a Debian (<3.0) or Gentoo (<1.4) user then specify
226.B \-k FAILSAFE
227as your kernel. Otherwise, you will rarely need this option.
228
229.TP
230.BI "\-m "
231Manual (not self-retracting) CD trays are often found on laptops. If you are
232a laptop user, your CD burner has BurnProof technology or you experience
233problems with mondo then please call mondoarchive with this switch.
234
235.TP
236.BI "\-o "
237Use OBDR (One Button Disaster Recovery) type of tapes.
238By default, tapes are not bootable. With this flag, tape will be made bootable
239following the OBDR format.
240
241.TP
242.BI "\-s " "size"
243How much can each of your backup media hold? You may use 'm' and 'g' on the end
244of the number, e.g. '700m' for an extra-large CD-R. You no longer need to
245specify the size of your cartridges if you are backing up to tape.
246
247.TP
248.BI "\-x " "'dev ...'"
249Specify non-Linux partitions which you want to backup, e.g. NTFS or BeOS.
250
251
252.SH MINOR OPTIONS
253.TP 13
254.BI "\-[0-9] "
255Specify the compression level. Default is 3. No compression is 0.
256
257.TP
258.BI "\-A " "command"
259This command will be called after each CD/NFS/ISO file is written. It is useful
260if you want to do something with an ISO after creating it, e.g. write it to a
261CD burner using a non-standard command.
262.B \-A
263understands two tokens \- _ISO_ and _CD#_ - which will be translated into the
264ISO's filename and its index number (1, 2, ...) respectively. So, you could use
265.I \-A 'foobackup _ISO_; rm \-f _ISO_'
266to feed each ISO to some magical new backup tool.
267
268.TP
269.BI "-B " "command"
270This command will be called before each CD/NFS/ISO file is written. See
271.B \-A
272for more information.
273
274.TP
275.BI "\-F "
276Do not retry when a command failed but just exits. This is useful for an
277automated mode launched from cron where you want to avoid filling your logs
278due to an answer which is impossible to give.
279
280.TP
281.BI "\-G "
282Use gzip, the standard and quicker Linux compression engine, instead of bzip2.
283
284.TP
285.BI "\-H "
286When you boot from the tape/CD, your hard drive will be wiped and the archives
287will be restored. Your decision to boot from the tape/CD will be taken as
288consent. No further permission will be sought.
289.B Use with caution.
290
291.TP
292.BI "\-L "
293Use lzo, a fast compression engine, instead of bzip2. You may find lzo on
294Mondo's website or via FreshMeat. WARNING! Some versions of LZO are unstable.
295
296.TP
297.BI "\-M " "max-size"
298Gives the maximum size of a biggie file (by default 64 MB). The value should
299be given in kB. Example use \-M 128000 to have biggie being more than 128 MB.
300
301.TP
302.BI "\-R "
303Star is an alternative to afio. Can be useful for distributions considering
304that afio is not free enough due to its age and old licenses (wrongly in our
305opinion). Star can be used to have a better support of sparse file compared to
306afio. Also star supports natively POSIX ACLs, where as afio requires a special
307additional handlling.
308
309.TP
310.BI "\-P " "tarball"
311Post-nuke tarball. If you boot into Nuke Mode and everything is restored
312successfully then the
313.I post-nuke
314script will be sought and executed if found. This is useful for post-restore
315customization. It is assumed that the tarball (.tar.gz format) will contain not
316just the
317.I post-nuke
318script (or binary, or whatever it is) but also any files it requires.
319
320.TP
321.BI "\-S " "path"
322Specify the full pathname of the scratchdir, the directory where ISO
323images are built before being archived. If you have plenty of RAM and
324want to use a ramdisk for scratch space, specify its path here.
325
326.TP
327.BI "\-T " "path"
328Specify the full pathname of the tempdir, the directory where temporary
329files (other than ISO images being assembled) are stored. See
330.B \-S
331
332.TP
333.BI "\-W "
334Don't make your backup self-booting. This is a really bad idea, IMO. Don't do
335this unless you have really great boot disks in your hand and you are an anally
336retentive SOB who can't wait 2 minutes for Mindi to run in the background. If
337you use \-W then you'd better know what the hell you're doing, okay?
338
339.TP
340.BI "\-b "
341Specify the internal block size used by the tape drive. This is usually 32K but
342some drives just don't like that. They should but they don't. That's what
343happens when tape drive vendors don't talk to kernel driver writers. Try 512 or
34416384.
345
346.TP
347.BI "\-e "
348Don't eject the CD or tape when backing up...
349
350.TP
351.BI "\-f " "device"
352Specify the drive on which your Master Boot Record lives. Usually, this is
353discovered automatically. A good use case may be when you have software RAID.
354
355.TP
356.BI "\-l " "GRUB|LILO|ELILO|RAW"
357Specify the boot loader. By default, your Master Boot Record is examined and
358the boot loader can usually be discovered. If you specify RAW then the MBR will
359be backed up and restored byte-for-byte without any analysis. It is likely that
360you will also need to specify the boot device with \-f <dev>. ELILO is mandatory
361for IA64 machines.
362
363.TP
364.BI "\-Q "
365Give more detailed information about the boot loader.
366
367.TP
368.BI "\-K " "loglevel"
369Specify the loglevel. Use 99 for full debug. Standard debug level is 4.
370
371.TP
372.BI "\-v "
373Gives mondoarchive version.
374
375.TP
376.BI "\-z "
377Use extended attributes and acl for each file and store them in the
378backup media. Use this option if you use SElinux e.g. but it will slow
379down backup and restore time of course.
380
381
382.SH DIAGNOSTICS
383Mondo generates one additional, and extremely important file:
384.BI /var/log/mondoarchive.log.
385When seeking technical support, attach this file to your email.
386
387
388.SH FILES
389.IR /var/log/mondoarchive.log
390This log contains important information required to analyse mondoarchive
391problem reports. Did I already said that it's highly recommended to send this file with
392support questions.
393
394.SH ENVIRONMENT VARIABLES
395.IR ARCH
396This variable is passed to the environment by mondoarchive so that
397parted2fdisk.pl is aware of the underlying hardware architecture.
398
399.IR MONDO_SHARE
400This variable is passed to the environment by mondoarchive so that
401mindi is aware that it's called from it and act accordingly. It contains
402the shared directory for the mondo package.
403
404.IR PATH
405This variable is modified internally by mondoarchive so that /sbin:/usr/sbin:/usr/local/sbin
406are appended to it systematically in order to find the required tools.
407
408.IR TMPDIR
409This variable is used, if defined, as the target directory to create
410all the temporary files needed during the operation (not the scratch files)
411
412.IR MRTMP
413This variable is used, if defined and if TMPDIR is not defined, as the target
414directory to create all the temporary files needed during the operation
415(not the scratch files)
416
417With none of these variables defined, nor the -T option on the CLI then
418/tmp is used for temporary files.
419
420.IR MRSCRATCH
421This variable is used, if defined, as the target directory to create all the
422scratch files needed during the operation such as the archives (not the temp
423files). If this variable is not defined, /tmp is used for scratch files if
424using the CLI without -S option specified, and the largest partition available
425is proposed in the GUI if that one is used.
426
427.SH NOTES
428A link to Mondo's HTML-based manual (by Bruno Cornec, Mikael Hultgren,
429Cafeole, Randy Delphs, Stan Benoit, and Hugo Rabson) may be found at
430.I http://www.mondorescue.org/docs.shtml
431\- or in
432.I /usr/share/doc/mondo-x.xx
433on your hard drive.
434
435.SH BUGS
436It is recommend that your system has more than 64 MB ram. SCSI device order
437change with nuke can have unexpected results. It is recommended you use expert
438mode with drastic hardware reconfigurations.
439
440.SH EXAMPLES
441
442.BI ISO:
443Backup to a directory; note that /mnt/foo's contents will be backed up except
444for its ISO's unless you exclude it, as follows:
445.br
446.I "mondoarchive -Oi -d /mnt/foo -E '/mnt/foo|/mnt/foo2' -p \`hostname\`-\`date +%Y-%m-%d\`"
447
448Backup to ISO's non-interactively, e.g. as a job running in /etc/cron.daily:
449.br
450.I "mkdir -p /bkp/\`date +%A\`; mondoarchive -Oi -9 -d /bkp/\`date +%A\` -E /bkp"
451
452.BI DVD:
453Backup PC using DVD Media:
454.br
455.I "mondoarchive -OVr -d /dev/scd0 -gF -s 4480m"
456
457.BI TAPE:
458Backup to tape, using lzo compression (WARNING - can be unstable):
459.br
460.I "mondoarchive -Ot -d /dev/st0 -L"
461
462Verify existing tape backup which was made with lzo compression:-
463.br
464.I "mondoarchive -Vt -d /dev/st0 -L -g"
465
466Backup to tape, using max compression:
467.br
468.I "mondoarchive -Ot -9 -d /dev/st0 "
469
470.BI CD-R:
471Backup to 700MB CD-R disks using a 16x CD burner:
472.br
473.I "mondoarchive -Oc 16 -s 700m -g"
474
475Verify existing CD-R or CD-RW backup (works for either):-
476.br
477.I "mondoarchive -Vc 16"
478
479.BI CD-RW:
480Backup to 650MB CD-RW disks using a 4x CD ReWriter:
481.br
482.I "mondoarchive -Ow 4"
483
484Backup just your /home and /etc directory to 650MB CD-RW disks using a 4x CD
485ReWriter:
486.br
487.I "mondoarchive -Ow 4 -I \*(lq/home|/etc\*(rq"
488
489.BI NFS:
490Backup to an NFS mount:
491.br
492.I "mondoarchive -On nfs://192.168.1.2:/home/nfs -d /Monday -E /mnt/nfs"
493
494Verify existing NFS backup:-
495.br
496.I "mondoarchive -Vn nfs://192.168.1.2:/home/nfs -d /Monday"
497
498.BI USB:
499Backup to your 4GB USB key, using gzip compression:
500.br
501.I "mondoarchive -OU -d /dev/sda -s 4g -G"
502
503.BI RAID:
504Backup PC to a Software Raid mount point, iso size 700mb:
505.br
506.I "mondoarchive -O -s 700m -d /mnt/raid"
507
508
509.SH "SEE ALSO"
510afio(1), bzip2(1), find(1), mindi(8), mondorestore(8).
511.SH AUTHORS
512Bruno Cornec (lead-development)
513.I "bruno_at_mondorescue.org"
514.br
515Andree Leidenfrost (co-developer)
516.I "aleidenf_at_bigpond.net.au"
517.br
518.SH ORIGINAL AUTHORS
519Hugo Rabson (original author)
520.I "hugo.rabson_at_mondorescue.org"
521.br
522Jesse Keating (original RPM packager)
523.I "hosting_at_j2solutions.net"
524.br
525Stan Benoit (testing)
526.I "troff_at_nakedsoul.org"
527.br
528Mikael Hultgren (docs)
529.I "mikael_hultgren_at_gmx.net"
530.br
531See mailing list at http://www.mondorescue.org for technical support.
Note: See TracBrowser for help on using the repository browser.