Procházet zdrojové kódy

Update the backup documentation

Bob Mottram před 9 roky
rodič
revize
c39658870b
2 změnil soubory, kde provedl 99 přidání a 80 odebrání
  1. 30
    26
      doc/EN/backups.org
  2. 69
    54
      website/EN/backups.html

+ 30
- 26
doc/EN/backups.org Zobrazit soubor

@@ -11,12 +11,24 @@
11 11
 #+BEGIN_CENTER
12 12
 #+ATTR_HTML: :border -1
13 13
 | [[file:index.html][Home]]                  |
14
+| [[Backup keys]]           |
14 15
 | [[Backup to USB]]         |
15 16
 | [[Restore from USB]]      |
16 17
 | [[Distributed backups]]   |
17 18
 | [[Restore from a friend]] |
18 19
 #+END_CENTER
19 20
 
21
+* Backup keys
22
+As part of the Freedombone installation the GPG key used to encrypt backups will have been added to the /.gnupg/ keyring in your home directory. Ensure that you have a copy of all your keys by plugging in a LUKS encrypted USB drive and then running the command:
23
+
24
+#+BEGIN_SRC bash
25
+ssh username@domainname -p 2222
26
+freedombone-keydrive -u [username] --master
27
+#+END_SRC
28
+
29
+Keep this USB drive in some safe place, since it will enable you to restore from previous backups.
30
+
31
+A pro-tip for the best possible security is to create multiple USB drives containing key fragments, and then to distribute them amongst your friends. In the worst case just ask for the drives back and you'll be able to reconstruct the backup key. You can do this by ommitting the /--master/ option in the above command and then repeating the process with a number of different USB drives (typically 4 or more).
20 32
 * Backup to USB
