Quickstart¶
This does not really explain the philosophy behind brig, but gives a good
idea what the tool is able to do and how it’s supposed to be used. Users
familiar to git should be able to grok most of the commands intuitively.
1. Init¶
Before you can do anything with brig you need to create a repository.
During this step, also your online identity will be created. So make sure to
use a sane username (sahib@wald.de) and resource (laptop).
As an alternative to entering your password manually, you can use an existing password manager:
2. Adding files¶
Before synchronizing them, you need to stage them. The files will be stored encrypted (and possibly compressed) in blobs on your hard disks.
3. Coreutils¶
brig provides implementations of most file related core utils like mv,
cp, rm, mkdir or cat. Handling of files should thus feel
familiar for users that know the command line.
4. Mounting¶
For daily use and for use with other tools you might prefer a folder that
contains the file you gave to brig. This can be done via the built-in FUSE
layer.
Note
Some built-in commands provided by brig are faster.
brig cp for example only copies metadata, while the real cp will copy the whole file.
If you wish to always have the mount when brig is running, you should look
into Making mounts permanent.
5. Commits¶
In it’s heart, brig is very similar to git and also supports versioning
via commits. In contrast to git however, there are no branches and you
can’t go back in history – you can only bring the history back up front.
6. History¶
Each file (and directory) maintains a history of the operations that were done to this file.
7. Discovery & Remotes¶
In order to sync with your buddies, you need to add their fingerprint as remotes.
How do you get their fingerprint? In the best case by using a separate side channel
like telephone, encrypted email or elsewhise. But brig can assist finding remotes
via the brig net locate command.
Note
You should always verify the fingerprint is really the one of your buddy.
brig cannot do this for you.
8. Sync & Diff¶
Once both parties have setup each other as remotes, we can easily view and sync with their data.
9. Pinning¶
By default brig will only keep the most recent files. All other files will
be marked to deletions after a certain timeframe. This is done via Pins. If
a file is pinned, it won’t get deleted. If you don’t need a file in local
storage, you can also unpin it. On the next access brig will try to load it
again from a peer that provides it (if possible).