-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrear.8
874 lines (873 loc) · 25.6 KB
/
rear.8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
'\" t
.\" Title: rear
.\" Author: [see the "AUTHORS" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
.\" Date: 20 June 2018
.\" Manual: \ \&
.\" Source: \ \&
.\" Language: English
.\"
.TH "REAR" "8" "20 June 2018" "\ \&" "\ \&"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
rear \- bare metal disaster recovery and system migration tool
.SH "SYNOPSIS"
.sp
\fBrear\fR [\fB\-h\fR|\fB\-\-help\fR] [\fB\-V\fR|\fB\-\-version\fR] [\fB\-dsSv\fR] [\fB\-D\fR|\fB\-\-debugscripts\fR \fISET\fR] [\fB\-c\fR \fIDIR\fR] [\fB\-C\fR \fICONFIG\fR] [\fB\-r\fR \fIKERNEL\fR] [\-\-] \fICOMMAND\fR [\fIARGS\fR\&...]
.SH "DESCRIPTION"
.sp
Relax\-and\-Recover is the leading Open Source disaster recovery solution\&. It is a modular framework with many ready\-to\-go workflows for common situations\&.
.sp
Relax\-and\-Recover produces a bootable image\&. This image can repartition the system\&. Once that is done it initiates a restore from backup\&. Restores to different hardware are possible\&. Relax\-and\-Recover can therefore be used as a migration tool as well\&.
.sp
Currently Relax\-and\-Recover supports various boot media (incl\&. ISO, PXE, OBDR tape, USB or eSATA storage), a variety of network protocols (incl\&. sftp, ftp, http, nfs, cifs) for storage and backup as well as a multitude of backup strategies (incl\&. IBM Tivoli Storage Manager, HP DataProtector, Symantec NetBackup, EMC NetWorker, EMC Avamar, FDR/Upstream, NovaBACKUP DC, Bareos, Bacula, rsync, rbme, Borg)\&. This results in a bootable image that is capable of booting via PXE, DVD/CD, bootable tape or virtual provisioning\&.
.sp
Relax\-and\-Recover was designed to be easy to set up, requires no maintenance and is there to assist when disaster strikes\&. Its setup\-and\-forget nature removes any excuses for not having a disaster recovery solution implemented\&.
.sp
Recovering from disaster is made very straight\-forward by a 2\-step recovery process so that it can be executed by operational teams when required\&. When used interactively (e\&.g\&. when used for migrating systems), menus help make decisions to restore to a new (hardware) environment\&.
.sp
Extending Relax\-and\-Recover is made possible by its modular framework\&. Consistent logging and optionally extended output help understand the concepts behind Relax\-and\-Recover and help debug during development\&.
.sp
Relax\-and\-Recover comes with ABSOLUTELY NO WARRANTY; for details see the GNU General Public License at: \m[blue]\fBhttp://www\&.gnu\&.org/licenses/gpl\&.html\fR\m[]
.SH "OPTIONS"
.SS "GLOBAL OPTIONS"
.PP
\-h \-\-help
.RS 4
usage information
.RE
.PP
\-c DIR
.RS 4
alternative config directory; instead of /etc/rear
.RE
.PP
\-C CONFIG
.RS 4
additional config file; absolute path or relative to config directory
.RE
.PP
\-d
.RS 4
\fBdebug mode\fR
(log debug messages to log file \- also sets \-v)
.RE
.PP
\-D
.RS 4
\fBdebugscript mode\fR
(log executed commands via
\fIset \-x\fR
\- also sets \-v and \-d)
.RE
.PP
\-\-debugscripts SET
.RS 4
same as \-d \-v \-D but
\fBdebugscript mode\fR
with
\fIset \-SET\fR
.RE
.PP
\-r KERNEL
.RS 4
kernel version to use (by default use running kernel)
.RE
.PP
\-s
.RS 4
\fBsimulation mode\fR
(show what scripts are run without executing them)
.RE
.PP
\-S
.RS 4
\fBstep\-by\-step mode\fR
(acknowledge each script individually)
.RE
.PP
\-v
.RS 4
\fBverbose mode\fR
(show more output and run many commands in verbose mode)
.RE
.PP
\-V \-\-version
.RS 4
version information
.RE
.SS "COMMANDS"
.PP
\fBchecklayout\fR
.RS 4
check if the disk layout has changed since the last run of mkbackup/mkrescue
.RE
.PP
\fBdump\fR
.RS 4
dump configuration and system information; please run this to verify your setup
.RE
.PP
\fBformat\fR
.RS 4
format and label USB or tape media to be used with rear;
first argument is the USB or tape device to use, eg\&.
\fI/dev/sdX\fR
or
\fI/dev/stX\fR
.RE
.PP
\fBhelp\fR
.RS 4
print full list of commands and options
.RE
.PP
\fBmkbackup\fR
.RS 4
create rescue media and backup the system (only for internal backup methods)
.RE
.PP
\fBmkbackuponly\fR
.RS 4
backup the system (only for internal backup methods) without creating rescue media
.RE
.PP
\fBmkrescue\fR
.RS 4
create rescue media only
.RE
.PP
\fBrecover\fR
.RS 4
recover the system; can be used only when running from the rescue media
.RE
.PP
\fBrestoreonly\fR
.RS 4
only restore the backup; can be used only when running from the rescue media
.RE
.PP
\fBmkopalpba\fR
.RS 4
create a pre\-boot authentication (PBA) image to boot from TCG Opal 2\-compliant self\-encrypting disks
.RE
.PP
\fBopaladmin\fR
.RS 4
administrate TCG Opal 2\-compliant self\-encrypting disks
.RE
.PP
\fBvalidate\fR
.RS 4
submit validation information
.RE
.sp
Use \fIrear \-v help\fR for more advanced commands\&.
.SH "BACKGROUND INFORMATION"
.sp
The process of bare metal disaster recovery consists of two parts:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Recreate the system layout
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Restore the data to the system
.RE
.sp
Most backup software solutions are very good at restoring data but do not support recreating the system layout\&. Relax\-and\-Recover is very good at recreating the system layout but works best when used together with supported backup software\&.
.sp
In this combination Relax\-and\-Recover recreates the system layout and calls the backup software to restore the actual data\&. Thus there is no unnecessary duplicate data storage and the Relax\-and\-Recover rescue media can be very small\&.
.sp
For demonstration and special use purposes Relax\-and\-Recover also includes an internal backup method, NETFS, which can be used to create a simple tar\&.gz archive of the system\&. For all permanent setups we recommend using something more professional for backup, either a traditional backup software (open source or commercial) or rsync with hardlink based solutions, e\&.g\&. RSYNC BACKUP MADE EASY\&.
.SH "RESCUE IMAGE CONFIGURATION"
.sp
The OUTPUT variable defines from where our bootable rescue image will be booted and the OUTPUT_URL variable defines where the rescue image should be send to\&. Possible OUTPUT settings are:
.PP
OUTPUT=\fBRAMDISK\fR
.RS 4
Create only the Relax\-and\-Recover initramfs\&.
.RE
.PP
OUTPUT=\fBISO\fR
.RS 4
\fB(Default)\fR
Create a bootable ISO9660 image on disk as
\fIrear\-$(hostname)\&.iso\fR
.RE
.PP
OUTPUT=\fBPXE\fR
.RS 4
Create on a remote PXE/NFS server the required files (such as configuration file, kernel and initrd image
.RE
.PP
OUTPUT=\fBOBDR\fR
.RS 4
Create a bootable OBDR tape (optionally including the backup archive)\&. Specify the OBDR tape device by using
TAPE_DEVICE\&.
.RE
.PP
OUTPUT=\fBUSB\fR
.RS 4
Create a bootable USB disk (using extlinux)\&. Specify the USB storage device by using
USB_DEVICE\&.
.RE
.PP
OUTPUT=\fBRAWDISK\fR
.RS 4
Create a bootable image file named "rear\-$(hostname)\&.raw\&.gz", which
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
supports UEFI boot if syslinux/EFI or Grub 2/EFI is installed,
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
supports Legacy BIOS boot if syslinux is installed,
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
supports UEFI/Legacy BIOS dual boot if syslinux
\fBand\fR
one of the supported EFI bootloaders are installed\&.
.RE
.RE
.sp
When using OUTPUT=ISO, RAMDISK, OBDR, USB, or RAWDISK you should provide the backup target location through the OUTPUT_URL variable\&. Possible OUTPUT_URL settings are:
.PP
OUTPUT_URL=\fBfile://\fR
.RS 4
Write the image to disk\&. The default is in
\fI/var/lib/rear/output/\fR\&.
.RE
.PP
OUTPUT_URL=\fBnfs://\fR
.RS 4
Write the image by mounting the target filesystem via NFS\&.
.RE
.PP
OUTPUT_URL=\fBcifs://\fR
.RS 4
Write the image by mounting the target filesystem via CIFS\&.
.RE
.PP
OUTPUT_URL=\fBfish://\fR
.RS 4
Write the image using
lftp
and the FISH protocol\&.
.RE
.PP
OUTPUT_URL=\fBftp://\fR
.RS 4
Write the image using
lftp
and the FTP protocol\&.
.RE
.PP
OUTPUT_URL=\fBftps://\fR
.RS 4
Write the image using
lftp
and the FTPS protocol\&.
.RE
.PP
OUTPUT_URL=\fBhftp://\fR
.RS 4
Write the image using
lftp
and the HFTP protocol\&.
.RE
.PP
OUTPUT_URL=\fBhttp://\fR
.RS 4
Write the image using
lftp
and the HTTP (PUT) procotol\&.
.RE
.PP
OUTPUT_URL=\fBhttps://\fR
.RS 4
Write the image using
lftp
and the HTTPS (PUT) protocol\&.
.RE
.PP
OUTPUT_URL=\fBsftp://\fR
.RS 4
Write the image using
lftp
and the secure FTP (SFTP) protocol\&.
.RE
.PP
OUTPUT_URL=\fBrsync://\fR
.RS 4
Write the image using
rsync
and the RSYNC protocol\&.
.RE
.PP
OUTPUT_URL=\fBsshfs://\fR
.RS 4
Write the image using sshfs and the SSH protocol\&.
.RE
.PP
OUTPUT_URL=\fBnull\fR
.RS 4
Do not copy the rescue image from
\fI/var/lib/rear/output/\fR
to a remote output location\&.
OUTPUT_URL=null
is useful when another program (e\&.g\&. an
\fIexternal\fR
backup program) is used to save the rescue image from the local system to a remote place, or with
BACKUP_URL=iso:///backup
when the backup is included in the rescue image to avoid a (big) copy of the rescue image at a remote output location\&. In the latter case the rescue image must be manually saved from the local system to a remote place\&.
OUTPUT_URL=null
is only supported together with
BACKUP=NETFS\&.
.RE
.sp
If you do not specify OUTPUT_URL variable then by default it will be aligned to what was defined by variable BACKUP_URL\&. And, the rescue image will then be copied to the same location as your backup of the system disk(s)\&.
.sp
The ISO_DEFAULT variable defines what default boot option is used on the rescue image\&. Possible values are manual, boothd or automatic\&. Manual will make you boot into the shell directly by default, boothd will boot to the first disk (default) or automatic will automatically start in recovery mode\&.
.SH "RESCUE IMAGE KERNEL COMMAND LINE OPTIONS"
.sp
When booting the rescue image you can edit the kernel command line\&. There are some Relax\-and\-Recover specific kernel command line options:
.PP
\fBdebug\fR
.RS 4
The rescue system start up scripts in /etc/scripts/system\-setup\&.d/ are run one by one each one after pressing
\fIEnter\fR
and the scripts are run with
\fIset \-x\fR
which prints commands and their arguments as they are executed\&.
.RE
.PP
\fBauto_recover\fR or \fBautomatic\fR
.RS 4
Launch
\fIrear recover\fR
automatically (without automated reboot)\&. Together with
\fIdebug\fR
it runs
\fIrear recover\fR
in debug mode\&.
.RE
.PP
\fBunattended\fR
.RS 4
Launch
\fIrear recover\fR
automatically as with
\fIauto_recover\fR
plus automated reboot after successful
\fIrear recover\fR\&.
.RE
.PP
\fBip= nm= netdev= gw=\fR
.RS 4
If IP address plus optionally netmask (default 255\&.255\&.255\&.0), network device (default eth0), and a default gateway are specified only that single network device is set up\&. Example:
.RE
.sp
.if n \{\
.RS 4
.\}
.nf
ip=192\&.168\&.100\&.2 nm=255\&.255\&.255\&.0 netdev=eth0 gw=192\&.168\&.100\&.1
.fi
.if n \{\
.RE
.\}
.PP
\fBnoip\fR
.RS 4
Skip network devices setup by the rescue system start up scripts (overrides ip= nm= netdev= gw=)\&.
.RE
.SH "BACKUP SOFTWARE INTEGRATION"
.sp
Currently Relax\-and\-Recover supports the following backup methods\&. Please distinguish carefully between Relax\-and\-Recover support for 3rd party backup software and Relax\-and\-Recover internal backup methods\&. The latter also creates a backup of your data while the former will only integrate Relax\-and\-Recover with the backup software to restore the data with the help of the backup software without actually creating backups\&. This means that for all non\-internal backup software you \fBmust\fR take care of creating backups yourself (unless otherwise noted)\&.
.sp
Especially the rear mkbackup command can be confusing as it is only useful for the internal backup methods and has usually no function at all with the other (external) backup methods\&.
.sp
The following backup methods need to be set in Relax\-and\-Recover with the BACKUP option\&. As mentioned we have two types of BACKUP methods \- \fIinternal\fR and \fIexternal\fR\&.
.sp
The following BACKUP methods are \fIexternal\fR of Relax\-and\-Recover meaning that usually you are responsible of backups being made:
.PP
BACKUP=\fBREQUESTRESTORE\fR
.RS 4
\fB(default)\fR
Not really a backup method at all, Relax\-and\-Recover simply halts the recovery and requests that somebody will restore the data to the appropriate location (e\&.g\&. via SSH)\&. This method works especially well with an rsync based backup that is pushed back to the backup client\&.
.RE
.PP
BACKUP=\fBEXTERNAL\fR
.RS 4
Internal backup method that uses an arbitrary external command to create a backup and restore the data\&.
.RE
.PP
BACKUP=\fBDP\fR
.RS 4
Use HP Data Protector to restore the data\&.
.RE
.PP
BACKUP=\fBFDRUPSTREAM\fR
.RS 4
Use FDR/Upstream to restore the data\&.
.RE
.PP
BACKUP=\fBGALAXY\fR
.RS 4
Use CommVault Galaxy 5 to restore the data\&.
.RE
.PP
BACKUP=\fBGALAXY7\fR
.RS 4
Use CommVault Galaxy 7 to restore the data\&.
.RE
.PP
BACKUP=\fBGALAXY10\fR
.RS 4
Use CommVault Galaxy 10 (or Simpana 10) to restore the data\&.
.RE
.PP
BACKUP=\fBNBU\fR
.RS 4
Use Symantec NetBackup to restore the data\&.
.RE
.PP
BACKUP=\fBTSM\fR
.RS 4
Use IBM Tivoli Storage Manager to restore the data\&. The Relax\-and\-Recover result files (e\&.g\&. ISO image) are also saved into TSM\&. There is a (currently experimental) first draft implementation that a TSM backup is created by calling
\fIdsmc incremental\fR
during
\fIrear mkbackup\fR\&.
.RE
.PP
BACKUP=\fBNSR\fR
.RS 4
Using EMC NetWorker (Legato) to restore the data\&.
.RE
.PP
BACKUP=\fBAVA\fR
.RS 4
Using EMC Avamar to restore the data\&.
.RE
.PP
BACKUP=\fBSESAM\fR
.RS 4
Using SEP Sesam to restore the data\&.
.RE
.PP
BACKUP=\fBNBKDC\fR
.RS 4
Using Novastor NovaBACKUP DC to restore the data\&.
.RE
.PP
BACKUP=\fBRBME\fR
.RS 4
Use Rsync Backup Made Easy (rbme) to restore the data\&.
.RE
.PP
BACKUP=\fBBAREOS\fR
.RS 4
Use Open Source backup solution BAREOS (a fork a BACULA) to restore the data\&.
.RE
.PP
BACKUP=\fBBACULA\fR
.RS 4
Use Open Source backup solution BACULA to restore the data\&.
.RE
.PP
BACKUP=\fBDUPLICITY\fR
.RS 4
Use encrypted bandwidth\-efficient backup solution using the rsync algorithm to restore the data\&.
.RE
.PP
BACKUP=\fBBORG\fR
.RS 4
Use BorgBackup (short Borg) a deduplicating backup program to restore the data\&. Executing
\fIrear mkbackup\fR
will create a Borg backup, see the section
\fIReaR with Borg back end\fR
in the ReaR user\-guide
\fIScenarios\fR
documentation\&.
.RE
.sp
The following BACKUP methods are \fIinternal\fR of Relax\-and\-Recover:
.PP
BACKUP=\fBNETFS\fR
.RS 4
Internal backup method which can be used to create a simple backup (tar archive)\&.
.RE
.PP
BACKUP=\fBRSYNC\fR
.RS 4
Use rsync to restore data\&.
.RE
.sp
If your favourite backup software is missing from this list, please submit a patch or ask us to implement it for you\&.
.sp
When using BACKUP=NETFS you must provide the backup target location through the BACKUP_URL variable\&. Possible BACKUP_URL settings are:
.PP
BACKUP_URL=\fBfile://\fR
.RS 4
To backup to local disk, use
BACKUP_URL=file:///directory/path/
.RE
.PP
BACKUP_URL=\fBnfs://\fR
.RS 4
To backup to NFS disk, use
BACKUP_URL=nfs://nfs\-server\-name/share/path
.RE
.PP
BACKUP_URL=\fBtape://\fR
.RS 4
To backup to tape device, use
BACKUP_URL=tape:///dev/nst0
or alternatively, simply define
TAPE_DEVICE=/dev/nst0
.RE
.PP
BACKUP_URL=\fBrsync://\fR
.RS 4
When backup method
BACKUP=RSYNC
is chosen then we need to define a corresponding
BACKUP_URL
rule:
.sp
.if n \{\
.RS 4
.\}
.nf
BACKUP_URL=rsync://[user@]host[:port]/path
BACKUP_URL=rsync://[user@]host[:port]::/path
.fi
.if n \{\
.RE
.\}
.RE
.PP
BACKUP_URL=\fBcifs://\fR
.RS 4
To backup to a Samba share (CIFS), use
BACKUP_URL=cifs://cifs\-server\-name/share/path\&. To provide credentials for CIFS mounting use a
\fI/etc/rear/cifs\fR
credentials file and define
BACKUP_OPTIONS="cred=/etc/rear/cifs"
and pass along:
.sp
.if n \{\
.RS 4
.\}
.nf
username=_username_
password=_secret password_
domain=_domain_
.fi
.if n \{\
.RE
.\}
.RE
.PP
BACKUP_URL=\fBusb://\fR
.RS 4
To backup to USB storage device, use
BACKUP_URL=usb:///dev/disk/by\-path/REAR\-000
or use a real device node or a specific filesystem label\&. Alternatively, you can specify the device using
USB_DEVICE=/dev/disk/by\-path/REAR\-000\&.
.sp
If you combine this with
OUTPUT=USB
you will end up with a bootable USB device\&.
.RE
.PP
BACKUP_URL=\fBsshfs://\fR
.RS 4
To backup to a remote server via sshfs (SSH protocol), use
BACKUP_URL=sshfs://user@remote\-system\&.name\&.org/home/user/backup\-dir/
.sp
It is advisable to add
\fBServerAliveInterval 15\fR
in the
/root/\&.ssh/config
file for the remote system (remote\-system\&.name\&.org)\&.
.RE
.PP
BACKUP_URL=\fBiso://\fR
.RS 4
To include the backup within the ISO image\&. It is important that the
BACKUP_URL
and
OUTPUT_URL
variables are different\&. E\&.g\&.
.sp
.if n \{\
.RS 4
.\}
.nf
BACKUP_URL=iso:///backup/
OUTPUT_URL=nfs://server/path/
.fi
.if n \{\
.RE
.\}
.RE
.sp
When using BACKUP=NETFS and BACKUP_PROG=tar there is an option to select BACKUP_TYPE=incremental or BACKUP_TYPE=differential to let rear make incremental or differential backups until the next full backup day e\&.g\&. via FULLBACKUPDAY="Mon" is reached or when the last full backup is too old after FULLBACKUP_OUTDATED_DAYS has passed\&. Incremental or differential backup is currently only known to work with BACKUP_URL=nfs\&. Other BACKUP_URL schemes may work but at least BACKUP_URL=usb requires USB_SUFFIX to be set to work with incremental or differential backup\&.
.SH "SUPPORT FOR SELF-ENCRYPTING DISKS"
.sp
Relax\-and\-Recover supports self\-encrypting disks (SEDs) compliant with the TCG Opal 2 specification if the sedutil\-cli executable is installed\&.
.sp
Self\-encrypting disk support includes
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
recovery (saving and restoring the system\(cqs SED configuration),
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
setting up SEDs, including assigning a disk password,
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
providing a pre\-boot authentication (PBA) system to unlock SEDs at boot time\&.
.RE
.sp
To prepare booting from an SED, run rear mkopalpba, then create the rescue system\&.
.sp
To set up an SED, boot the Relax\-and\-Recover rescue system and run `rear opaladmin setupERASE DEVICE` (\fIDEVICE\fR being the disk device path like /dev/sda)\&.
.sp
For complete information, consult the section "Support for TCG Opal 2\-compliant Self\-Encrypting Disks" in the Relax\-and\-Recover user guide\&.
.SH "CONFIGURATION"
.sp
To configure Relax\-and\-Recover you have to edit the configuration files in \fI/etc/rear/\fR\&. All \fI*\&.conf\fR files there are part of the configuration, but only \fIsite\&.conf\fR and \fIlocal\&.conf\fR are intended for the user configuration\&. All other configuration files hold defaults for various distributions and should not be changed\&.
.sp
In \fI/etc/rear/templates/\fR there are also some template files which are used by Relax\-and\-Recover to create configuration files (mostly for the boot environment)\&. Modify the templates to adjust the information contained in the emails produced by Relax\-and\-Recover\&. You can use these templates to prepend your own configurations to the configuration files created by Relax\-and\-Recover, for example you can edit \fIPXE_pxelinux\&.cfg\fR to add some general pxelinux configuration you use\&.
.sp
In almost all circumstances you have to configure two main settings and their parameters: The backup method and the output method\&.
.sp
The backup method defines, how your data was saved and whether Relax\-and\-Recover should backup your data as part of the mkrescue process or whether you use an external application, e\&.g\&. backup software to archive your data\&.
.sp
The output method defines how the rescue system is written to disk and how you plan to boot the failed computer from the rescue system\&.
.sp
See the default configuration file \fI/usr/share/rear/conf/default\&.conf\fR for an overview of the possible methods and their options\&.
.sp
An example to use TSM for backup and ISO for output would be to add these lines to \fI/etc/rear/local\&.conf\fR (no need to define a BACKUP_URL when using an external backup solution):
.sp
.if n \{\
.RS 4
.\}
.nf
BACKUP=TSM
OUTPUT=ISO
.fi
.if n \{\
.RE
.\}
.sp
And if all your systems use NTP for time synchronisation, you can also add these lines to \fI/etc/rear/site\&.conf\fR
.sp
.if n \{\
.RS 4
.\}
.nf
TIMESYNC=NTP
.fi
.if n \{\
.RE
.\}
.sp
Do not forget to distribute the \fIsite\&.conf\fR to all your systems\&.
.sp
The resulting ISO image will be created in \fI/var/lib/rear/output/\fR\&. You can now modify the behaviour by copying the appropriate configuration variables from \fIdefault\&.conf\fR to \fIlocal\&.conf\fR and changing them to suit your environment\&.
.SH "EXIT STATUS"
.PP
0
.RS 4
Successful program execution\&.
.RE
.PP
>0
.RS 4
Usage, syntax or execution errors\&. Check the log file in
\fI/var/log/rear/\fR
for more information\&.
.RE
.SH "EXAMPLES"
.sp
To print out the current settings for BACKUP and OUTPUT methods and some system information\&. This command can be used to see the supported features for the given release and platform\&.
.sp
.if n \{\
.RS 4
.\}
.nf
# rear dump
.fi
.if n \{\
.RE
.\}
.sp
To create a new rescue environment\&. Do not forget to copy the resulting rescue system away so that you can use it in the case of a system failure\&.
.sp
.if n \{\
.RS 4
.\}
.nf
# rear \-v mkrescue
.fi
.if n \{\
.RE
.\}
.sp
To create a new rescue image together with a complete archive of your local system run the command:
.sp
.if n \{\
.RS 4
.\}
.nf
# rear \-v mkbackup
.fi
.if n \{\
.RE
.\}
.SH "FILES"
.PP
/usr/sbin/rear
.RS 4
The program itself\&.
.RE
.PP
/etc/rear/local\&.conf
.RS 4
System specific configuration can be set here\&.
.RE
.PP
/etc/rear/site\&.conf
.RS 4
Site specific configuration can be set here (not created by default)\&.
.RE
.PP
/var/log/rear/
.RS 4
Directory holding the log files\&.
.RE
.PP
/tmp/rear\&.####
.RS 4
Relax\-and\-Recover working directory\&. If Relax\-and\-Recover exits with an error, you must remove this directory manually\&.
.RE
.PP
/usr/share/rear
.RS 4
Relax\-and\-Recover script components\&.
.RE
.PP
/usr/share/rear/conf/default\&.conf
.RS 4
Relax\-and\-Recover default values\&. Contains a complete set of parameters and its explanation\&. Please do not edit or modify\&. Copy values to
\fIlocal\&.conf\fR
or
\fIsite\&.conf\fR
instead\&.
.RE
.SH "BUGS"
.sp
Feedback is welcome, please report any issues or improvements to our issue\-tracker at: \m[blue]\fBhttp://github\&.com/rear/issues/\fR\m[]
.sp
Furthermore, we welcome pull requests via GitHub\&.
.SH "SEE ALSO"
.sp
Relax\-and\-Recover comes with extensive documentation located in \fI/usr/share/doc\fR\&.
.SH "AUTHORS"
.sp
The ReaR project was initiated in 2006 by Schlomo Schapiro (\m[blue]\fBhttps://github\&.com/schlomo\fR\m[]) and Gratien D\(cqhaese (\m[blue]\fBhttps://github\&.com/gdha\fR\m[]) and has since then seen a lot of contributions by many authors\&. As ReaR deals with bare metal disaster recovery, there is a large amount of code that was contributed by owners and users of specialized hardware and software\&. Without their combined efforts and contributions ReaR would not be the universal Linux bare metal disaster recovery solution that it is today\&.
.sp
As time passed the project was lucky to get the support of additional developers to also help as maintainers: Dag Wieers (\m[blue]\fBhttps://github\&.com/dagwieers\fR\m[]), Jeroen Hoekx (\m[blue]\fBhttps://github\&.com/jhoekx\fR\m[]), Johannes Meixner (\m[blue]\fBhttps://github\&.com/jsmeix\fR\m[]), Vladimir Gozora (\m[blue]\fBhttps://github\&.com/gozora\fR\m[]) and S\('ebastien Chabrolles (\m[blue]\fBhttps://github\&.com/schabrolles\fR\m[])\&. We hope that ReaR continues to prove useful and to attract more developers who agree to be maintainers\&. Please refer to the MAINTAINERS (\m[blue]\fBhttps://github\&.com/rear/rear/blob/master/MAINTAINERS\fR\m[]) file for the list of active and past maintainers\&.
.sp
To see the full list of authors and their contributions please look at the git history (\m[blue]\fBhttps://github\&.com/rear/rear/graphs/contributors\fR\m[])\&. We are very thankful to all authors and encourage anybody interested to take a look at our source code and to contribute what you find important\&.
.sp
Relax\-and\-Recover is a collaborative process using Github at \m[blue]\fBhttp://github\&.com/rear/\fR\m[]
.sp
The Relax\-and\-Recover website is located at: \m[blue]\fBhttp://relax\-and\-recover\&.org/\fR\m[]
.SH "COPYRIGHT"
.sp
(c) 2006\-2018
.sp
The copyright is held by the original authors of the respective code pieces as can be seen in the git history at \m[blue]\fBhttps://github\&.com/rear/rear/graphs/contributors\fR\m[]
.sp
Relax\-and\-Recover comes with ABSOLUTELY NO WARRANTY; for details see the GNU General Public License at \m[blue]\fBhttp://www\&.gnu\&.org/licenses/gpl\&.html\fR\m[]