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_upgrade:
|
|
|
|
|
|
|
|
borg upgrade
|
|
|
|
------------
|
|
|
|
::
|
|
|
|
|
2017-05-17 09:52:48 +00:00
|
|
|
borg [common options] upgrade <options> REPOSITORY
|
2016-04-09 23:28:18 +00:00
|
|
|
|
|
|
|
positional arguments
|
|
|
|
REPOSITORY
|
|
|
|
path to the repository to be upgraded
|
|
|
|
|
|
|
|
optional arguments
|
|
|
|
``-n``, ``--dry-run``
|
|
|
|
| do not change repository
|
|
|
|
``-i``, ``--inplace``
|
|
|
|
| rewrite repository in place, with no chance of going back to older
|
|
|
|
| versions of the repository.
|
2016-12-20 22:09:28 +00:00
|
|
|
``--force``
|
|
|
|
| Force upgrade
|
|
|
|
``--tam``
|
|
|
|
| Enable manifest authentication (in key and cache) (Borg 1.0.9 and later)
|
|
|
|
``--disable-tam``
|
|
|
|
| Disable manifest authentication (in key and cache)
|
2016-04-09 23:28:18 +00:00
|
|
|
|
|
|
|
`Common options`_
|
|
|
|
|
|
|
|
|
|
2015-11-13 15:42:16 +00:00
|
|
|
Description
|
|
|
|
~~~~~~~~~~~
|
|
|
|
|
2017-04-29 23:31:20 +00:00
|
|
|
Upgrade an existing, local Borg repository.
|
|
|
|
|
|
|
|
When you do not need borg upgrade
|
|
|
|
+++++++++++++++++++++++++++++++++
|
|
|
|
|
|
|
|
Not every change requires that you run ``borg upgrade``.
|
|
|
|
|
|
|
|
You do **not** need to run it when:
|
|
|
|
|
|
|
|
- moving your repository to a different place
|
|
|
|
- upgrading to another point release (like 1.0.x to 1.0.y),
|
|
|
|
except when noted otherwise in the changelog
|
|
|
|
- upgrading from 1.0.x to 1.1.x,
|
|
|
|
except when noted otherwise in the changelog
|
2016-12-20 22:09:28 +00:00
|
|
|
|
|
|
|
Borg 1.x.y upgrades
|
2017-01-14 16:19:19 +00:00
|
|
|
+++++++++++++++++++
|
2016-12-20 22:09:28 +00:00
|
|
|
|
|
|
|
Use ``borg upgrade --tam REPO`` to require manifest authentication
|
|
|
|
introduced with Borg 1.0.9 to address security issues. This means
|
|
|
|
that modifying the repository after doing this with a version prior
|
|
|
|
to 1.0.9 will raise a validation error, so only perform this upgrade
|
|
|
|
after updating all clients using the repository to 1.0.9 or newer.
|
|
|
|
|
|
|
|
This upgrade should be done on each client for safety reasons.
|
|
|
|
|
|
|
|
If a repository is accidentally modified with a pre-1.0.9 client after
|
|
|
|
this upgrade, use ``borg upgrade --tam --force REPO`` to remedy it.
|
|
|
|
|
|
|
|
If you routinely do this you might not want to enable this upgrade
|
|
|
|
(which will leave you exposed to the security issue). You can
|
|
|
|
reverse the upgrade by issuing ``borg upgrade --disable-tam REPO``.
|
|
|
|
|
|
|
|
See
|
|
|
|
https://borgbackup.readthedocs.io/en/stable/changes.html#pre-1-0-9-manifest-spoofing-vulnerability
|
|
|
|
for details.
|
|
|
|
|
|
|
|
Attic and Borg 0.xx to Borg 1.x
|
2017-01-14 16:19:19 +00:00
|
|
|
+++++++++++++++++++++++++++++++
|
2016-12-20 22:09:28 +00:00
|
|
|
|
2016-02-07 18:23:06 +00:00
|
|
|
This currently supports converting an Attic repository to Borg and also
|
|
|
|
helps with converting Borg 0.xx to 1.0.
|
2015-11-13 15:42:16 +00:00
|
|
|
|
2016-02-07 20:08:20 +00:00
|
|
|
Currently, only LOCAL repositories can be upgraded (issue #465).
|
|
|
|
|
2017-04-29 23:31:20 +00:00
|
|
|
Please note that ``borg create`` (since 1.0.0) uses bigger chunks by
|
|
|
|
default than old borg or attic did, so the new chunks won't deduplicate
|
|
|
|
with the old chunks in the upgraded repository.
|
|
|
|
See ``--chunker-params`` option of ``borg create`` and ``borg recreate``.
|
|
|
|
|
|
|
|
``borg upgrade`` will change the magic strings in the repository's
|
|
|
|
segments to match the new Borg magic strings. The keyfiles found in
|
2015-11-13 15:42:16 +00:00
|
|
|
$ATTIC_KEYS_DIR or ~/.attic/keys/ will also be converted and
|
2016-02-07 13:50:39 +00:00
|
|
|
copied to $BORG_KEYS_DIR or ~/.config/borg/keys.
|
2015-11-13 15:42:16 +00:00
|
|
|
|
2016-01-23 19:54:20 +00:00
|
|
|
The cache files are converted, from $ATTIC_CACHE_DIR or
|
2015-11-13 15:42:16 +00:00
|
|
|
~/.cache/attic to $BORG_CACHE_DIR or ~/.cache/borg, but the
|
|
|
|
cache layout between Borg and Attic changed, so it is possible
|
|
|
|
the first backup after the conversion takes longer than expected
|
|
|
|
due to the cache resync.
|
|
|
|
|
2016-01-23 19:54:20 +00:00
|
|
|
Upgrade should be able to resume if interrupted, although it
|
|
|
|
will still iterate over all segments. If you want to start
|
2015-11-13 15:42:16 +00:00
|
|
|
from scratch, use `borg delete` over the copied repository to
|
|
|
|
make sure the cache files are also removed:
|
|
|
|
|
|
|
|
borg delete borg
|
|
|
|
|
2016-01-23 19:54:20 +00:00
|
|
|
Unless ``--inplace`` is specified, the upgrade process first
|
2015-11-13 15:42:16 +00:00
|
|
|
creates a backup copy of the repository, in
|
2016-01-23 19:54:20 +00:00
|
|
|
REPOSITORY.upgrade-DATETIME, using hardlinks. This takes
|
2015-11-13 15:42:16 +00:00
|
|
|
longer than in place upgrades, but is much safer and gives
|
2016-01-23 19:54:20 +00:00
|
|
|
progress information (as opposed to ``cp -al``). Once you are
|
2015-11-13 15:42:16 +00:00
|
|
|
satisfied with the conversion, you can safely destroy the
|
|
|
|
backup copy.
|
|
|
|
|
2016-01-23 19:54:20 +00:00
|
|
|
WARNING: Running the upgrade in place will make the current
|
2015-11-13 15:42:16 +00:00
|
|
|
copy unusable with older version, with no way of going back
|
2016-01-23 19:54:20 +00:00
|
|
|
to previous versions. This can PERMANENTLY DAMAGE YOUR
|
2015-11-13 15:42:16 +00:00
|
|
|
REPOSITORY! Attic CAN NOT READ BORG REPOSITORIES, as the
|
2016-01-23 19:54:20 +00:00
|
|
|
magic strings have changed. You have been warned.
|