Commit graph

1516 commits

Author SHA1 Message Date
Thomas Waldmann
24d3400dd4 borg export-tar: fix memory leak with ssh: remote repository, fixes #5568
also: added a comment how to avoid this kind of memory leak.
2020-12-17 22:55:13 +01:00
Thomas Waldmann
6a18c47464 cosmetic: make parens structure in borg export-tar similar to borg extract 2020-12-17 22:54:59 +01:00
Thomas Waldmann
2815ba51fa use same code in export-tar as in extract
the partial_extract parameter was missing and that can lead to to many items being preloaded.
2020-12-17 22:54:44 +01:00
Guinness
9052c1cc54
Add repo location to the stats in borg create 2020-12-16 13:46:29 +01:00
Nehalenniæ Oudin
5017bc4d04
Add a --list switch to borg delete (#5503)
add a --list switch to borg delete, fixes #5116
2020-12-11 19:11:47 +01:00
Thomas Waldmann
e884b80065 debug info / sysinfo: add infos about FUSE, fixes #5546 2020-12-06 19:10:44 +01:00
Lapinot
e1af909d2b
create: implement --paths-from-stdin and --paths-from-command (#5538)
create: implement --paths-from-stdin and --paths-from-command, see #5492

These switches read paths to archive from stdin. Delimiter can specified
by --paths-delimiter=DELIM. Paths read will be added honoring every
option but exclusion options and --one-file-system. Directories aren't
recursed into.
2020-12-06 17:28:25 +01:00
Thomas Waldmann
b45874bead ObfuscateSize compressor 2020-12-02 14:21:42 +01:00
Thomas Waldmann
b5c0384fb1 add a test for the hashindex corruption bug, fixes #5531
for the bug, see #4829.
2020-12-02 03:28:32 +01:00
Nehalenniæ Oudin
2c8e523848
Complements the documentation for pattern files and exclude files (#5520)
docs: "filename with spaces" example added to exclude file, fixes #5236

note: no whitespace escaping needed, processed by borg.
2020-11-29 18:01:38 +01:00
Rémi Oudin
fc925878fc
Fixes BORG_CACHE_DIR crashing borg if empty (#5485)
Atomic handling of recursive directory creation, fixes #5216
2020-11-22 15:07:13 +01:00
TW
ac77dd491d
Merge pull request #5433 from luke-jr/files_cache_suffix
Allow appending the files cache filename with BORG_FILES_CACHE_SUFFIX env var
2020-11-16 18:51:40 +01:00
Luke Dashjr
dbbd3f1b63 Rather than error beginning a txn, create an empty files cache if it didn't exist before 2020-11-15 17:01:36 +00:00
Luke Dashjr
a0322d241d Allow appending the files cache filename with BORG_FILES_CACHE_SUFFIX env var 2020-11-15 17:01:36 +00:00
TW
1f3a91f72f
Merge pull request #5496 from ThomasWaldmann/item-assert-dict
PropDict: fail early if internal_dict is not a dict
2020-11-15 15:38:03 +01:00
Lapinot
34f6cfcd81
Outsource recursive directory walking (#5492)
Split recursive directory walking/processing into walking and item processing.
2020-11-15 15:31:01 +01:00
Thomas Waldmann
95ee729086 PropDict: refactor / micro-optimize
- do not call update methods if there is nothing to do (empty dict)
- order if/elif/else by simplicity / probability
2020-11-10 13:49:15 +01:00
Thomas Waldmann
0e1cf2056b PropDict: fail early if internal_dict is not a dict 2020-11-10 13:35:07 +01:00
Milkey Mouse
47143cae76
Make timestamp helper timezone-aware 2020-11-05 01:27:46 -08:00
Milkey Mouse
9084f94ba2
Remove redundant copy of timestamp helper 2020-11-05 00:51:08 -08:00
Milkey Mouse
3644bd14dc
Add tests for Location.with_timestamp 2020-11-03 13:00:37 -08:00
Milkey Mouse
16c49d177b
Use --timestamp for {utcnow} and {now} if given (fixes #5189) 2020-11-03 13:00:31 -08:00
TW
47e96bc261
Merge pull request #5475 from milkey-mouse/fp-5377
docs: how to approach borg speed issues (forward port)
2020-11-03 15:55:15 +01:00
TW
02d917b460
Merge pull request #5477 from milkey-mouse/fp-5418
fix --dry-run and --stats coexistence
2020-11-03 15:49:11 +01:00
Milkey Mouse
626d44a57d
Sufficiently corrupt files for tests (fixes #5438) 2020-11-02 19:10:46 -08:00
Thomas Waldmann
2a73adadd0 fix --dry-run and --stats coexistence, fixes #5415 2020-11-02 17:47:16 -08:00
Thomas Waldmann
60ee199a0f docs: how to approach borg speed issues, fixes #5371
also: give a speed example for unchanged files

also: explicitly mention chmod/chown changing ctime

also: reformat one paragraph
2020-11-02 17:36:08 -08:00
TW
b05182260c
Merge pull request #5430 from ThomasWaldmann/pyfuse3
add pyfuse3 as an alternative lowlevel fuse implementation
2020-11-02 22:51:17 +01:00
Dan Hipschman
1a94c2e27a Allow EIO with warning when trying to hardlink 2020-11-01 14:26:56 -08:00
Phil Kulin
c0504c0669 create: implement --stdin-mode, --stdin-user and --stdin-group, #5333 2020-11-01 20:45:56 +03:00
Thomas Waldmann
49b1421682 FUSE: support pyfuse3 additionally to llfuse, fixes #5407
FUSE implementation can be switched via env var BORG_FUSE_IMPL.
2020-10-31 22:04:44 +01:00
Marian Beermann
c81bc43ad5 export-tar: set tar format to GNU_FORMAT explicitly
Python 3.8 changed the default format to PAX, but GNU format is
documented for Borg.
2020-10-17 21:52:40 +02:00
eike-fokken
1f0458d016
Clarify '--one-file-system' for btrfs (#5391)
docs: clarify borg create's '--one-file-system' option, #4009

The documentation now explicitly mentions btrfs subvolumes and
explains how --one-file-system works.

Co-authored-by: Eike <e.fokken+git@posteo.de>
2020-10-12 13:26:09 +02:00
Thomas Waldmann
725402371d upgrade bundled zstd to 1.4.5 2020-10-04 19:03:17 +02:00
Thomas Waldmann
f41a264d77 if self test fails, also point to OS and hardware, fixes #5334 2020-10-01 20:58:58 +02:00
Thomas Waldmann
24e89dd1aa upgrade bundled xxhash to 0.8.0, fixes #5362 2020-09-29 12:11:38 +02:00
Thomas Waldmann
90aef3bfcc docs: mention double --force in prune docs 2020-09-27 23:57:30 +02:00
TW
47446f2043
Merge pull request #5330 from ThomasWaldmann/better-error-msg-large-archive
prettier error message when archive gets too big, fixes #5307
2020-09-22 12:22:29 +02:00
Thomas Waldmann
0839ac3034 prettier error message when archive gets too big, fixes #5307 2020-09-08 21:00:27 +02:00
Thomas Waldmann
bf8706b741 fixup: invert nesting of context managers
cleaner teardown of contexts:

close mmap, close src_fd (reading), close dst_fd (and rename)

maybe it was not a real problem to rename a still open-for-reading / mmapped file,
but in any case it is cleaner like now.
2020-09-08 18:26:03 +02:00
Thomas Waldmann
b198160257 check --repair: fix potential data loss, fixes #5325
We already have used SaveFile context manager since long at other places.
By using it, the original segment file stays in place until recovery of it
is completed (writing/syncing into *.tmp).
On successful completion, .tmp is renamed over original + dir syncing.
If aborted by some exception, including Ctrl-C, the original file is unmodified.
2020-09-08 18:25:36 +02:00
TW
9d96d78d19
Merge pull request #5266 from fantasya-pbem/docs/5165_recreate-list-item-flags_master
docs: point to borg create --list item flags in recreate usage, fixes #5165
2020-07-30 12:12:17 +02:00
Thalian
78396bfc23 docs: point to borg create --list item flags in recreate usage, fixes #5165 2020-07-30 07:39:33 +02:00
Peter Gerber
97f84a6cb2 Stop relying on false exiting with status code 1
According to the manpage, it's only guaranteed to return with
an exit code indicating an error. However, the manpage is silent
on the exact code returned.

Likely fixes #5273.
2020-07-29 06:12:08 +00:00
Thomas Waldmann
7bfa766192 persist shadow_index in between borg runs, fixes #4830
in borg 1.1, compact_segments() was always run directly after some repo writing
operation (in same borg process). but now, only "borg compact" is used to compact
segments and it is a separate borg invocation (new process), so we need to persist
the shadow_index so we do not lose that information.
2020-07-28 21:15:56 +02:00
Thomas Waldmann
9bf030ef2c add a test for hints persistence and behaviour, see #4830 2020-07-28 21:15:31 +02:00
Thomas Waldmann
220d890f32 fix locking on openindiana, fixes #5271
OI rmdir gives errno 17 EEXIST when trying to remove a non-empty dir,
not ENOTEMPTY like other OSes.

Also: fix one error handler to also use a tuple-member check instead of "or".
2020-07-26 15:25:26 +02:00
Thalian
528e507d21 docs: add a note to create from stdin regarding files cache, fixes #5180 2020-07-25 20:10:29 +02:00
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
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