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

5884 commits

Author SHA1 Message Date
TW
303c11f245
rephrase some warnings, fixes #5164 (#5241)
rephrase some warnings, fixes #5164

borg check --repair and borg recreate are now present in the code since rather long, so they are not experimental any more.

borg recreate might be used wrongly (e.g. accidentally excluding everything / not matching anything when recreating an archive). added some warning words in the docs, but it will not ask for confirmation any more.

borg check: there might be kinds of corruption borg check --repair can not fix and it might make things even worse while trying to fix. so this will still ask for confirmation, just with different wording.
2020-07-10 19:26:18 +02:00
TW
9b8ba5f6f7
Merge pull request #4954 from alfredo08154711/issue-lockmigr
Fixed lock migration, issue #4953
2020-07-10 00:44:04 +02:00
Thomas Portmann
ef9fdcf992 fix race condition in lock migration, fixes #4953
- add a daemonizing() ctx manager

The foreground borg mount process (local repo) survives until the lock
migration (performed by the background) is finished, so the lock to be
migrated is never stale, and the race condition is gone.

- add a test case revealing that locking is not safe during daemonization (borg mount)

- amend printing in testsuite.archiver
2020-07-09 21:31:13 +02:00
TW
82542f286c
Merge pull request #5247 from ThomasWaldmann/blackwhite
use allow/deny list wording
2020-07-09 15:29:59 +02:00
Thomas Waldmann
264c799c50 use allow/deny list wording 2020-07-07 23:01:55 +02:00
TW
ca75f08c14
Merge pull request #5246 from ThomasWaldmann/sizeof_fmt
sizeof_fmt
2020-07-06 22:58:35 +02:00
Thomas Waldmann
87e3b699c0 revert 0-formatting to be compatible with previous behaviour
as we format differences (growing/shrinking) we want:
-N  # negative / shrinking
 0  # no change -> no +/- sign here!
+N  # positive / growing
2020-07-06 19:47:15 +02:00
Dark Dragon
831448684c Improve sizeof_fmt()
- Use built-in sign handling
- Format integer correctly when using biggest unit
- Use consistent format inside and outside of loop
2020-07-06 19:42:36 +02:00
Thomas Portmann
dfc5e915cc
Fixed locking, issue #4923 (#4928)
locking: fix ExclusiveLock race condition bug, fixes #4923

- ExclusiveLock is now based on os.rename instead of os.mkdir.
- catch FileNotFoundError observed under race condition in ExclusiveLock.release()
  and .kill_stale_lock()
- added TestExclusiveLock.test_race_condition() which reveals issue #4923
- updated docs
- locking: use "raise LockTimeout from None" for prettier traceback

Co-authored-by: Thomas Portmann <thomas@portmann.org>
Co-authored-by: Thomas Waldmann <tw@waldmann-edv.de>
2020-07-03 10:09:32 +02:00
TW
f2f8692f86
Merge pull request #5242 from ThomasWaldmann/fix-rc-on-signal
exit with 128 + signal number, fixes #5161
2020-07-01 18:55:41 +02:00
Thomas Waldmann
e0545e921d exit with 128 + signal number, fixes #5161
as documented:

https://borgbackup.readthedocs.io/en/stable/usage/general.html#return-codes

compatibility warning: in case you have scripts expecting rc == 2 for a
signal exit, you need to update them to check for >= 128.
2020-06-30 00:17:10 +02:00
TW
5b5bd9f7f2
Merge pull request #5238 from fantasya-pbem/docs/5193_Recreate-exclude-if-present
docs: clarify --exclude-if-present in recreate, #5193
2020-06-29 21:18:12 +02:00
TW
2ea3878234
Update FUNDING.yml 2020-06-29 01:28:23 +02:00
TW
57843f3f52
Create FUNDING.yml 2020-06-29 01:14:20 +02:00
Thalian
f096656438 docs: clarify how exclude options work in recreate, #5193
fixes #5193
2020-06-28 15:40:28 +02:00
TW
7033d5054f
Merge pull request #5226 from ThomasWaldmann/server-enforces-umask
--umask is for the local borg process only, fixes #4947
2020-06-28 14:58:41 +02:00
Benedikt Seidl
6a1f31bf29
[DOCS] Add socat pull mode (#5150)
docs: describe socat pull mode, fixes #900

also: fix sphinx deprecation warning

borg/docs/conf.py:114: RemovedInSphinx40Warning: The app.add_stylesheet() is deprecated. Please use app.add_css_file() instead.
2020-06-23 02:09:35 +02:00
TW
e351eedd87
Merge pull request #5140 from fantasya-pbem/docs/2088_Move-resources
[DOCS] Move content of resources doc page to community project, #2088
2020-06-20 01:04:02 +02:00
TW
8e846935a2
Merge pull request #5201 from strager/import-to-key-file
allow key-import+BORG_KEY_FILE to create key files
2020-06-20 00:32:09 +02:00
TW
a8c262f3c1
Merge pull request #5227 from ThomasWaldmann/fix-4911
hardlinked CACHEDIR.TAG issue
2020-06-20 00:29:56 +02:00
Thomas Waldmann
d2536de4ee fix hardlinked CACHEDIR.TAG processing, fixes #4911 2020-06-14 22:00:02 +02:00
Thomas Waldmann
29731401b5 add test for hardlinked CACHEDIR.TAG issue #4911 2020-06-14 20:36:47 +02:00
Thomas Waldmann
c531901763 --umask is for the local borg process only, fixes #4947
The umask value is NOT transmitted from client to server any more,
so the borg client can not influence the borg server umask any more.

If one wants to have a specific umask on the server side, one needs to
use a ssh forced command in .ssh/authorized_keys file.

OTOH, as the default value is 077 (in general, for client as well as for
the server) and the server does not take the value from the client any more,
there usually should be no need to give it on the server side, IF you are
happy with the default value.
2020-06-14 18:35:03 +02:00
TW
23f4a7d874
Merge pull request #5224 from ThomasWaldmann/read-special-part-files-mode
--read-special: .part files also should be regular files, fixes #5217
2020-06-14 16:39:20 +02:00
Thomas Waldmann
dee402652f --read-special: .part files also should be regular files, fixes #5217 2020-06-14 15:36:22 +02:00
TW
91cf1a35b0
Merge pull request #5223 from ThomasWaldmann/update-changes
update CHANGES
2020-06-14 15:28:03 +02:00
Thomas Waldmann
bfd80ee64a update CHANGES with 1.1.12 and 1.1.13 changelog 2020-06-14 15:08:37 +02:00
Thomas Waldmann
fc669b387a update CHANGES 2020-06-14 14:57:42 +02:00
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