Commit Graph

1826 Commits

Author SHA1 Message Date
Antoine Beaupré cd14b766ca add NixOS 2016-01-13 15:18:19 -05:00
Antoine Beaupré 178b9dc151 sort OS list alphabetically 2016-01-13 15:18:03 -05:00
Antoine Beaupré 3e434ce6fb mention debian testing, ubuntu backport 2016-01-13 15:17:54 -05:00
Jerry Jacobs a7c1419b6e docs/deployment: Add borg storage server setup example 2016-01-13 21:06:03 +01:00
Michael Hanselmann 2369b8a0f2 Strip whitespace when loading exclusions from file
Patterns to exclude files can be loaded from a text file using the
“--exclude-from” option. Whitespace at the beginning or end of lines was
not stripped. Indented comments would be interpreted as a pattern and
a misplaced space at the end of a line--some text editors don't strip
them--could cause an exclusion pattern to not match as desired. With the
recent addition of regular expression support for exclusions the spaces
can be matched if necessary (“^\s” or “\s$”), though it's highly
unlikely that there are many paths deliberately starting or ending with
whitespace.
2016-01-13 17:39:22 +01:00
Michael Hanselmann 2bafece093 Implement exclusions using regular expressions
The existing option to exclude files and directories, “--exclude”, is
implemented using fnmatch[1]. fnmatch matches the slash (“/”) with “*”
and thus makes it impossible to write patterns where a directory with
a given name should be excluded at a specific depth in the directory
hierarchy, but not anywhere else. Consider this structure:

  home/
  home/aaa
  home/aaa/.thumbnails
  home/user
  home/user/img
  home/user/img/.thumbnails

