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

Last change on this file since 3098 was 3098, checked in by Bruno Cornec, 11 years ago
  • Add cifs support for #208 with first modifications to add cifs support as an external FS
  • Property svn:keywords set to Id
File size: 16.2 KB
RevLine 
[402]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.\"
[2062]21.TH mondoarchive 8 "PBDATE" "Mondo Rescue PBVER-rPBREV"
[1]22
23.SH NAME
24mondoarchive \- a backup / disaster\-recovery tool.
25
26.SH SYNOPSIS
[2543]27.B mondoarchive \-O
[1]28[
29.I options
30] : backup your PC
31.br
[2543]32.B mondoarchive \-V
[1]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
[2543]43bare metal to its original state if necessary.
[1]44
[2045]45.PP
[1]46With
47.BR \-O ,
[1885]48it backs up your filesystem to CD, tape, ISO images or NFS share. Boot media
[1]49or a special boot CD will be created to allow you to restore from bare metal if
50necessary.
51
[2045]52.PP
[1]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
[2045]61.PP
[2543]62Call mondoarchive
[1]63.BR without
[2543]64.BR flags
[1]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
[2045]68.PP
[2543]69To restore data, either run
[1]70.I mondorestore
[1885]71from the command line or boot from the emergency media generated during
[1]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
[2543]80.BI "\-c " speed
[1]81Use CD-R drive as backup device and its (write-once) disks as backup media.
82
83.TP
[2543]84.BI "\-w " speed
[1]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
[2543]89.BI "\-r "
[1]90Use DVD drive as backup device and its disks as backup media. Growisofs decides
[116]91on the best speed for your drive. Note that calling mondoarchive
92.B using sudo when writing to DVDs will fail
[2543]93because growisofs does not support this \- see the growisofs manpage for
[116]94details.
[1]95
96.TP
[2543]97.BI "\-C " speed
[1]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
[2543]103.BI "\-p " prefix
104Use
105.B prefix
[20]106to generate the name of your ISO images.
[907]107By default, mondoarchive names images mondorescue-1.iso, mondorescue-2.iso, ...
[2543]108Using
109.B \-p machine
[907]110will name your images machine-1.iso, machine-2.iso, ...
[20]111
112.TP
[2543]113.BI "\-i "
[1]114Use ISO files (CD images) as backup media. This is good for backing up your
115system to a spare hard drive. The
[2870]116.B \-n
[1]117switch is a wiser choice if you plan to restore from a remote filesystem.
118
119.TP
[2543]120.BI "\-n " mount
[2380]121Use files residing on a remote share as backup media.
[1]122.I mount
[2380]123is the remote mount-point, e.g. 'nfs://192.168.1.3:/home/nfs'
[2224]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:
[2380]126.B nfs://user@machine:/mount/path
[2225]127and mondoarchive will try to do its best to support it.
[2380]128Other protocols are available such as sshfs for fuse SSH based filesystem
[3098]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.
[1]131
132.TP
[2543]133.BI "\-t "
[1]134Use tape streamer as backup device and its tapes as backup media.
135
136.TP
[2543]137.BI "\-U "
[1762]138Use a generic USB device as backup device. Use this if you want to write
[2543]139your backup to a USB key or USB disk, which will be make bootable.
[2294]140The USB device should be attached to the system in order for this to work and
[1762]141its device name passed to the
[2543]142.BR \-d
[2333]143option. Do not use the partition name, but the raw device name (/dev/sda e.g.)
[1762]144.B WARNING: All the data on the related device will be removed.
145
146.TP
[2543]147.BI "\-u "
[1]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
[2543]155.BI "\-D "
[1]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
[3068]160.BI "\-E " "\*(lqdir|...\*(rq"
161Exclude dir(s) from backup. The dirs should be separated with a pipe and surrounded by quotes.
[2336]162This is the prefered and recommended option when doing partial archiving.
[1]163Note that mondo automatically excludes removable media (/mnt/floppy,
[2918]164/mnt/cdrom, /proc, /sys, /run, /tmp). For example, if you are backing up to an NFS mount but you
[1]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.
[2543]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
[2714]173\*(lq/dev/sda|/dev/cciss/c0d0\*(rq
[1]174
175.TP
[3068]176.BI "\-I " "\*(lqdir|...\*(rq"
177Include dirs(s) in backup. The dirs should be separated with a pipe and surrounded by quotes.
[2835]178This option is mainly used to perform tests
[2543]179in order to reduce the time taken by the archiving operation.
[3068]180The default backup dir is \*(lq/\*(rq but you may specify alternatives,
[2714]181e.g. \-I \*(lq/home|/etc\*(rq to override that.
[2543]182You may also specify full disk device to this option as with \-I
[2714]183\*(lq/dev/sda|/dev/cciss/c0d0\*(rq
[2336]184N.B.: When using the
185.BR \-I
[2543]186option with the
[2336]187.BR \-E
[2543]188option, the \-E content should be subdirectories of those mentioned in
[2870]189the \-I only, as \-I takes precedence.
[1]190
191.TP
[2870]192.BI "\-J " "file"
[791]193Specify an explicit list of files and directories to include in a plain text file, one item
[2543]194(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.
[1]195
196.TP
[2870]197.BI "\-N"
[791]198Exclude all mounted network filesystems. This currently means NFS, SMB, Coda, MVFS, AFS
[1488]199OCFS and Netware. In other words, only backup the local hard disk(s).
[1]200
201.TP
[2870]202.BI "\-d " "dev|dir"
[1762]203Specify the backup device (CD/tape/USB) or directory (NFS/ISO). For CD-R[W] drives,
[1]204this is the SCSI node where the drive may be found, e.g. '0,1,0'. For tape
[1762]205users, this is the tape streamers /dev entry, e.g. '/dev/st0'. For USB users,
206this is the device name of your key or external disk. For ISO users,
[1]207this is the directory where the ISO images are stored. For NFS users, this is
[2896]208the subdirectory under the NFS mount where the backups are stored. The default
[1967]209for ISO and NFS is '/var/cache/mondo'.
[1]210
211.TP
[2870]212.BI "\-g "
[1]213GUI mode. Without this switch, the screen output of mondoarchive is suitable
214for processing by an 'expect' wrapper, enabling the user to backup nightly via
215a cron job. However, if you want to run this program with an attractive but
[2543]216non-cron-friendly interface then use '\-g'.
[1]217
218.TP
[2870]219.BI "\-k " "path"
[2294]220Path of user's kernel. If you are a Debian (<3.0) or Gentoo (<1.4) user then specify
[2543]221.B \-k FAILSAFE
[1]222as your kernel. Otherwise, you will rarely need this option.
223
224.TP
[2870]225.BI "\-m "
[1]226Manual (not self-retracting) CD trays are often found on laptops. If you are
[2543]227a laptop user, your CD burner has BurnProof technology or you experience
228problems with mondo then please call mondoarchive with this switch.
[1]229
230.TP
[2870]231.BI "\-o "
[1948]232Use OBDR (One Button Disaster Recovery) type of tapes.
233By default, tapes are not bootable. With this flag, tape will be made bootable
234following the OBDR format.
[1]235
236.TP
[2870]237.BI "\-s " "size"
[1]238How much can each of your backup media hold? You may use 'm' and 'g' on the end
239of the number, e.g. '700m' for an extra-large CD-R. You no longer need to
240specify the size of your cartridges if you are backing up to tape.
241
242.TP
[2870]243.BI "\-x " "'dev ...'"
[1]244Specify non-Linux partitions which you want to backup, e.g. NTFS or BeOS.
245
246
247.SH MINOR OPTIONS
248.TP 13
[2870]249.BI "\-[0-9] "
[1]250Specify the compression level. Default is 3. No compression is 0.
251
252.TP
[2870]253.BI "\-A " "command"
[1]254This command will be called after each CD/NFS/ISO file is written. It is useful
255if you want to do something with an ISO after creating it, e.g. write it to a
256CD burner using a non-standard command.
[2870]257.B \-A
[2543]258understands two tokens \- _ISO_ and _CD#_ - which will be translated into the
[1]259ISO's filename and its index number (1, 2, ...) respectively. So, you could use
[2543]260.I \-A 'foobackup _ISO_; rm \-f _ISO_'
[1]261to feed each ISO to some magical new backup tool.
262
263.TP
264.BI "-B " "command"
265This command will be called before each CD/NFS/ISO file is written. See
[2543]266.B \-A
[1]267for more information.
268
269.TP
[2870]270.BI "\-H "
[1]271When you boot from the tape/CD, your hard drive will be wiped and the archives
272will be restored. Your decision to boot from the tape/CD will be taken as
273consent. No further permission will be sought.
274.B Use with caution.
275
276.TP
[2870]277.BI "\-L "
[1]278Use lzo, a fast compression engine, instead of bzip2. You may find lzo on
279Mondo's website or via FreshMeat. WARNING! Some versions of LZO are unstable.
280
281.TP
[2870]282.BI "\-G "
[998]283Use gzip, the standard and quicker Linux compression engine, instead of bzip2.
284
285.TP
[2870]286.BI "\-R "
[2543]287EXPERIMENTAL. Do not use in mission-critical environments. Star is an
288alternative to afio. Mondo now supports POSIX ACLs and extended
289attributes, so \-R is essentially redundant for now.
[1]290
291.TP
[2870]292.BI "\-P " "tarball"
[1]293Post-nuke tarball. If you boot into Nuke Mode and everything is restored
[2543]294successfully then the
[1]295.I post-nuke
296script will be sought and executed if found. This is useful for post-restore
297customization. It is assumed that the tarball (.tar.gz format) will contain not
298just the
299.I post-nuke
[2543]300script (or binary, or whatever it is) but also any files it requires.
[1]301
302.TP
[2870]303.BI "\-S " "path"
[2543]304Specify the full pathname of the scratchdir, the directory where ISO
305images are built before being archived. If you have plenty of RAM and
306want to use a ramdisk for scratch space, specify its path here.
[1]307
308.TP
[2870]309.BI "\-T " "path"
[2543]310Specify the full pathname of the tempdir, the directory where temporary
311files (other than ISO images being assembled) are stored. See
312.B \-S
[1]313
314.TP
[2870]315.BI "\-W "
[1]316Don't make your backup self-booting. This is a really bad idea, IMO. Don't do
317this unless you have really great boot disks in your hand and you are an anally
318retentive SOB who can't wait 2 minutes for Mindi to run in the background. If
[2543]319you use \-W then you'd better know what the hell you're doing, okay?
[1]320
321.TP
[2870]322.BI "\-b "
[1]323Specify the internal block size used by the tape drive. This is usually 32K but
324some drives just don't like that. They should but they don't. That's what
325happens when tape drive vendors don't talk to kernel driver writers. Try 512 or
32616384.
327
328.TP
[2870]329.BI "\-e "
[1967]330Don't eject the CD or tape when backing up...
[1]331
332.TP
[2870]333.BI "\-f " "device"
[1]334Specify the drive on which your Master Boot Record lives. Usually, this is
[2492]335discovered automatically. A good use case may be when you have software RAID.
[1]336
337.TP
[2870]338.BI "\-l " "GRUB|LILO|ELILO|RAW"
[1]339Specify the boot loader. By default, your Master Boot Record is examined and
340the boot loader can usually be discovered. If you specify RAW then the MBR will
341be backed up and restored byte-for-byte without any analysis. It is likely that
[2543]342you will also need to specify the boot device with \-f <dev>. ELILO is mandatory
[1]343for IA64 machines.
344
345.TP
[2870]346.BI "\-Q "
[1]347Give more detailed information about the boot loader.
348
349.TP
[2870]350.BI "\-K " "loglevel"
[907]351Specify the loglevel. Use 99 for full debug. Standard debug level is 4.
[1]352
[948]353.TP
[2870]354.BI "\-v "
[2752]355Gives mondoarchive version.
356
357.TP
[2870]358.BI "\-z "
[2543]359Use extended attributes and acl for each file and store them in the
360backup media. Use this option if you use SElinux e.g. but it will slow
361down backup and restore time of course.
[1]362
[948]363
[1]364.SH DIAGNOSTICS
[1315]365Mondo generates one additional, and extremely important file:
[2543]366.BI /var/log/mondoarchive.log.
367When seeking technical support, attach this file to your email.
[1]368
369
370.SH FILES
[1315]371.IR /var/log/mondoarchive.log
[1]372This log contains important information required to analyse mondoarchive
[1315]373problem reports. Did I already said that it's highly recommended to send this file with
[1]374support questions.
375
[2897]376.SH ENVIRONMENT VARIABLES
377.IR ARCH
378This variable is passed to the environment by mondoarchive so that
379parted2fdisk.pl is aware of the underlying hardware architecture.
[2543]380
[2897]381.IR MONDO_SHARE
382This variable is passed to the environment by mondoarchive so that
383mindi is aware that it's called from it and act accordingly. It contains
384the shared directory for the mondo package.
385
386.IR PATH
387This variable is modified internally by mondoarchive so that /sbin:/usr/sbin:/usr/local/sbin
388are appended to it systematically in order to find the required tools.
389
390.IR TMPDIR
391This variable is used, if defined, as the target directory to create
392all the temporary files needed during the operation (not the scratch files)
393
394.IR TMP
395This variable is used, if defined and if TMPDIR is not defined, as the target
396directory to create all the temporary files needed during the operation
397(not the scratch files)
398
[1]399.SH NOTES
[2543]400A link to Mondo's HTML-based manual (by Bruno Cornec, Mikael Hultgren,
401Cafeole, Randy Delphs, Stan Benoit, and Hugo Rabson) may be found at
[399]402.I http://www.mondorescue.org/docs.shtml
[2543]403\- or in
[1]404.I /usr/share/doc/mondo-x.xx
405on your hard drive.
406
407.SH BUGS
408It is recommend that your system has more than 64 MB ram. SCSI device order
409change with nuke can have unexpected results. It is recommended you use expert
[2543]410mode with drastic hardware reconfigurations.
[1]411
412.SH EXAMPLES
413
414.BI ISO:
415Backup to a directory; note that /mnt/foo's contents will be backed up except
[2543]416for its ISO's unless you exclude it, as follows:
[1]417.br
[2835]418.I "mondoarchive -Oi -d /mnt/foo -E '/mnt/foo|/mnt/foo2' -p \`hostname\`-\`date +%Y-%m-%d\`"
[1]419
420Backup to ISO's non-interactively, e.g. as a job running in /etc/cron.daily:
421.br
[954]422.I "mkdir -p /bkp/\`date +%A\`; mondoarchive -Oi -9 -d /bkp/\`date +%A\` -E /bkp"
[1]423
424.BI DVD:
425Backup PC using DVD Media:
426.br
[570]427.I "mondoarchive -OVr -d /dev/scd0 -gF -s 4480m"
[1]428
429.BI TAPE:
430Backup to tape, using lzo compression (WARNING - can be unstable):
431.br
432.I "mondoarchive -Ot -d /dev/st0 -L"
433
434Verify existing tape backup which was made with lzo compression:-
435.br
436.I "mondoarchive -Vt -d /dev/st0 -L -g"
437
438Backup to tape, using max compression:
439.br
440.I "mondoarchive -Ot -9 -d /dev/st0 "
441
442.BI CD-R:
443Backup to 700MB CD-R disks using a 16x CD burner:
444.br
445.I "mondoarchive -Oc 16 -s 700m -g"
446
447Verify existing CD-R or CD-RW backup (works for either):-
448.br
449.I "mondoarchive -Vc 16"
450
451.BI CD-RW:
452Backup to 650MB CD-RW disks using a 4x CD ReWriter:
453.br
454.I "mondoarchive -Ow 4"
455
456Backup just your /home and /etc directory to 650MB CD-RW disks using a 4x CD
457ReWriter:
458.br
[2835]459.I "mondoarchive -Ow 4 -I \*(lq/home|/etc\*(rq"
[1]460
461.BI NFS:
462Backup to an NFS mount:
463.br
[2380]464.I "mondoarchive -On nfs://192.168.1.2:/home/nfs -d /Monday -E /mnt/nfs"
[1]465
466Verify existing NFS backup:-
467.br
[2380]468.I "mondoarchive -Vn nfs://192.168.1.2:/home/nfs -d /Monday"
[1]469
[1762]470.BI USB:
[2902]471Backup to your 4GB USB key, using gzip compression:
[1762]472.br
[2902]473.I "mondoarchive -OU -d /dev/sda -s 4g -G"
[1762]474
[1]475.BI RAID:
476Backup PC to a Software Raid mount point, iso size 700mb:
477.br
[2543]478.I "mondoarchive -O -s 700m -d /mnt/raid"
[1]479
480
481.SH "SEE ALSO"
[175]482afio(1), bzip2(1), find(1), mindi(8), mondorestore(8).
[1]483.SH AUTHORS
[2543]484Bruno Cornec (lead-development)
[569]485.I "bruno_at_mondorescue.org"
[1]486.br
[2543]487Andree Leidenfrost (co-developer)
[399]488.I "aleidenf_at_bigpond.net.au"
[175]489.br
[399]490.SH ORIGINAL AUTHORS
491Hugo Rabson (original author)
492.I "hugo.rabson_at_mondorescue.org"
[175]493.br
494Jesse Keating (original RPM packager)
[399]495.I "hosting_at_j2solutions.net"
[1]496.br
497Stan Benoit (testing)
[399]498.I "troff_at_nakedsoul.org"
[1]499.br
500Mikael Hultgren (docs)
[399]501.I "mikael_hultgren_at_gmx.net"
[1]502.br
[116]503See mailing list at http://www.mondorescue.org for technical support.
Note: See TracBrowser for help on using the repository browser.