1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2024-12-26 09:47:58 +00:00
Commit graph

5906 commits

Author SHA1 Message Date
Thomas Waldmann
d8cbdfc359 fix typo 2020-06-08 01:46:56 +02:00
Matthew Glazar
5a32de918e allow key-import+BORG_KEY_FILE to create key files
Running 'borg key import' on a keyfile repository with the BORG_KEY_FILE
environment variable set works correctly if the BORG_KEY_FILE file
already exists. However, the command crashes if the BORG_KEY_FILE file
does not exist:

    $ BORG_KEY_FILE=newborgkey borg key import /home/strager/borg-backups/straglum borgkey
    Local Exception
    Traceback (most recent call last):
      [snip]
      File "[snip]/borg/crypto/key.py", line 713, in sanity_check
        with open(filename, 'rb') as fd:
    FileNotFoundError: [Errno 2] No such file or directory: '[snip]/newborgkey'

    Platform: Linux straglum 5.0.0-25-generic #26~18.04.1-Ubuntu SMP Thu Aug 1 13:51:02 UTC 2019 x86_64
    Linux: debian buster/sid
    Borg: 1.1.11  Python: CPython 3.7.7 msgpack: 0.5.6
    PID: 15306  CWD: /home/strager/Projects/borg
    sys.argv: ['[snip]/borg', 'key', 'import', '/home/strager/borg-backups/straglum', 'borgkey']
    SSH_ORIGINAL_COMMAND: None

Make 'borg key import' not require the BORG_KEY_FILE file to already
exist.

This commit does not change the behavior of 'borg key import' without
BORG_KEY_FILE. This commit also does not change the behavior of 'borg
key import' on a repokey repository.
2020-06-04 19:29:15 -07:00
Matthew Glazar
538d3245cd refactor key file searching functions
I want to change the key lookup logic for the 'borg key import' command.
Extract methods out of the KeyfileKey.find_key and
KeyfileKey.get_new_target to make this future change possible without
duplicating code.

