Bob Mottram 10 anos atrás
pai
commit
39bdded3a4
5 arquivos alterados com 131 adições e 21 exclusões
  1. 120
    0
      backups.org
  2. 0
    1
      faq.org
  3. 1
    1
      index.org
  4. 6
    18
      install-freedombone.sh
  5. 4
    1
      website/index.html

+ 120
- 0
backups.org Ver arquivo

1
+#+TITLE:
2
+#+AUTHOR: Bob Mottram
3
+#+EMAIL: bob@robotics.uk.to
4
+#+KEYWORDS: freedombox, debian, beaglebone, red matrix, email, web server, home server, internet, censorship, surveillance, social network, irc, jabber
5
+#+DESCRIPTION: Turn the Beaglebone Black into a personal communications server
6
+#+OPTIONS: ^:nil
7
+#+BEGIN_CENTER
8
+[[./images/logo.png]]
9
+#+END_CENTER
10
+
11
+#+BEGIN_CENTER
12
+#+ATTR_HTML: :border -1
13
+| [[file:index.html][Home]]                |
14
+| Backup to USB       |
15
+| Restore from USB    |
16
+| Distributed backups |
17
+|                     |
18
+#+END_CENTER
19
+
20
+* Backup to USB
21
+Insert a USB thumb drive into the front socket of the Beaglebone Black.
22
+
23
+Log into the system and become the root user, then run the /backup/ command.
24
+
25
+#+BEGIN_SRC bash
26
+su username@domainname -p 2222
27
+su
28
+backup
29
+#+END_SRC
30
+
31
+You will be prompted for your GPG key password a couple of times.
32
+
33
+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.
34
+* Restore from USB
35
+Insert the USB thumb drive containing your backup into the front socket of the Beaglebone Black.
36
+
37
+Log into the system and become the root user, then run the /restore/ command.
38
+
39
+#+BEGIN_SRC bash
40
+su username@domainname -p 2222
41
+su
42
+restore
43
+#+END_SRC
44
+
45
+When the restore is complete you can remove the USB drive.
46
+* Distributed backups
47
+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.
48
+
49
+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.
50
+
51
+To add friends servers create a file called /backup.list/ in the following way.
52
+
53
+#+BEGIN_SRC bash
54
+ssh username@domainname -p 2222
55
+emacs ~/backup.list
56
+#+END_SRC
57
+
58
+Add entries like this. The numbers are the ssh port number to log in on.
59
+
60
+#+BEGIN_SRC bash
61
+username1@frienddomain1:2222//home/username1 ssh_password1
62
+username2@frienddomain2:2222//home/username2 ssh_password2
63
+...
64
+#+END_SRC
65
+
66
+Save and exit with *CTRL-x CTRL-s* then *CTRL-x CTRL-c*, then type *exit*.
67
+
68
+The system will try to backup to these remote locations once per day.
69
+* Restore from a friend
70
+** With a completely new Freedombone installation
71
+This is the ultimate disaster recovery scenario in which you are beginning completely from scratch with new hardware and a new Freedombone installation. It is assumed that the old hardware was destroyed, but that you have the passwords stored within a password manager on a USB thumb drive.
72
+
73
+First log in and create a new friends list:
74
+
75
+#+BEGIN_SRC bash
76
+ssh username@domainname -p 2222
77
+emacs ~/backup.list
78
+#+END_SRC
79
+
80
+Add entries like this. The numbers are the ssh port number to log in on.
81
+
82
+#+BEGIN_SRC bash
83
+username1@frienddomain1:2222//home/username1 ssh_password1
84
+username2@frienddomain2:2222//home/username2 ssh_password2
85
+...
86
+#+END_SRC
87
+
88
+Save and exit with *CTRL-x CTRL-s* then *CTRL-x CTRL-c*.
89
+
90
+Now log in as root and edit the restore script.
91
+
92
+#+BEGIN_SRC bash
93
+su
94
+emacs /usr/bin/restorefromfriend
95
+#+END_SRC
96
+
97
+Recover your backup password from your password manager and set the PASSPHRASE variable accordingly.
98
+
99
+Save and exit with *CTRL-x CTRL-s* and *CTRL-x CTRL-c*.
100
+
101
+Then use the command:
102
+
103
+#+BEGIN_SRC bash
104
+restorefromfriend <friends server domain name>
105
+#+END_SRC
106
+** On an existing Freedombone installation
107
+This is for more common situations in which maybe some data became corrupted and you want to restore it.
108
+
109
+Log in as root:
110
+
111
+#+BEGIN_SRC bash
112
+ssh username@domainname -p 2222
113
+su
114
+#+END_SRC
115
+
116
+Then use the command:
117
+
118
+#+BEGIN_SRC bash
119
+restorefromfriend <friends server domain name>
120
+#+END_SRC

