2016-07-05 21:30:08 +00:00
|
|
|
.. IMPORTANT: this file is auto-generated from borg's built-in help, do not edit!
|
|
|
|
|
2015-11-13 15:42:16 +00:00
|
|
|
.. _borg_init:
|
|
|
|
|
|
|
|
borg init
|
|
|
|
---------
|
|
|
|
::
|
|
|
|
|
2017-05-17 09:52:48 +00:00
|
|
|
borg [common options] init <options> REPOSITORY
|
2016-04-09 23:28:18 +00:00
|
|
|
|
|
|
|
positional arguments
|
|
|
|
REPOSITORY
|
|
|
|
repository to create
|
|
|
|
|
|
|
|
optional arguments
|
|
|
|
``-e``, ``--encryption``
|
2017-05-17 09:52:48 +00:00
|
|
|
| select encryption key mode **(required)**
|
2016-08-27 22:17:24 +00:00
|
|
|
``-a``, ``--append-only``
|
|
|
|
| create an append-only mode repository
|
2016-04-09 23:28:18 +00:00
|
|
|
|
|
|
|
`Common options`_
|
|
|
|
|
|
|
|
|
|
2015-11-13 15:42:16 +00:00
|
|
|
Description
|
|
|
|
~~~~~~~~~~~
|
|
|
|
|
|
|
|
This command initializes an empty repository. A repository is a filesystem
|
|
|
|
directory containing the deduplicated data from zero or more archives.
|
2016-07-05 23:33:53 +00:00
|
|
|
|
2017-05-17 09:52:48 +00:00
|
|
|
Encryption can be enabled at repository init time. It cannot be changed later.
|
2016-07-05 23:33:53 +00:00
|
|
|
|
2017-01-14 16:19:19 +00:00
|
|
|
It is not recommended to work without encryption. Repository encryption protects
|
|
|
|
you e.g. against the case that an attacker has access to your backup repository.
|
2016-07-05 23:33:53 +00:00
|
|
|
|
|
|
|
But be careful with the key / the passphrase:
|
|
|
|
|
2017-01-14 16:19:19 +00:00
|
|
|
If you want "passphrase-only" security, use one of the repokey modes. The
|
|
|
|
key will be stored inside the repository (in its "config" file). In above
|
|
|
|
mentioned attack scenario, the attacker will have the key (but not the
|
|
|
|
passphrase).
|
2016-07-05 23:33:53 +00:00
|
|
|
|
2017-01-14 16:19:19 +00:00
|
|
|
If you want "passphrase and having-the-key" security, use one of the keyfile
|
|
|
|
modes. The key will be stored in your home directory (in .config/borg/keys).
|
|
|
|
In the attack scenario, the attacker who has just access to your repo won't
|
|
|
|
have the key (and also not the passphrase).
|
2016-07-05 23:33:53 +00:00
|
|
|
|
|
|
|
Make a backup copy of the key file (keyfile mode) or repo config file
|
|
|
|
(repokey mode) and keep it at a safe place, so you still have the key in
|
|
|
|
case it gets corrupted or lost. Also keep the passphrase at a safe place.
|
|
|
|
The backup that is encrypted with that key won't help you with that, of course.
|
|
|
|
|
|
|
|
Make sure you use a good passphrase. Not too short, not too simple. The real
|
|
|
|
encryption / decryption key is encrypted with / locked by your passphrase.
|
|
|
|
If an attacker gets your key, he can't unlock and use it without knowing the
|
|
|
|
passphrase.
|
|
|
|
|
|
|
|
Be careful with special or non-ascii characters in your passphrase:
|
|
|
|
|
|
|
|
- Borg processes the passphrase as unicode (and encodes it as utf-8),
|
|
|
|
so it does not have problems dealing with even the strangest characters.
|
|
|
|
- BUT: that does not necessarily apply to your OS / VM / keyboard configuration.
|
|
|
|
|
|
|
|
So better use a long passphrase made from simple ascii chars than one that
|
|
|
|
includes non-ascii stuff or characters that are hard/impossible to enter on
|
|
|
|
a different keyboard layout.
|
|
|
|
|
|
|
|
You can change your passphrase for existing repos at any time, it won't affect
|
|
|
|
the encryption/decryption key or other secrets.
|
|
|
|
|
2016-11-28 01:25:56 +00:00
|
|
|
Encryption modes
|
|
|
|
++++++++++++++++
|
|
|
|
|
2017-02-05 20:32:24 +00:00
|
|
|
`repokey` and `keyfile` use AES-CTR-256 for encryption and HMAC-SHA256 for
|
2016-11-28 01:25:56 +00:00
|
|
|
authentication in an encrypt-then-MAC (EtM) construction. The chunk ID hash
|
|
|
|
is HMAC-SHA256 as well (with a separate key).
|
2017-01-14 16:19:19 +00:00
|
|
|
These modes are compatible with borg 1.0.x.
|
2016-11-28 01:25:56 +00:00
|
|
|
|
2017-02-05 20:32:24 +00:00
|
|
|
`repokey-blake2` and `keyfile-blake2` are also authenticated encryption modes,
|
2017-01-14 16:19:19 +00:00
|
|
|
but use BLAKE2b-256 instead of HMAC-SHA256 for authentication. The chunk ID
|
|
|
|
hash is a keyed BLAKE2b-256 hash.
|
2017-02-05 20:32:24 +00:00
|
|
|
These modes are new and *not* compatible with borg 1.0.x.
|
2016-11-28 01:25:56 +00:00
|
|
|
|
2017-02-05 20:32:24 +00:00
|
|
|
`authenticated` mode uses no encryption, but authenticates repository contents
|
2017-01-14 16:19:19 +00:00
|
|
|
through the same keyed BLAKE2b-256 hash as the other blake2 modes (it uses it
|
2017-05-17 09:52:48 +00:00
|
|
|
as the chunk ID hash). The key is stored like repokey.
|
|
|
|
This mode is new and *not* compatible with borg 1.0.x.
|
2017-01-14 16:19:19 +00:00
|
|
|
|
2017-02-05 20:32:24 +00:00
|
|
|
`none` mode uses no encryption and no authentication. It uses sha256 as chunk
|
2017-01-14 16:19:19 +00:00
|
|
|
ID hash. Not recommended, rather consider using an authenticated or
|
|
|
|
authenticated/encrypted mode.
|
|
|
|
This mode is compatible with borg 1.0.x.
|
2016-11-28 01:25:56 +00:00
|
|
|
|
|
|
|
Hardware acceleration will be used automatically.
|
2017-01-14 16:19:19 +00:00
|
|
|
|
2017-02-05 20:32:24 +00:00
|
|
|
On modern Intel/AMD CPUs (except very cheap ones), AES is usually
|
|
|
|
hardware-accelerated. BLAKE2b is faster than SHA256 on Intel/AMD 64bit CPUs,
|
|
|
|
which makes `authenticated` faster than `none`.
|
2017-01-14 16:19:19 +00:00
|
|
|
|
2017-02-05 20:32:24 +00:00
|
|
|
On modern ARM CPUs, NEON provides hardware acceleration for SHA256 making it faster
|
2017-03-26 23:45:45 +00:00
|
|
|
than BLAKE2b-256 there.
|