Debian Codegraph @

doc/user-guide/03-configuration.adoc

raw
1 = Configuration
2
3 // FIXME: add a picture with a simple overview to explain the diff
4 // between BACKUP and OUTPUT schemes
5
6 The configuration is performed by changing _/etc/rear/local.conf_ or
7 _/etc/rear/site.conf_.
8
9 There are two important variables that influence Relax-and-Recover and
10 the rescue image. Set +OUTPUT+ to your preferred boot method and define
11 +BACKUP+ for your favorite +BACKUP+ strategy.
12
13 In most cases only these two settings are required.
14
15
16 == Rescue media (OUTPUT)
17 The +OUTPUT+ variable defines where the rescue image should be sent to.
18 Possible +OUTPUT+ setting are:
19
20 OUTPUT=RAMDISK::
21 Copy the kernel and the initramfs containing the rescue system to a selected
22 location.
23
24 OUTPUT=ISO::
25 Create a bootable ISO9660 image on disk as _rear-$(hostname).iso_
26
27 OUTPUT=PXE::
28 Create on a remote PXE/NFS server the required files (such as configuration
29 file, kernel and initrd image)
30
31 OUTPUT=OBDR::
32 Create a bootable OBDR tape including the backup archive. Specify the OBDR
33 tape device by using +TAPE_DEVICE+.
34
35 OUTPUT=USB::
36 Create a bootable USB disk (using extlinux). Specify the USB storage device by
37 using +USB_DEVICE+.
38
39 OUTPUT=RAWDISK::
40 Create a bootable raw disk image on as `rear-$(hostname).raw.gz`. Supports UEFI
41 boot if syslinux/EFI or Grub 2/EFI is installed. Supports Legacy BIOS boot if
42 syslinux is installed. Supports UEFI/Legacy BIOS dual boot if syslinux _and_ one
43 of the supported EFI bootloaders are installed.
44
45 === Using OUTPUT_URL with ISO, RAMDISK or RAWDISK output methods
46 When using +OUTPUT=ISO+, +OUTPUT=RAMDISK+ or +OUTPUT=RAWDISK+ you should provide
47 the backup target location through the +OUTPUT_URL+ variable. Possible
48 +OUTPUT_URL+ settings are:
49
50 OUTPUT_URL=file://::
51 Write the ISO image to disk. The default is in _/var/lib/rear/output/_.
52
53 OUTPUT_URL=fish//::
54 Write the ISO image using +lftp+ and the FISH protocol.
55
56 OUTPUT_URL=ftp://::
57 Write the ISO image using +lftp+ and the FTP protocol.
58
59 OUTPUT_URL=ftps://::
60 Write the ISO image using +lftp+ and the FTPS protocol.
61
62 OUTPUT_URL=hftp://::
63 Write the ISO image using +lftp+ and the HFTP protocol.
64
65 OUTPUT_URL=http://::
66 Write the ISO image using +lftp+ and the HTTP (PUT) protocol.
67
68 OUTPUT_URL=https://::
69 Write the ISO image using +lftp+ and the HTTPS (PUT) protocol.
70
71 OUTPUT_URL=nfs://::
72 Write the ISO image using +nfs+ and the NFS protocol.
73
74 OUTPUT_URL=sftp://::
75 Write the ISO image using +lftp+ and the secure FTP (SFTP) protocol.
76
77 OUTPUT_URL=rsync://::
78 Write the ISO image using +rsync+ and the RSYNC protocol.
79
80 OUTPUT_URL=sshfs://::
81 Write the image using sshfs and the SSH protocol.
82
83 OUTPUT_URL=null::
84 Do not copy the ISO image from _/var/lib/rear/output/_ to a remote output location.
85 +OUTPUT_URL=null+ is useful when another program (e.g. an _external_ backup program)
86 is used to save the ISO image from the local system to a remote place,
87 or with +BACKUP_URL=iso:///backup+ when the backup is included in the ISO image
88 to avoid a (big) copy of the ISO image at a remote output location.
89 In the latter case the ISO image must be manually saved from the local system to a remote place.
90 +OUTPUT_URL=null+ is only supported together with +BACKUP=NETFS+.
91
92 The default boot option of the created ISO is boothd / "boot from first harddisk". If you want to change this,
93 e.g. because you integrate REAR into some automation process, you can change the default using
94 _ISO_DEFAULT={manual,automatic,boothd}_
95
96
97 == Backup/Restore strategy (BACKUP)
98 The +BACKUP+ setting defines our backup/restore strategy. The +BACKUP+ can be handled via internal archive executable (+tar+ or +rsync+) or by an external backup program (commercial or open source).
99
100 Possible +BACKUP+ settings are:
101
102 BACKUP=TSM::
103 Use IBM Tivoli Storage Manager programs
104
105 BACKUP=DP::
106 Use Micro Focus Data Protector programs
107
108 BACKUP=FDRUPSTREAM::
109 Use FDR/Upstream
110
111 BACKUP=NBU::
112 Use Symantec NetBackup programs
113
114 BACKUP=NSR::
115 Use EMC NetWorker (Legato)
116
117 BACKUP=PPDM::
118 Use Dell PowerProtect Data Manager
119
120 BACKUP=BACULA::
121 Use Bacula programs
122
123 BACKUP=BAREOS::
124 Use Bareos fork of Bacula
125
126 BAREOS_FILESET=Full
127 Only if you have more than one fileset defined for your clients backup jobs, you need to specify which
128 to use for restore
129
130 BACKUP=GALAXY::
131 Use CommVault Galaxy (5, probably 6)
132
133 BACKUP=GALAXY7::
134 Use CommVault Galaxy (7 and probably newer)
135
136 BACKUP=GALAXY10::
137 Use CommVault Galaxy 10 (or Simpana 10)
138
139 BACKUP=BORG::
140 Use BorgBackup (short Borg) a deduplicating backup program to restore the data.
141
142 BACKUP=NETFS::
143 Use Relax-and-Recover internal backup with tar or rsync (or similar).
144 When using +BACKUP=NETFS+ and +BACKUP_PROG=tar+ there is an option to select
145 +BACKUP_TYPE=incremental+ or +BACKUP_TYPE=differential+ to let rear make
146 incremental or differential backups until the next full backup day
147 e.g. via +FULLBACKUPDAY="Mon"+ is reached or when the last full backup
148 is too old after FULLBACKUP_OUTDATED_DAYS has passed.
149 Incremental or differential backup is currently only known to work
150 with +BACKUP_URL=nfs+. Other BACKUP_URL schemes may work but
151 at least +BACKUP_URL=usb+ requires USB_SUFFIX to be set
152 to work with incremental or differential backup.
153
154 BACKUP=REQUESTRESTORE::
155 No backup, just ask user to somehow restore the filesystems.
156
157 BACKUP=EXTERNAL::
158 Use a custom strategy by providing backup and restore commands.
159
160 BACKUP=DUPLICITY::
161 Use duplicity to manage backup (see http://duplicity.nongnu.org). Additionally if duply
162 (see http://duply.net) is also installed while generating the rescue images it is
163 part of the image.
164
165 BACKUP=RBME::
166 Use Rsync Backup Made Easy (rbme) to restore the data.
167
168 BACKUP=RSYNC::
169 Use rsync to foresee in backup and restore of your system disks.
170
171 BACKUP=BLOCKCLONE::
172 Backup block devices using dd or ntfsclone
173
174 == Using NETFS as backup strategy (internal archive method)
175 When using +BACKUP=NETFS+ you should provide the backup target location through
176 the +BACKUP_URL+ variable. Possible +BACKUP_URL+ settings are:
177
178 BACKUP_URL=file://::
179 To backup to local disk, use +BACKUP_URL=file:///directory/path/+
180
181 BACKUP_URL=nfs://::
182 To backup to NFS disk, use +BACKUP_URL=nfs://nfs-server-name/share/path+
183
184 BACKUP_URL=tape://::
185 To backup to tape device, use +BACKUP_URL=tape:///dev/nst0+ or alternatively,
186 simply define +TAPE_DEVICE=/dev/nst0+
187
188 BACKUP_URL=cifs://::
189 To backup to a Samba share (CIFS), use
190 +BACKUP_URL=cifs://cifs-server-name/share/path+. To provide credentials for
191 CIFS mounting use a _/etc/rear/cifs_ credentials file and define
192 +BACKUP_OPTIONS="cred=/etc/rear/cifs"+ and pass along:
193 +
194 ----
195 username=_username_
196 password=_secret password_
197 domain=_domain_
198 ----
199
200 BACKUP_URL=sshfs://::
201 To backup over the network with the help of sshfs. You need the fuse-sshfs package before you can use FUSE-Filesystem to access remote filesystems via SSH. An example of defining the +BACKUP_URL+ could be:
202 +
203 ----
204 BACKUP_URL=sshfs://root@server/export/archives
205 ----
206
207
208 BACKUP_URL=usb://::
209 To backup to USB storage device, use +BACKUP_URL=usb:///dev/disk/by-label/REAR-000+
210 or use a real device node or a specific filesystem label. Alternatively, you
211 can specify the device using +USB_DEVICE=/dev/disk/by-label/REAR-000+.
212 +
213 If you combine this with +OUTPUT=USB+ you will end up with a bootable USB device.
214
215 Optional settings:
216
217 BACKUP_PROG=rsync::
218 If you want to use rsync instead of tar (only for +BACKUP=NETFS+). Do not confuse this with the +BACKUP=RSYNC+ backup mechanism.
219
220 NETFS_KEEP_OLD_BACKUP_COPY=y::
221 If you want to keep the previous backup archive.
222 Incremental or differential backup and NETFS_KEEP_OLD_BACKUP_COPY contradict each other so that
223 +NETFS_KEEP_OLD_BACKUP_COPY+ must not be 'true' in case of incremental or differential backup.
224
225 Another point of interest is the +ISO_DIR+ variable to choose another location of the ISO image instead of the default location (+/var/lib/rear/output+).
226
227 NOTE: With +USB+ we refer to all kinds of external storage devices, like USB
228 keys, USB disks, eSATA disks, ZIP drives, etc...
229
230 == Using RSYNC as backup mechanism
231 When using +BACKUP=RSYNC+ you should provide the backup target location through
232 the +BACKUP_URL+ variable. Possible +BACKUP_URL+ settings are:
233
234 BACKUP_URL=rsync://root@server/export/archives
235 BACKUP_URL=rsync://root@server::/export/archives