wiki:RecreateFromBackup

Intro

It is wise to have a plan for recovering our site from backups, before it is needed (hopefully never). These instructions assume the worst case, complete disappearing of Puma, which hosts the www.bewelcome.org virtual server.

Backups are encrypted, so only those with access to the encrypt keys can perform a restore. The key people are (as at October 2013):

Recovery steps

These instructions are work in progress. Please feel free to add things.

Inform users

  • Change DNS from old live IP address to temporary page, maybe with a link to a wiki with progress updates.
  • Ideally the temporary page works similar to the placeholder page mentioned on DeerToPuma, sending 502 HTTP status codes for all sub pages, so we don't get kicked out of search engine indexes.
  • Post link to indenti.ca etc.

Recover database

  • Database backups are created nightly and are encrypted via GnuPG
  • Backups are stored remotely on lamb.bewelcome.org, and transferred to mole.ecobytes.net irregularly (manually, needs cron job)
  • To decrypt backup either Christian's (jsfan) or Meinhard's (planetcruiser) private GnuPG are needed. Currently backups are also encrypted using a shared key on Puma, but this is deprecated and will disappear soon. (This key is still in use as at Oct 2013, it's probably not going anywhere).
  • Databases are simple mysql dumps of the relevant databases, into single files, combined, and then encrypted. Should be straightforward to recover from.

Recover files

  • /var/rox/data/ is backed up nightly using duplicity to FTP backup space provided by Hetzner. Several things are needed to recover these files.
    1. The FTP backup host, username, and password. These can be recovered (or reset) from the Hetzner control panel. Matthias or Meinhard can probably access this. Callum has a copy of the credentials.
    2. duplicity installed on the new system http://duplicity.nongnu.org/
    3. A copy of the GPG key to which the backups are encrypted (the shared key discussed above) and its password.
    4. Ideally, a copy of the GPG key which is used to sign the backups. At least Callum and Meinhard have copies of this. It is probably possible to restore without this, but duplicity will complain.
  • The restore syntax for duplicity is

FTP_PASSWORD="foo" duplicity --gpg-options "--always-trust" ftp://user@host/backup/data /var/rox/data/

Set up new live system

Test

Switch DNS

  • Done by Ecobytes support, contact via support@… (recommended), meinhard@… or #ecobytes on irc.indymedia.org
Last modified 3 years ago Last modified on Oct 14, 2013 11:42:12 AM