+ 0
- 1
faq.org Ver arquivo

16
 | [[How do I get a domain name?]]            |
16
 | [[How do I get a domain name?]]            |
17
 | [[How do I get a "real" SSL certificate?]] |
17
 | [[How do I get a "real" SSL certificate?]] |
18
 | [[Why use self-signed certificates?]]      |
18
 | [[Why use self-signed certificates?]]      |
19
-
20
 #+END_CENTER
19
 #+END_CENTER
21
 
20
 
22
 * Why not supply a disk image download?
21
 * Why not supply a disk image download?

+ 1
- 1
index.org Ver arquivo

10
 
10
 
11
 #+BEGIN_CENTER
11
 #+BEGIN_CENTER
12
 #+ATTR_HTML: :border -1
12
 #+ATTR_HTML: :border -1
13
-| [[./variants.html][Variants]] | [[./installation.html][Installation]] | [[./usage.html][How to use it]] | [[./code.html][Code]] | [[./related.html][Related Projects]] | [[file:faq.html][FAQ]] | [[https://www.gnu.org/licenses/gpl-3.0-standalone.html][License]]  |
13
+| [[./variants.html][Variants]] | [[./installation.html][Installation]] | [[./usage.html][How to use it]] | [[file:backups.html][Backups]] | [[./code.html][Code]] | [[./related.html][Related Projects]] | [[file:faq.html][FAQ]] | [[https://www.gnu.org/licenses/gpl-3.0-standalone.html][License]]  |
14
 #+END_CENTER
14
 #+END_CENTER
15
 
15
 
16
 Today everyone is concerned about privacy on the internet.  At the same time there's a problem with the companies who have traditionally provided most of the web services. The people running those companies may be well-intentioned - as in the famous motto "/don't be evil/" - but the advertising based business model which currently dominates, combined with an increasing level of political pressure to insert backdoors means that it is usually impossible for companies operating within both their own business models and the framework of national laws to provide you with services which don't intentionally leak your private communications to advertisers, insurers or governments.
16
 Today everyone is concerned about privacy on the internet.  At the same time there's a problem with the companies who have traditionally provided most of the web services. The people running those companies may be well-intentioned - as in the famous motto "/don't be evil/" - but the advertising based business model which currently dominates, combined with an increasing level of political pressure to insert backdoors means that it is usually impossible for companies operating within both their own business models and the framework of national laws to provide you with services which don't intentionally leak your private communications to advertisers, insurers or governments.

+ 6
- 18
install-freedombone.sh Ver arquivo

752
       BACKUP_TO_FRIENDS_PASSPHRASE=$(openssl rand -base64 32)
752
       BACKUP_TO_FRIENDS_PASSPHRASE=$(openssl rand -base64 32)
753
   fi
753
   fi
754
 
754
 
755
-  if ! grep -q "With a USB drive attached just type" /home/$MY_USERNAME/README; then
756
-      if [ ! -f /home/$MY_USERNAME/README ]; then
757
-          touch /home/$MY_USERNAME/README
758
-      fi
755
+  if ! grep -q "backups on friends servers" /home/$MY_USERNAME/README; then
759
       echo '' >> /home/$MY_USERNAME/README
756
       echo '' >> /home/$MY_USERNAME/README
760
       echo '' >> /home/$MY_USERNAME/README
757
       echo '' >> /home/$MY_USERNAME/README
761
       echo 'Backups' >> /home/$MY_USERNAME/README
758
       echo 'Backups' >> /home/$MY_USERNAME/README
762
       echo '=======' >> /home/$MY_USERNAME/README
759
       echo '=======' >> /home/$MY_USERNAME/README
763
-      echo 'With a USB drive attached just type "backup" or "restore" when logged in as root.' >> /home/$MY_USERNAME/README
764
-      echo 'You will be asked to enter your GPG key passphrase.' >> /home/$MY_USERNAME/README
765
-      echo '' >> /home/$MY_USERNAME/README
766
       echo "Passphrase for backups on friends servers: $BACKUP_TO_FRIENDS_PASSPHRASE" >> /home/$MY_USERNAME/README
760
       echo "Passphrase for backups on friends servers: $BACKUP_TO_FRIENDS_PASSPHRASE" >> /home/$MY_USERNAME/README
767
       echo "To add friends servers create a file called $FRIENDS_SERVERS_LIST"
761
       echo "To add friends servers create a file called $FRIENDS_SERVERS_LIST"
768
       echo 'and add entries like this:' >> /home/$MY_USERNAME/README
762
       echo 'and add entries like this:' >> /home/$MY_USERNAME/README
769
       echo '' >> /home/$MY_USERNAME/README
763
       echo '' >> /home/$MY_USERNAME/README
770
-      echo 'username1@domain1//home/username1 ssh_password1' >> /home/$MY_USERNAME/README
771
-      echo 'username2@domain2//home/username2 ssh_password2' >> /home/$MY_USERNAME/README
764
+      echo 'username1@domain1:2222//home/username1 ssh_password1' >> /home/$MY_USERNAME/README
765
+      echo 'username2@domain2:2222//home/username2 ssh_password2' >> /home/$MY_USERNAME/README
772
       echo '...' >> /home/$MY_USERNAME/README
766
       echo '...' >> /home/$MY_USERNAME/README
773
       echo '' >> /home/$MY_USERNAME/README
767
       echo '' >> /home/$MY_USERNAME/README
774
       echo 'The system will try to backup to these remote locations once per day.' >> /home/$MY_USERNAME/README
768
       echo 'The system will try to backup to these remote locations once per day.' >> /home/$MY_USERNAME/README
910
       return
904
       return
911
   fi
905
   fi
912
 
906
 
913
-  if ! grep -q "Restoring from Backups" /home/$MY_USERNAME/README; then
914
-      if [ ! -f /home/$MY_USERNAME/README ]; then
915
-          touch /home/$MY_USERNAME/README
916
-      fi
917
-      echo '' >> /home/$MY_USERNAME/README
907
+  if ! grep -q "restore from a friend's server" /home/$MY_USERNAME/README; then
918
       echo '' >> /home/$MY_USERNAME/README
908
       echo '' >> /home/$MY_USERNAME/README
919
-      echo 'Restoring from Backups' >> /home/$MY_USERNAME/README
920
-      echo '======================' >> /home/$MY_USERNAME/README
921
-      echo 'To restore from USB backup plug in the USB drive then log in' >> /home/$MY_USERNAME/README
922
-      echo 'as root and just type "restore".' >> /home/$MY_USERNAME/README
923
       echo '' >> /home/$MY_USERNAME/README
909
       echo '' >> /home/$MY_USERNAME/README
910
+      echo 'Restoring from backups to friends servers' >> /home/$MY_USERNAME/README
911
+      echo '=========================================' >> /home/$MY_USERNAME/README
924
       echo "To restore from a friend's server use the command:" >> /home/$MY_USERNAME/README
912
       echo "To restore from a friend's server use the command:" >> /home/$MY_USERNAME/README
925
       echo '' >> /home/$MY_USERNAME/README
913
       echo '' >> /home/$MY_USERNAME/README
926
       echo "  $RESTORE_FROM_FRIEND_SCRIPT_NAME [server]" >> /home/$MY_USERNAME/README
914
       echo "  $RESTORE_FROM_FRIEND_SCRIPT_NAME [server]" >> /home/$MY_USERNAME/README

+ 4
- 1
website/index.html Ver arquivo

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
-<!-- 2014-10-28 Tue 19:23 -->
7
+<!-- 2014-10-29 Wed 19:02 -->
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" />
174
 <col  class="left" />
174
 <col  class="left" />
175
 
175
 
176
 <col  class="left" />
176
 <col  class="left" />
177
+
178
+<col  class="left" />
177
 </colgroup>
179
 </colgroup>
178
 <tbody>
180
 <tbody>
179
 <tr>
181
 <tr>
180
 <td class="left"><a href="./variants.html">Variants</a></td>
182
 <td class="left"><a href="./variants.html">Variants</a></td>
181
 <td class="left"><a href="./installation.html">Installation</a></td>
183
 <td class="left"><a href="./installation.html">Installation</a></td>
182
 <td class="left"><a href="./usage.html">How to use it</a></td>
184
 <td class="left"><a href="./usage.html">How to use it</a></td>
185
+<td class="left"><a href="backups.html">Backups</a></td>
183
 <td class="left"><a href="./code.html">Code</a></td>
186
 <td class="left"><a href="./code.html">Code</a></td>
184
 <td class="left"><a href="./related.html">Related Projects</a></td>
187
 <td class="left"><a href="./related.html">Related Projects</a></td>
185
 <td class="left"><a href="faq.html">FAQ</a></td>
188
 <td class="left"><a href="faq.html">FAQ</a></td>