Browse Source

Update the backup documentation

Bob Mottram 9 years ago
parent
commit
c39658870b
2 changed files with 99 additions and 80 deletions
  1. 30
    26
      doc/EN/backups.org
  2. 69
    54
      website/EN/backups.html

+ 30
- 26
doc/EN/backups.org View File

11
 #+BEGIN_CENTER
11
 #+BEGIN_CENTER
12
 #+ATTR_HTML: :border -1
12
 #+ATTR_HTML: :border -1
13
 | [[file:index.html][Home]]                  |
13
 | [[file:index.html][Home]]                  |
14
+| [[Backup keys]]           |
14
 | [[Backup to USB]]         |
15
 | [[Backup to USB]]         |
15
 | [[Restore from USB]]      |
16
 | [[Restore from USB]]      |
16
 | [[Distributed backups]]   |
17
 | [[Distributed backups]]   |
17
 | [[Restore from a friend]] |
18
 | [[Restore from a friend]] |
18
 #+END_CENTER
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
 * Backup to USB
32
 * Backup to USB
21
 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]].
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
 backup
42
 backup
31
 #+END_SRC
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
 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.
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
 * Restore from USB
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
 #+BEGIN_SRC bash
51
 #+BEGIN_SRC bash
42
 ssh username@domainname -p 2222
52
 ssh username@domainname -p 2222
43
 su
53
 su
44
-restore
45
 #+END_SRC
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
 #+BEGIN_SRC bash
58
 #+BEGIN_SRC bash
54
-ssh username@domainname -p 2222
55
-freedombone-remote
59
+freedombone-recoverkey -u [username] --master
56
 #+END_SRC
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
 #+BEGIN_SRC bash
66
 #+BEGIN_SRC bash
63
-su
64
-cat /etc/ssl/private/backup.key
67
+restore
65
 #+END_SRC
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
 #+BEGIN_SRC bash
76
 #+BEGIN_SRC bash
70
-freedombone-addcert -h backup
77
+ssh username@domainname -p 2222
78
+freedombone-remote
71
 #+END_SRC
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
 * Restore from a friend
82
 * Restore from a friend
75
 ** With a completely new Freedombone installation
83
 ** With a completely new Freedombone installation
76
 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
 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
 
92
 
85
 Configure the remote server login details.
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
 #+BEGIN_SRC bash
97
 #+BEGIN_SRC bash
90
 su
98
 su
91
-editor /etc/ssl/private/backup.key
99
+freedombone-recoverkey -u [username] --master
92
 #+END_SRC
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
 Then use the command:
104
 Then use the command:
101
 
105
 

+ 69
- 54
website/EN/backups.html View File

4
 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
4
 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
5
 <head>
5
 <head>
6
 <title></title>
6
 <title></title>
7
-<!-- 2015-07-05 Sun 20:29 -->
7
+<!-- 2015-09-29 Tue 10:21 -->
8
 <meta  http-equiv="Content-Type" content="text/html;charset=utf-8" />
8
 <meta  http-equiv="Content-Type" content="text/html;charset=utf-8" />
9
 <meta  name="generator" content="Org-mode" />
9
 <meta  name="generator" content="Org-mode" />
10
 <meta  name="author" content="Bob Mottram" />
10
 <meta  name="author" content="Bob Mottram" />
175
 </tr>
175
 </tr>
176
 
176
 
177
 <tr>
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
 </tr>
179
 </tr>
180
 
180
 
181
 <tr>
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
 </tr>
183
 </tr>
184
 
184
 
185
 <tr>
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
 </tr>
187
 </tr>
188
 
188
 
189
 <tr>
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
 </tr>
195
 </tr>
192
 </tbody>
196
 </tbody>
193
 </table>
197
 </table>
194
 </div>
198
 </div>
195
 
199
 
196
 <div id="outline-container-orgheadline1" class="outline-2">
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
 <div class="outline-text-2" id="text-orgheadline1">
202
 <div class="outline-text-2" id="text-orgheadline1">
199
 <p>
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
 </p>
205
 </p>
210
 
206
 
211
 <div class="org-src-container">
207
 <div class="org-src-container">
212
 
208
 
213
 <pre class="src src-bash">ssh username@domainname -p 2222
209
 <pre class="src src-bash">ssh username@domainname -p 2222
214
-su
215
-backup
210
+freedombone-keydrive -u [username] --master
216
 </pre>
211
 </pre>
217
 </div>
212
 </div>
218
 
213
 
219
 <p>
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
 </p>
216
 </p>
222
 
217
 
223
 <p>
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
 </p>
220
 </p>
226
 </div>
221
 </div>
227
 </div>
222
 </div>
228
 <div id="outline-container-orgheadline2" class="outline-2">
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
 <div class="outline-text-2" id="text-orgheadline2">
225
 <div class="outline-text-2" id="text-orgheadline2">
231
 <p>
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
 </p>
228
 </p>
234
 
229
 
235
 <p>
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
 </p>
236
 </p>
238
 
237
 
239
 <div class="org-src-container">
238
 <div class="org-src-container">
240
 
239
 
241
 <pre class="src src-bash">ssh username@domainname -p 2222
240
 <pre class="src src-bash">ssh username@domainname -p 2222
242
 su
241
 su
243
-restore
242
+backup
244
 </pre>
243
 </pre>
245
 </div>
244
 </div>
246
 
245
 
247
 <p>
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
 </p>
252
 </p>
250
 </div>
253
 </div>
251
 </div>
254
 </div>
252
 <div id="outline-container-orgheadline3" class="outline-2">
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
 <div class="outline-text-2" id="text-orgheadline3">
257
 <div class="outline-text-2" id="text-orgheadline3">
255
 <p>
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
 </p>
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
 <p>
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
 </p>
271
 </p>
262
 
272
 
263
 <div class="org-src-container">
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
 </pre>
276
 </pre>
268
 </div>
277
 </div>
269
 
278
 
270
 <p>
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
 </p>
281
 </p>
273
 
282
 
274
 <p>
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
 </p>
285
 </p>
277
 
286
 
278
 <div class="org-src-container">
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
 </pre>
290
 </pre>
283
 </div>
291
 </div>
284
 
292
 
285
 <p>
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
 </p>
307
 </p>
288
 
308
 
289
 <div class="org-src-container">
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
 </pre>
313
 </pre>
293
 </div>
314
 </div>
294
 
315
 
295
 <p>
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
 </p>
318
 </p>
298
 </div>
319
 </div>
299
 </div>
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
 <p>
327
 <p>
307
 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.
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
 </p>
329
 </p>
323
 </p>
344
 </p>
324
 
345
 
325
 <p>
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
 </p>
348
 </p>
328
 
349
 
329
 <div class="org-src-container">
350
 <div class="org-src-container">
330
 
351
 
331
 <pre class="src src-bash">su
352
 <pre class="src src-bash">su
332
-editor /etc/ssl/private/backup.key
353
+freedombone-recoverkey -u [username] --master
333
 </pre>
354
 </pre>
334
 </div>
355
 </div>
335
 
356
 
336
 <p>
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
 </p>
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
 <p>
361
 <p>
347
 Then use the command:
362
 Then use the command:
348
 </p>
363
 </p>
354
 </div>
369
 </div>
355
 </div>
370
 </div>
356
 </div>
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
 <p>
375
 <p>
361
 This is for more common situations in which maybe some data became corrupted and you want to restore it.
376
 This is for more common situations in which maybe some data became corrupted and you want to restore it.
362
 </p>
377
 </p>