This commit should not change behavior.
2020-06-03 19:02:33 -07:00
Peter Gerber
00b09370c0
Allow creating archives using stdout of given command (#5174)
allow creating archives using stdout of given command

In addition to allowing:

some-command --param value | borg create REPO::ARCH -

also allow:

borg create --content-from-command create REPO::ARCH -- some-command --param value

The difference is that the latter approach deals with errors properly.
In the former example, an archive is created no matter what. Even, if
`some-command` aborts and the output is truncated, Borg won't realize.
In the latter example, the status code is checked and archive creation
is aborted properly when appropriate.
2020-06-02 22:24:14 +02:00
Uriel
8b6f4a1afe
docs: explain hash collision (#5188)
explain hash collision probability, fixes #4884
2020-06-02 22:19:54 +02:00
TW
b504d3dd41
Merge pull request #5197 from FelixSchwarz/pytest-warning
declare "allow_cache_wipe" marker in pytest.ini to avoid pytest warning
2020-06-02 22:14:45 +02:00
TW
ebd83a5688
Merge pull request #5206 from elho/feature/fix-unintended-preload
fix memory leak related to preloading, fixes #5202

affected: extract, recreate and other functions.
2020-06-02 02:39:20 +02:00
Felix Schwarz
3f68f40a38 declare "allow_cache_wipe" marker in setup.cfg to avoid pytest warning
Undeclared markers trigger a pytest warning:

    PytestUnknownMarkWarning: Unknown pytest.mark.allow_cache_wipe - is this a typo?
2020-06-01 22:47:34 +02:00
TW
47b1c47459
Merge pull request #5204 from ThomasWaldmann/fix-sporadic-test_delete_force-failure-master
test_delete_force: avoid sporadic test setup issues, fixes #5196
2020-06-01 17:58:05 +02:00
Elmar Hoffmann
dad3aa9dae rename local preload() function to not overwrite keyword argument of same name
The locally defined preload() function overwrites the preload boolean keyword
argument, always evaluating to true, so preloading is done, even when not
requested by the caller, causing a memory leak.
Also move its definition outside of the loop.

This issue was found by Antonio Larrosa in borg issue #5202.
2020-06-01 17:12:51 +02:00
Thomas Waldmann
bf2fadc54d test_delete_force: avoid sporadic test setup issues, fixes #5196
the old test stumbled over files with an empty chunks list,
so I guess just having some empty file in src/borg could make
that test fail.

fixed this by deleting a chunk of some specific file (we use
this file / this construction at misc. other places in the
archiver tests).
2020-06-01 15:38:52 +02:00
Hauke Rehfeld
9019b48fd5
parseformat: unnecessary calls removed (#5169)
parseformat: unnecessary calls removed

also: list item formatter: remove add_key because only use was in the constructor
2020-04-30 20:11:38 +02:00
TW
08a12cc405
Merge pull request #5160 from fantasya-pbem/bugfix/borg-config-last-segment-checked
borg config --list does not show last_segment_checked, fixes #5159
2020-04-28 19:31:32 +02:00
Thalian
94189b3203 [BUGFIX] Borg config --list does not show last_segment_checked, #5159
fixes #5159
2020-04-27 21:31:57 +02:00
RR
0e76dff33e
fix "--recompress option is counter intuitive", fixes #5154 (#5155)
docs: clarify --recompress option, fixes #5154
2020-04-27 21:08:47 +02:00
TW
fae0b9b1ee
Merge pull request #5153 from ThomasWaldmann/rel120a8
release 1.2.0 alpha 8
2020-04-22 22:33:27 +02:00
Thomas Waldmann
1c7d267e1f pypi metadata: we also support python 3.8 now
tested regularly on travis-ci.
2020-04-21 23:14:20 +02:00
Thomas Waldmann
403dabd8f6 MANIFEST.in: add syncfilerange.c, reformat 2020-04-21 23:11:03 +02:00
Thomas Waldmann
1581c4f9c4 build_man 2020-04-21 22:59:27 +02:00
Thomas Waldmann
17220e09ab build_usage 2020-04-21 22:56:55 +02:00
Thomas Waldmann
95d10b84c4 update CHANGES, set release date 2020-04-21 22:52:54 +02:00
TW
914a52ac15
Merge pull request #4683 from elho/only-compress-if-smaller
only store compressed data if the result actually is smaller
2020-04-21 22:43:03 +02:00
Elmar Hoffmann
d1e730355d only store compressed data if the result actually is smaller
- add DecidingCompressor class providing generic decide(),
  decide_compress() and compress() suited to work using a typical
  private _decide() implementation that eventually generates compressed
  data as a side-effect of the actual decision process
- the new decide_compress() method returns both the actually used
  compressor (which may be NONE) and the compressed data to allow
  the auto compressor to use that information instead of having to
  figure out whether the LZ4 compressor decided to use NONE or LZ4
  compression
- derive LZ4, LZMA and ZSTD classes from DecidingCompressor and
  have them fall back to NONE if the compressed data turns out bigger
  than the original data
- leave ZLIB as is, as it does not use an ID header and compatibility
  being the only reason to use it instead of above algorithms anyway
- adapt testsuite to cope with incompressible test data not being
  compressed
- add tests to verify that incompressible data is not compressed to
  larger size compressed data
2020-04-21 18:32:12 +02:00
TW
27a41f5c1f
Merge pull request #5115 from ThomasWaldmann/redo-pr-4269
docs: clarify borg init's encryption modes
2020-04-21 11:45:40 +02:00
TW
cac301ef25
Merge pull request #5151 from ThomasWaldmann/update-changes-master
update CHANGES (master)
2020-04-21 11:42:47 +02:00
Thomas Waldmann
b5ab795d6f update CHANGES (master) 2020-04-20 22:36:41 +02:00
TW
088dbf9e20
Merge pull request #5147 from ThomasWaldmann/vagrant-updates3
Vagrant updates3
2020-04-20 21:24:31 +02:00
TW
b2e6810a95
Merge pull request #5148 from finefoot/patch-3
Fix read-only tests for fakeroot environment
2020-04-20 21:23:04 +02:00
finefoot
07e445f026
Fix read-only tests for fakeroot environment 2020-04-20 20:29:37 +02:00
Thomas Waldmann
75d90fe27c vagrant: use pyenv in freebsd64 VM
... so we have the same python 3.6.9 based build as in the macOS and Linux VM.
2020-04-20 16:59:35 +02:00
TW
dc95c88242
Merge pull request #5141 from finefoot/patch-1
Fix testing of unsuccessful mount
2020-04-20 12:55:22 +02:00
TW
9a1a807680
Merge pull request #5145 from ThomasWaldmann/vagrant-fixes2
Vagrant fixes2
2020-04-20 12:54:34 +02:00
Thomas Waldmann
e8d6ad6fa3 vagrant: update darwin box
now using a box with preinstalled brew + borg requirements.
2020-04-20 12:52:53 +02:00
finefoot
f320384827
Fix testing of unsuccessful mount 2020-04-19 22:24:11 +02:00
Thomas Waldmann
c2cc7223ae vagrant: use a FreeBSD 12.1 box 2020-04-19 20:46:24 +02:00
Thalian
bfbb1ca525 [DOCS] Move content of resources doc page to community project, #2088 2020-04-19 19:13:02 +02:00
TW
71fa7ed9fe
Merge pull request #5138 from fantasya-pbem/docs/4160_Add-note-about-stored-paths-1.2
[DOCS] Add note about patterns and stored paths, #4160
2020-04-19 13:42:08 +02:00
Thalian
f4f1a75a15 [DOCS] Add note about patterns and stored paths, #4160
Add a section that explains storage of relative paths and how patterns can be used arbitrarily since Borg 1.2.
2020-04-19 12:20:46 +02:00
TW
fb06160fd5
Merge pull request #5134 from ThomasWaldmann/vagrant-fixes
Vagrant fixes (master)
2020-04-18 23:09:39 +02:00
TW
b46fcf0516
Merge pull request #5133 from fantasya-pbem/bugfix/4029_Borg-commands-accept-absolute-paths
[BUGFIX] Borg commands accept absolute pathes, #4029
2020-04-18 23:08:26 +02:00
Thomas Waldmann
c75a7e4156 pyinstaller: work around issue with setuptools > 44
see https://github.com/pypa/setuptools/issues/1963
2020-04-18 23:01:24 +02:00
Thomas Waldmann
49e21b2754 vagrant: fixes for freebsd 12.1 2020-04-18 22:59:13 +02:00
Thalian
ece47ee9e4 [BUGFIX] Borg commands accept absolute pathes, #4029
Strip leading path separator before trying to match a path.
2020-04-18 21:58:17 +02:00
Thomas Waldmann
dd070c05c9 vagrant: fix debianoid virtualenv packages
there is no python-virtualenv on focal64,
but "virtualenv" installs everything needed.
2020-04-18 21:48:04 +02:00
TW
ba154d1104
Merge pull request #5119 from jrast/win-path-fix
Fixed windows path parsing
2020-04-18 01:09:22 +02:00
Jürg Rast
64b6bc88e7 Fixed windows path parsing
The parsing of windows path failed because a undefined variable
was referenced.
2020-04-17 22:42:23 +02:00
TW
a6e4d808e1
Merge pull request #5117 from fantasya-pbem/docs/5090_Add-pip-install-tools
[DOC] Add upgrade of tools to pip installation how-to
2020-04-17 17:45:08 +02:00
Thalian
5cb8bd0dd0 [DOC] Add upgrade of tools to pip installation how-to
fixes #5090
2020-04-17 07:53:48 +02:00
Thomas Waldmann
b5d6e23d84 docs: clarify borg init's encryption modes 2020-04-16 21:35:33 +02:00
TW
80e381c6ea
Merge pull request #5099 from fantasya-pbem/feature/4029_Remove-leading-slashes
let borg commands work tolerate absolute paths, fixes #4029
2020-04-16 20:51:18 +02:00