Manual Reference Pages - BRACKUP::MANUAL::OVERVIEW (3)
Brackup::Manual::Overview - how Brackup works, and how to use it
Quick Start Guide
Setup your config file
Run <B>brackupB> to initialize your config file. Youll see:
Your config file needs tweaking.
I put a commented-out template at: /home/bradfitz/.brackup.conf
brackup --from=[source_name] --to=[target_name] [--output=<backup_metafile.brackup>]
Now, go edit your config file:
$ $EDITOR ~/.brackup.conf
Tweak as appropriate.
For details on whats tweakable, see Brackup::Root (a source), or
Brackup::Target (a destination).
Do a backup
Now that youve got a source and target named, run a backup. I like
watching it all happen with the --verbose (or -v) option:
$ brackup --from=myhome --to=amazon -v
What just happened?
Lets look around at what just happened.
First, youll notice a file named, by default,
myhome-yyyymmdd.brackup in your current directory. Go look at it.
It describes the state of the tree (the root, or source) that you
just backed up. You might want to keep this file. Although, if you
dont, its also stored on the target (in this case, Amazon), so its
not critical. (You can always re-download lost .brackup files with
You might also notice two SQLite files at:
These are the Brackup::DigestCache and
Brackup::InventoryDatabase files, both of which make future
incremental backups fast.
Incremental backups are essentially free, only storing new chunks,
even if you rearrange your directory tree or rename all your files.
Brackup doesnt use the name of your files to decide whats new in
an incremental backup, only the contents.
For two back-to-back backups, with no data changes in-between, the
only cost of an incremental backup is that another metafile (*.brackup) is
produced, which is proportional in size to the number of files
youre backing up (not the size of the files).
Another good side-effect of storing backups based on their digests is
that multiple, duplicate files on your source are only stored on the
target once. (but yes, theyre restored to all original locations)
Brackup supports backing up with public key encryption, using GNU
Privacy Guard (GnuPG). One of the great advantage of using public key
encryption is that your machines doing backups only need your public
key, so you can run automated backups from hosts which are on the
public Internet and might be get compromised, without worrying about
your private key getting stolen. (however, youd still worry about
your machine getting compromised for lots of other reasons...)
In any case, you encrypt files to yourself, and this is a property
on a backup source (see Brackup::Root). For example, in my config
file, I have:
path = /home/bradfitz/
gpg_recipient = 5E1B3EC5
Where 5E1B3EC5 corresponds to the key signature for myself as seen in:
$ gpg --list-keys
pub 1024D/5E1B3EC5 2006-03-20
uid Brad Fitzpatrick <firstname.lastname@example.org>
While you backup automatically without a human present, a restore from
encryption requires an interactive session for you to enter your
private keys passphrase into gpg-agent.
To create a new key, run:
$ gpg --gen-key
But really, you should go read a gpg manual first. Notably, <B>backing
up your gpg private key is very important!B>. If you lose the disk
with your files which also contain your private key, your encrypted backups on
Amazon wont do you much good, since youll have no way to decrypt them.
I recommend burning your private key to a CD, as well as printing it out
on paper. (Worst case you can type it back in, or use OCR.) Export with:
$ gpg --export-secret-keys --armor
You can encrypt to multiple keys by providing multiple gpg_recipient
lines; any of the keys provided will be able to decrypt the backups.
To do a restore, youll need your *.brackup file handy. If you lost
it, you can re-download it from your backup target with
brackup-target. Then run:
brackup-restore --from=foo.brackup --to=<dir> --all
For more options, see:
Number of backups to keep
To free space on your target you can remove old backups. There are two steps
to do this:
brackup-target <target> prune
brackup-target <target> gc
The first command will look for backup metafiles in your target and remove the
oldest ones according to the keep_backups option you specified in the config
file. Thus, if you have, say, 15 backups stored and keep_backups is set to 10
then prune will remove the oldest 5 backups.
The second command will remove from your target the orphaned chunks that are no
more referenced by any metafile. This will free some space while preserving chunks
that are still referenced by recent backups.
|perl v5.20.3 ||BRACKUP::MANUAL::OVERVIEW (3) ||2010-11-01 |
Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.