fnmatch incorrectly excludes “home/user/img/.thumbnails” with a pattern
of “home/*/.thumbnails” when the intention is to exclude “.thumbnails”
in all home directories while retaining directories with the same name
in all other locations.

With this change regular expressions are introduced as an additional
pattern syntax. The syntax is selected using a prefix on “--exclude”'s
value. “re:” is for regular expression and “fm:”, the default, selects
fnmatch. Selecting the syntax is necessary when regular expressions are
desired or when the desired fnmatch pattern starts with two alphanumeric
characters followed by a colon (i.e. “aa:something/*”). The exclusion
described above can be implemented as follows:

  --exclude 're:^home/[^/]+/\.thumbnails$'

The “--exclude-from” option permits loading exclusions from a text file
where the same prefixes can now be used, e.g. “re:\.tmp$”.

The documentation has been extended and now not only describes the two
pattern styles, but also the file format supported by “--exclude-from”.

This change has been discussed in issue #43 and in change request #497.

[1] https://docs.python.org/3/library/fnmatch.html

Signed-off-by: Michael Hanselmann <public@hansmi.ch>
2016-01-13 17:39:19 +01:00
Michael Hanselmann 93c9c49250 Reduce code duplication in inclusion/exclusion pattern logic
The two classes for applying inclusion and exclusion patterns contained
unnecessarily duplicated logic. The introduction of a shared base class
allows for easier reuse, especially considering that two more classes
are going to be added in forthcoming changes (regular expressions and
shell-style patterns).
2016-01-13 14:35:59 +01:00
Michael Hanselmann 5d40eba175 Convert pattern test to py.test
The test for exclusion patterns was written using the standard unittest
module. The py.test module provides facilities to parametrize the test.
2016-01-13 12:39:37 +01:00
Thomas Waldmann 7420ea0033 sphinx configuration: fix to create a simple man page from usage docs 2016-01-13 01:20:32 +01:00
Thomas Waldmann 4216a94e19 it's 2016 2016-01-13 00:42:23 +01:00
Thomas Waldmann 86ec3847e2 Authors: make it more clear what refers to borg and what to attic
With some sphinx output formats (e.g. "man") that was not too
clear before this change.
2016-01-13 00:36:14 +01:00
Thomas Waldmann 9a2d1eb1d8 docs: replace "|project_name|" with just "Borg", less ugly 2016-01-13 00:25:43 +01:00
Thomas Waldmann 0f4d3b21c3 minor development docs fixes 2016-01-12 23:49:19 +01:00
TW 4a9672e8d5 Merge pull request #538 from ThomasWaldmann/fix-library-path
unset LD_LIBRARY_PATH before invoking ssh, hopefully fixes #514
2016-01-12 19:58:04 +01:00
TW 2921b60e69 Merge pull request #539 from ThomasWaldmann/add-version
display borg version below tracebacks, fixes #532
2016-01-12 19:57:41 +01:00
TW 0f02513410 Merge pull request #540 from ThomasWaldmann/isotimestamp-with-wkday
add abbreviated weekday to timestamp format, fixes #496
2016-01-12 19:57:14 +01:00
TW d02def56f5 Merge pull request #543 from hansmi/dedent-pattern-help
Dedent pattern help text
2016-01-12 19:29:07 +01:00
Michael Hanselmann 98da9d1b96 Dedent pattern help text
The help text describing patterns should be dedented like other
multi-paragraph text blocks.
2016-01-12 17:53:34 +01:00
Thomas Waldmann 84672f7081 log stats consistently, fixes #526
prune and create now both require --verbose --stats to show stats.
it was implemented in this way (and not with print) so you can feed the stats data
into the logging system, too.

delete now says "Archive deleted" in verbose mode (for consistency,
it already said "Repository deleted" when deleting a repo).

also: add helpers.log_multi to comfortably and prettily output a block of log lines
2016-01-12 00:41:06 +01:00
Thomas Waldmann e5c29bd145 add abbreviated weekday to timestamp format, fixes #496 2016-01-11 23:31:24 +01:00
Thomas Waldmann 857f563307 display borg version below tracebacks, fixes #532 2016-01-11 23:22:04 +01:00
TW c5dcf46d44 Merge pull request #531 from hansmi/add-exclude-from-test
Factorize and test loading of excludes from file
2016-01-11 19:52:32 +01:00
Michael Hanselmann 02e04653b6 Factorize and test loading of excludes from file
The parsing code for exclude files (given via `--exclude-from`) was not
tested. Its core is factorized into a separate function to facilitate an
easier test. The observable behaviour is unchanged.
2016-01-11 12:24:26 +01:00
Thomas Waldmann 170f847e74 unset LD_LIBRARY_PATH before invoking ssh, hopefully fixes #514 2016-01-11 02:08:58 +01:00
TW 89fbaa9767 Merge pull request #518 from htgoebel/patch-1
Update FAQ
2016-01-11 00:03:49 +01:00
Hartmut Goebel 0c2e517e04 Update FAQ
Clarify that user and group of owner are stored as name, except if --numeric-owner is given.
2016-01-09 23:50:41 +01:00
TW 047cfc90e7 Merge pull request #534 from lfam/contrib-docs
docs: Give project name in usage example.
2016-01-09 05:14:43 +01:00
Leo Famulari 077ebe8c49 docs: Give project name in usage example.
* docs/usage.rst: Replace "|project_name|" with "borg" because the
abstraction doesn't work in usage examples.
2016-01-08 21:02:03 -05:00
TW 267347ad3f Merge pull request #530 from hansmi/fix-typo
Fix typo in comment
2016-01-07 18:21:11 +01:00
Michael Hanselmann d668901df4 Fix typo in comment 2016-01-07 11:18:03 +01:00
TW 19afaa813c Merge pull request #525 from dragetd/fix-docs
docs: standalone binary needs exec on temp
2016-01-06 15:11:32 +01:00
TW 48e9b9cb15 Merge pull request #524 from ThomasWaldmann/libc-loader-fallback
add some error handling/fallback for C library loading, fixes #494
2016-01-06 14:43:17 +01:00
Michael Gajda fb64173bb4 Documentation: Standalone binary / pyinstaller extracts dependencies into /tmp. Currently /tmp requires about ~28MB of free space. It also needs exec permissions.
Closes #499
2016-01-06 13:35:28 +01:00
TW d706ad53ee Merge pull request #516 from elnappo/patch-1
Allow simple copy-paste for package installation with apt
2015-12-31 18:25:14 +01:00
Fabian Weisshaar eb642f06cc Allow simple copy-paste for package installation with apt 2015-12-30 15:06:31 +01:00
TW 4639617e2b Merge pull request #511 from ThomasWaldmann/progress-update-quicker
output progress indication from inner loop, fixes #500
2015-12-29 11:56:17 +01:00
Thomas Waldmann 4ed71e2cf5 add some error handling/fallback for C library loading, fixes #494 2015-12-27 14:10:41 +01:00
Thomas Waldmann c9afa2b27b output progress indication from inner loop, fixes #500
- so it shows progress while it backups a bigger file
- so it announces the filename earlier

also: move rate limiting code to show_progress()
2015-12-27 11:06:03 +01:00
Thomas Waldmann 546052ed92 README: minor grammar fix, minor other changes 2015-12-20 16:38:38 +01:00
TW 8cb901b2f1 Merge pull request #504 from ThomasWaldmann/fix-503
fix badly named environment variable, fixes #503
2015-12-20 02:21:53 +01:00
Thomas Waldmann 57b913bc88 fix badly named environment variable, fixes #503
added: BORG_DELETE_I_KNOW_WHAT_I_AM_DOING for the check in "borg delete"
2015-12-20 02:03:33 +01:00
TW ae4a56997f Merge pull request #486 from anarcat/docs-ml
rephrase the mailing list section
2015-12-14 15:10:57 +01:00
Antoine Beaupré f861f1f080 rephrase the mailing list section 2015-12-13 15:59:33 -05:00
Thomas Waldmann c200b79470 development docs: run build_api and build_usage before tagging release 2015-12-13 21:34:37 +01:00
Thomas Waldmann 393e36b6da updated internals docs: hash table max. load factor is 0.75 now 2015-12-13 19:58:32 +01:00
Thomas Waldmann 2ecfa54aee ran build_api and build_usage 2015-12-13 15:47:03 +01:00
Thomas Waldmann f3d60fdb37 update CHANGES 2015-12-13 15:41:18 +01:00
TW 3180bc5b79 Merge pull request #485 from ThomasWaldmann/fuse-improvements
results of some llfuse experiments
2015-12-13 14:43:12 +01:00
Thomas Waldmann 95f6cd4a4e Merge branch 'master' of github.com:borgbackup/borg 2015-12-13 14:26:49 +01:00
Thomas Waldmann 7b61731021 Merge branch 'ThomasWaldmann-remote-logging' 2015-12-13 14:23:44 +01:00