21 33
 First and foremost - *encrypt your USB drives*! Even if you think you have "/nothing to hide/" if you accidentally lose a USB thumb drive (it's easy to lose small objects) and it's not encrypted then potentially someone might be able to obtain enough information about you to commit identity fraud, take out loans, open bank accounts, etc. Use LUKS encryption. In Ubuntu you can do this using the /Disk Utility/ application. Some instructions [[https://help.ubuntu.com/community/EncryptedFilesystemsOnRemovableStorage][can be found here]].
22 34
 
@@ -30,47 +42,43 @@ su
30 42
 backup
31 43
 #+END_SRC
32 44
 
33
-Type in the password for the USB drive, then if this is the first time that you've made a backup then you will be prompted for your GPG key passphrase.
45
+Type in the password for the USB drive, then the backup will begin.
34 46
 
35 47
 When the backup ends remove the USB drive and keep it somewhere safe. Even if it gets lost or falls into the wrong hands the content is encrypted and so is unlikely to become a source of leaks.
36 48
 * Restore from USB
37
-Insert the USB thumb drive containing your backup into the front socket of the Beaglebone Black.
38
-
39
-Log into the system and become the root user, then run the /restore/ command.
49
+Log into the system and become the root user:
40 50
 
41 51
 #+BEGIN_SRC bash
42 52
 ssh username@domainname -p 2222
43 53
 su
44
-restore
45 54
 #+END_SRC
46 55
 
47
-Enter the password for the USB drive, then you will be prompted to enter your GPG key passphrase. When the restore is complete you can remove the USB drive.
48
-* Distributed backups
49
-Distributed backups are a better way of ensuring the persistence of your data, such that even if your system gets stolen or destroyed then the data will still be recoverable from your friends. Since the backups are encrypted your friends (or anyone else with access to their systems) won't be able to read your backed up content even if their systems are subsequently compromised.
50
-
51
-Firstly you will need to have a user account on one or more of your friends servers.  They don't necessarily need to be using Freedombone, just some version of GNU/Linux with ssh access.  They can create a user account for you with the *adduser <username>* command when logged in as root and then give you the username and password via a secure method, such as on paper or via an encrypted email or via an XMPP chat using OTR. Make sure that the password used is a strong one - preferably a long random string stored in a password manager - so that dictionary attacks will fail. Also for maximum resilience put your password manager file onto a USB thumb drive and carry it with you.
56
+If this is a new Freedombone installation then you will first need to restore your backup keys. That can be done as follows:
52 57
 
53 58
 #+BEGIN_SRC bash
54
-ssh username@domainname -p 2222
55
-freedombone-remote
59
+freedombone-recoverkey -u [username] --master
56 60
 #+END_SRC
57 61
 
58
-You can then enter the usernames, domains and ssh logins for one or more remote servers. The system will try to backup to these remote locations once per day.
62
+Insert the USB thumb drive containing your backup into the front socket of the Beaglebone Black.
59 63
 
60
-Very important is to take a copy of the contents of *backup.key*.
64
+Log into the system and become the root user, then run the /restore/ command.
61 65
 
62 66
 #+BEGIN_SRC bash
63
-su
64
-cat /etc/ssl/private/backup.key
67
+restore
65 68
 #+END_SRC
66 69
 
67
-If the backup key doesn't yet exist then you can manually create it with:
70
+Enter the password for the USB drive. When the restore is complete you can remove the USB drive.
71
+* Distributed backups
72
+Distributed backups are a better way of ensuring the persistence of your data, such that even if your system gets stolen or destroyed then the data will still be recoverable from your friends. Since the backups are encrypted your friends (or anyone else with access to their systems) won't be able to read your backed up content even if their systems are subsequently compromised.
73
+
74
+Firstly you will need to have a user account on one or more of your friends servers.  They don't necessarily need to be using Freedombone, just some version of GNU/Linux with ssh access.  They can create a user account for you with the *adduser <username>* command when logged in as root and then give you the username and password via a secure method, such as on paper or via an encrypted email or via an XMPP chat using OTR. Make sure that the password used is a strong one - preferably a long random string stored in a password manager - so that dictionary attacks not be easy. Also for maximum resilience put your password manager file onto a USB thumb drive and carry it with you.
68 75
 
69 76
 #+BEGIN_SRC bash
70
-freedombone-addcert -h backup
77
+ssh username@domainname -p 2222
78
+freedombone-remote
71 79
 #+END_SRC
72 80
 
73
-Store it within a password manager on a USB drive which you carry with you. In the worst case scenario you'll be able to restore your system on completely new hardware if you have this key, so long as at least one of your friends servers is accessable via ssh.
81
+You can then enter the usernames, domains and ssh logins for one or more remote servers. The system will try to backup to these remote locations once per day.
74 82
 * Restore from a friend
75 83
 ** With a completely new Freedombone installation
76 84
 This is the ultimate disaster recovery scenario in which you are beginning completely from scratch with new hardware and a new Freedombone installation (configured with the same username and domain names). It is assumed that the old hardware was destroyed, but that you have the backup key stored within a password manager on a USB thumb drive.
@@ -84,18 +92,14 @@ freedombone-remote
84 92
 
85 93
 Configure the remote server login details.
86 94
 
87
-Now log in as root and restore the backup key which you have in your password manager.
95
+Now plug in the USB drive containing the backup key and restore it.
88 96
 
89 97
 #+BEGIN_SRC bash
90 98
 su
91
-editor /etc/ssl/private/backup.key
99
+freedombone-recoverkey -u [username] --master
92 100
 #+END_SRC
93 101
 
94
-Paste in the backup key, then save and exit.
95
-
96
-#+BEGIN_SRC bash
97
-chmod 600 /etc/ssl/private/backup.key
98
-#+END_SRC
102
+If you are recovering from multiple USB drives containing key fragments then just ommit the /--master/ option in the above command.
99 103
 
100 104
 Then use the command:
101 105
 

+ 69
- 54
website/EN/backups.html Zobrazit soubor

@@ -4,7 +4,7 @@
4 4
 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
5 5
 <head>
6 6
 <title></title>
7
-<!-- 2015-07-05 Sun 20:29 -->
7
+<!-- 2015-09-29 Tue 10:21 -->
8 8
 <meta  http-equiv="Content-Type" content="text/html;charset=utf-8" />
9 9
 <meta  name="generator" content="Org-mode" />
10 10
 <meta  name="author" content="Bob Mottram" />
@@ -175,134 +175,155 @@ for the JavaScript code in this tag.
175 175
 </tr>
176 176
 
177 177
 <tr>
178
-<td class="org-left"><a href="#orgheadline1">Backup to USB</a></td>
178
+<td class="org-left"><a href="#orgheadline1">Backup keys</a></td>
179 179
 </tr>
180 180
 
181 181
 <tr>
182
-<td class="org-left"><a href="#orgheadline2">Restore from USB</a></td>
182
+<td class="org-left"><a href="#orgheadline2">Backup to USB</a></td>
183 183
 </tr>
184 184
 
185 185
 <tr>
186
-<td class="org-left"><a href="#orgheadline3">Distributed backups</a></td>
186
+<td class="org-left"><a href="#orgheadline3">Restore from USB</a></td>
187 187
 </tr>
188 188
 
189 189
 <tr>
190
-<td class="org-left"><a href="#orgheadline4">Restore from a friend</a></td>
190
+<td class="org-left"><a href="#orgheadline4">Distributed backups</a></td>
191
+</tr>
192
+
193
+<tr>
194
+<td class="org-left"><a href="#orgheadline5">Restore from a friend</a></td>
191 195
 </tr>
192 196
 </tbody>
193 197
 </table>
194 198
 </div>
195 199
 
196 200
 <div id="outline-container-orgheadline1" class="outline-2">
197
-<h2 id="orgheadline1">Backup to USB</h2>
201
+<h2 id="orgheadline1">Backup keys</h2>
198 202
 <div class="outline-text-2" id="text-orgheadline1">
199 203
 <p>
200
-First and foremost - <b>encrypt your USB drives</b>! Even if you think you have "<i>nothing to hide</i>" if you accidentally lose a USB thumb drive (it's easy to lose small objects) and it's not encrypted then potentially someone might be able to obtain enough information about you to commit identity fraud, take out loans, open bank accounts, etc. Use LUKS encryption. In Ubuntu you can do this using the <i>Disk Utility</i> application. Some instructions <a href="https://help.ubuntu.com/community/EncryptedFilesystemsOnRemovableStorage">can be found here</a>.
201
-</p>
202
-
203
-<p>
204
-Insert a USB thumb drive into the front socket of the Beaglebone Black.
205
-</p>
206
-
207
-<p>
208
-Log into the system and become the root user, then run the <i>backup</i> command.
204
+As part of the Freedombone installation the GPG key used to encrypt backups will have been added to the <i>.gnupg</i> keyring in your home directory. Ensure that you have a copy of all your keys by plugging in a LUKS encrypted USB drive and then running the command:
209 205
 </p>
210 206
 
211 207
 <div class="org-src-container">
212 208
 
213 209
 <pre class="src src-bash">ssh username@domainname -p 2222
214
-su
215
-backup
210
+freedombone-keydrive -u [username] --master
216 211
 </pre>
217 212
 </div>
218 213
 
219 214
 <p>
220
-Type in the password for the USB drive, then if this is the first time that you've made a backup then you will be prompted for your GPG key passphrase.
215
+Keep this USB drive in some safe place, since it will enable you to restore from previous backups.
221 216
 </p>
222 217
 
223 218
 <p>
224
-When the backup ends remove the USB drive and keep it somewhere safe. Even if it gets lost or falls into the wrong hands the content is encrypted and so is unlikely to become a source of leaks.
219
+A pro-tip for the best possible security is to create multiple USB drives containing key fragments, and then to distribute them amongst your friends. In the worst case just ask for the drives back and you'll be able to reconstruct the backup key. You can do this by ommitting the <i>&#x2013;master</i> option in the above command and then repeating the process with a number of different USB drives (typically 4 or more).
225 220
 </p>
226 221
 </div>
227 222
 </div>
228 223
 <div id="outline-container-orgheadline2" class="outline-2">
229
-<h2 id="orgheadline2">Restore from USB</h2>
224
+<h2 id="orgheadline2">Backup to USB</h2>
230 225
 <div class="outline-text-2" id="text-orgheadline2">
231 226
 <p>
232
-Insert the USB thumb drive containing your backup into the front socket of the Beaglebone Black.
227
+First and foremost - <b>encrypt your USB drives</b>! Even if you think you have "<i>nothing to hide</i>" if you accidentally lose a USB thumb drive (it's easy to lose small objects) and it's not encrypted then potentially someone might be able to obtain enough information about you to commit identity fraud, take out loans, open bank accounts, etc. Use LUKS encryption. In Ubuntu you can do this using the <i>Disk Utility</i> application. Some instructions <a href="https://help.ubuntu.com/community/EncryptedFilesystemsOnRemovableStorage">can be found here</a>.
233 228
 </p>
234 229
 
235 230
 <p>
236
-Log into the system and become the root user, then run the <i>restore</i> command.
231
+Insert a USB thumb drive into the front socket of the Beaglebone Black.
232
+</p>
233
+
234
+<p>
235
+Log into the system and become the root user, then run the <i>backup</i> command.
237 236
 </p>
238 237
 
239 238
 <div class="org-src-container">
240 239
 
241 240
 <pre class="src src-bash">ssh username@domainname -p 2222
242 241
 su
243
-restore
242
+backup
244 243
 </pre>
245 244
 </div>
246 245
 
247 246
 <p>
248
-Enter the password for the USB drive, then you will be prompted to enter your GPG key passphrase. When the restore is complete you can remove the USB drive.
247
+Type in the password for the USB drive, then the backup will begin.
248
+</p>
249
+
250
+<p>
251
+When the backup ends remove the USB drive and keep it somewhere safe. Even if it gets lost or falls into the wrong hands the content is encrypted and so is unlikely to become a source of leaks.
249 252
 </p>
250 253
 </div>
251 254
 </div>
252 255
 <div id="outline-container-orgheadline3" class="outline-2">
253
-<h2 id="orgheadline3">Distributed backups</h2>
256
+<h2 id="orgheadline3">Restore from USB</h2>
254 257
 <div class="outline-text-2" id="text-orgheadline3">
255 258
 <p>
256
-Distributed backups are a better way of ensuring the persistence of your data, such that even if your system gets stolen or destroyed then the data will still be recoverable from your friends. Since the backups are encrypted your friends (or anyone else with access to their systems) won't be able to read your backed up content even if their systems are subsequently compromised.
259
+Log into the system and become the root user:
257 260
 </p>
258 261
 
262
+<div class="org-src-container">
263
+
264
+<pre class="src src-bash">ssh username@domainname -p 2222
265
+su
266
+</pre>
267
+</div>
268
+
259 269
 <p>
260
-Firstly you will need to have a user account on one or more of your friends servers.  They don't necessarily need to be using Freedombone, just some version of GNU/Linux with ssh access.  They can create a user account for you with the <b>adduser &lt;username&gt;</b> command when logged in as root and then give you the username and password via a secure method, such as on paper or via an encrypted email or via an XMPP chat using OTR. Make sure that the password used is a strong one - preferably a long random string stored in a password manager - so that dictionary attacks will fail. Also for maximum resilience put your password manager file onto a USB thumb drive and carry it with you.
270
+If this is a new Freedombone installation then you will first need to restore your backup keys. That can be done as follows:
261 271
 </p>
262 272
 
263 273
 <div class="org-src-container">
264 274
 
265
-<pre class="src src-bash">ssh username@domainname -p 2222
266
-freedombone-remote
275
+<pre class="src src-bash">freedombone-recoverkey -u [username] --master
267 276
 </pre>
268 277
 </div>
269 278
 
270 279
 <p>
271
-You can then enter the usernames, domains and ssh logins for one or more remote servers. The system will try to backup to these remote locations once per day.
280
+Insert the USB thumb drive containing your backup into the front socket of the Beaglebone Black.
272 281
 </p>
273 282
 
274 283
 <p>
275
-Very important is to take a copy of the contents of <b>backup.key</b>.
284
+Log into the system and become the root user, then run the <i>restore</i> command.
276 285
 </p>
277 286
 
278 287
 <div class="org-src-container">
279 288
 
280
-<pre class="src src-bash">su
281
-cat /etc/ssl/private/backup.key
289
+<pre class="src src-bash">restore
282 290
 </pre>
283 291
 </div>
284 292
 
285 293
 <p>
286
-If the backup key doesn't yet exist then you can manually create it with:
294
+Enter the password for the USB drive. When the restore is complete you can remove the USB drive.
295
+</p>
296
+</div>
297
+</div>
298
+<div id="outline-container-orgheadline4" class="outline-2">
299
+<h2 id="orgheadline4">Distributed backups</h2>
300
+<div class="outline-text-2" id="text-orgheadline4">
301
+<p>
302
+Distributed backups are a better way of ensuring the persistence of your data, such that even if your system gets stolen or destroyed then the data will still be recoverable from your friends. Since the backups are encrypted your friends (or anyone else with access to their systems) won't be able to read your backed up content even if their systems are subsequently compromised.
303
+</p>
304
+
305
+<p>
306
+Firstly you will need to have a user account on one or more of your friends servers.  They don't necessarily need to be using Freedombone, just some version of GNU/Linux with ssh access.  They can create a user account for you with the <b>adduser &lt;username&gt;</b> command when logged in as root and then give you the username and password via a secure method, such as on paper or via an encrypted email or via an XMPP chat using OTR. Make sure that the password used is a strong one - preferably a long random string stored in a password manager - so that dictionary attacks not be easy. Also for maximum resilience put your password manager file onto a USB thumb drive and carry it with you.
287 307
 </p>
288 308
 
289 309
 <div class="org-src-container">
290 310
 
291
-<pre class="src src-bash">freedombone-addcert -h backup
311
+<pre class="src src-bash">ssh username@domainname -p 2222
312
+freedombone-remote
292 313
 </pre>
293 314
 </div>
294 315
 
295 316
 <p>
296
-Store it within a password manager on a USB drive which you carry with you. In the worst case scenario you'll be able to restore your system on completely new hardware if you have this key, so long as at least one of your friends servers is accessable via ssh.
317
+You can then enter the usernames, domains and ssh logins for one or more remote servers. The system will try to backup to these remote locations once per day.
297 318
 </p>
298 319
 </div>
299 320
 </div>
300
-<div id="outline-container-orgheadline4" class="outline-2">
301
-<h2 id="orgheadline4">Restore from a friend</h2>
302
-<div class="outline-text-2" id="text-orgheadline4">
303
-</div><div id="outline-container-orgheadline5" class="outline-3">
304
-<h3 id="orgheadline5">With a completely new Freedombone installation</h3>
305
-<div class="outline-text-3" id="text-orgheadline5">
321
+<div id="outline-container-orgheadline5" class="outline-2">
322
+<h2 id="orgheadline5">Restore from a friend</h2>
323
+<div class="outline-text-2" id="text-orgheadline5">
324
+</div><div id="outline-container-orgheadline6" class="outline-3">
325
+<h3 id="orgheadline6">With a completely new Freedombone installation</h3>
326
+<div class="outline-text-3" id="text-orgheadline6">
306 327
 <p>
307 328
 This is the ultimate disaster recovery scenario in which you are beginning completely from scratch with new hardware and a new Freedombone installation (configured with the same username and domain names). It is assumed that the old hardware was destroyed, but that you have the backup key stored within a password manager on a USB thumb drive.
308 329
 </p>
@@ -323,26 +344,20 @@ Configure the remote server login details.
323 344
 </p>
324 345
 
325 346
 <p>
326
-Now log in as root and restore the backup key which you have in your password manager.
347
+Now plug in the USB drive containing the backup key and restore it.
327 348
 </p>
328 349
 
329 350
 <div class="org-src-container">
330 351
 
331 352
 <pre class="src src-bash">su
332
-editor /etc/ssl/private/backup.key
353
+freedombone-recoverkey -u [username] --master
333 354
 </pre>
334 355
 </div>
335 356
 
336 357
 <p>
337
-Paste in the backup key, then save and exit.
358
+If you are recovering from multiple USB drives containing key fragments then just ommit the <i>&#x2013;master</i> option in the above command.
338 359
 </p>
339 360
 
340
-<div class="org-src-container">
341
-
342
-<pre class="src src-bash">chmod 600 /etc/ssl/private/backup.key
343
-</pre>
344
-</div>
345
-
346 361
 <p>
347 362
 Then use the command:
348 363
 </p>
@@ -354,9 +369,9 @@ Then use the command:
354 369
 </div>
355 370
 </div>
356 371
 </div>
357
-<div id="outline-container-orgheadline6" class="outline-3">
358
-<h3 id="orgheadline6">On an existing Freedombone installation</h3>
359
-<div class="outline-text-3" id="text-orgheadline6">
372
+<div id="outline-container-orgheadline7" class="outline-3">
373
+<h3 id="orgheadline7">On an existing Freedombone installation</h3>
374
+<div class="outline-text-3" id="text-orgheadline7">
360 375
 <p>
361 376
 This is for more common situations in which maybe some data became corrupted and you want to restore it.
362 377
 </p>