2015-11-13 15:42:16 +00:00
|
|
|
.. _borg_upgrade:
|
|
|
|
|
|
|
|
borg upgrade
|
|
|
|
------------
|
|
|
|
::
|
|
|
|
|
2016-03-17 02:30:31 +00:00
|
|
|
usage: borg upgrade [-h] [-v] [--debug] [--lock-wait N] [--show-version]
|
|
|
|
[--show-rc] [--no-files-cache] [--umask M]
|
|
|
|
[--remote-path PATH] [-p] [-n] [-i]
|
2015-11-13 15:42:16 +00:00
|
|
|
[REPOSITORY]
|
|
|
|
|
|
|
|
upgrade a repository from a previous version
|
|
|
|
|
|
|
|
positional arguments:
|
2015-12-08 09:21:20 +00:00
|
|
|
REPOSITORY path to the repository to be upgraded
|
2015-11-13 15:42:16 +00:00
|
|
|
|
|
|
|
optional arguments:
|
2015-12-08 09:21:20 +00:00
|
|
|
-h, --help show this help message and exit
|
|
|
|
-v, --verbose, --info
|
|
|
|
enable informative (verbose) output, work on log level
|
|
|
|
INFO
|
|
|
|
--debug enable debug output, work on log level DEBUG
|
|
|
|
--lock-wait N wait for the lock, but max. N seconds (default: 1).
|
2016-03-17 02:30:31 +00:00
|
|
|
--show-version show/log the borg version
|
2015-12-08 09:21:20 +00:00
|
|
|
--show-rc show/log the return code (rc)
|
|
|
|
--no-files-cache do not load/update the file metadata cache used to
|
|
|
|
detect unchanged files
|
|
|
|
--umask M set umask to M (local and remote, default: 0077)
|
|
|
|
--remote-path PATH set remote path to executable (default: "borg")
|
2016-01-23 19:54:20 +00:00
|
|
|
-p, --progress show progress display while upgrading the repository
|
2015-12-08 09:21:20 +00:00
|
|
|
-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.
|
2015-11-13 15:42:16 +00:00
|
|
|
|
|
|
|
Description
|
|
|
|
~~~~~~~~~~~
|
|
|
|
|
2016-02-07 18:23:06 +00:00
|
|
|
Upgrade an existing Borg repository.
|
|
|
|
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).
|
|
|
|
|
2016-01-23 19:54:20 +00:00
|
|
|
It 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.
|