freedomboneeee/doc/EN/backups.org

5.8 KiB
Raw Blame History

/free/freedomboneeee/src/commit/e1db4e0380a8fce2fc4080d193ba6114830535f9/doc/EN/images/logo.png

Backup keys

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 commands:

ssh username@domainname -p 2222
su
freedombone-keydrive -u [username] --master

Keep this USB drive in some safe place, since it will enable you to restore from previous backups.

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).

Backup to USB

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 can be found here.

Insert a USB thumb drive into the front socket of the Beaglebone Black.

Log into the system and become the root user, then run the backup command.

ssh username@domainname -p 2222
su
backup

Type in the password for the USB drive, then the backup will begin.

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.

Restore from USB

Log into the system and become the root user:

ssh username@domainname -p 2222
su

If this is a new Freedombone installation then you will first need to restore your backup keys. That can be done as follows:

freedombone-recoverkey -u [username]

Or on a Beaglebone Black you can use the option:

freedombone-recoverkey -u [username] --drive sda

Remove any existing drive and insert the USB thumb drive containing your backup into the front socket of the Beaglebone Black, then run the command:

restore

Enter the password for the USB drive. When the restore is complete you can remove the USB drive.

Distributed backups

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.

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 not be easy. Also for maximum resilience put your password manager file onto a USB thumb drive and carry it with you.

ssh username@domainname -p 2222
freedombone-remote

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.

Restore from a friend

With a completely new Freedombone installation

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 on a USB thumb drive.

First log in and if you don't already have one then create a new friends list:

ssh username@domainname -p 2222
freedombone-remote

Configure the remote server login details.

Now become the root user:

su

Plug in the USB drive containing the backup key and restore it.

freedombone-recoverkey -u [username]

Or on a Beablebone Black:

freedombone-recoverkey -u [username] -d sda

Then use the command:

restorefromfriend <friends server domain name>

On an existing Freedombone installation

This is for more common situations in which maybe some data became corrupted and you want to restore it.

Log in as root:

ssh username@domainname -p 2222
su

Then use the command:

restorefromfriend <friends server domain name>