Backup format - hamstar/Braincase GitHub Wiki

Braincase needs to have a format for its backups to allow for stable restores.

It is expected that the backup methods will evolve over the course of the protect and this should be documented here. The backups produced by each new version should be backwards compatible.

The ruby backup gem handles backups. The standard format is used but is somewhat longwinded. The structure looks like this (pretend archives have been extracted):

|- /home/user/backups/daily_backup/2012.10.25.00.00.01
 \ - daily_backup.tar
   \ - daily_backup
     \ - archives
       \ - home.tar.gz
         \ - .dokuwiki/data.current
          |- user.git.mirror
          |- .git
          |- public_html
          |- memories.list
          |- logs
          |- .bashrc
          |- .profile
          |- .braincase
          |- .bash_logout

Using the [braincase-recall](/hamstar/Braincase/wiki/braincase-recall) script you can list all the local backups and view the files in them without extracting the files.

The archive can also be extracted with this one liner:

tar --to-stdout --strip-components=2 -xf 2012.10.24.00.00.01/daily_backup.tar daily_backup/archives/home.tar.gz|tar -xz --strip-components=2 -C /path/to/some/dir

Dropbox

The timestamp folder (e.g. 2012.10.25.00.00.01 is copied to Dropbox and stored in a subfolder called Braincase/Memories (or /home/user/Dropbox/Braincase/Memories).