|
| 1 | +diff --git a/borgmatic/commands/arguments.py b/borgmatic/commands/arguments.py |
| 2 | +index 2eba9ff..f20984f 100644 |
| 3 | +--- a/borgmatic/commands/arguments.py |
| 4 | ++++ b/borgmatic/commands/arguments.py |
| 5 | +@@ -876,7 +876,7 @@ def make_parsers(): |
| 6 | + ) |
| 7 | + config_bootstrap_group.add_argument( |
| 8 | + '--user-runtime-directory', |
| 9 | +- help='Path used for temporary runtime data like bootstrap metadata. Defaults to $XDG_RUNTIME_DIR or /var/run/$UID', |
| 10 | ++ help='Path used for temporary runtime data like bootstrap metadata. Defaults to $XDG_RUNTIME_DIR or $TMPDIR or $TEMP or /var/run/$UID', |
| 11 | + ) |
| 12 | + config_bootstrap_group.add_argument( |
| 13 | + '--borgmatic-source-directory', |
| 14 | +diff --git a/borgmatic/config/paths.py b/borgmatic/config/paths.py |
| 15 | +index d56ccc5..ad318d6 100644 |
| 16 | +--- a/borgmatic/config/paths.py |
| 17 | ++++ b/borgmatic/config/paths.py |
| 18 | +@@ -30,7 +30,8 @@ def get_borgmatic_runtime_directory(config): |
| 19 | + ''' |
| 20 | + Given a configuration dict, get the borgmatic runtime directory used for storing temporary |
| 21 | + runtime data like streaming database dumps and bootstrap metadata. Defaults to |
| 22 | +- $XDG_RUNTIME_DIR/./borgmatic or /run/user/$UID/./borgmatic. |
| 23 | ++ $XDG_RUNTIME_DIR/./borgmatic or $TMPDIR/./borgmatic or $TEMP/./borgmatic or |
| 24 | ++ /run/user/$UID/./borgmatic. |
| 25 | + |
| 26 | + The "/./" is taking advantage of a Borg feature such that the part of the path before the "/./" |
| 27 | + does not get stored in the file path within an archive. That way, the path of the runtime |
| 28 | +@@ -39,10 +40,10 @@ def get_borgmatic_runtime_directory(config): |
| 29 | + return expand_user_in_path( |
| 30 | + os.path.join( |
| 31 | + config.get('user_runtime_directory') |
| 32 | +- or os.environ.get( |
| 33 | +- 'XDG_RUNTIME_DIR', |
| 34 | +- f'/run/user/{os.getuid()}', |
| 35 | +- ), |
| 36 | ++ or os.environ.get('XDG_RUNTIME_DIR') |
| 37 | ++ or os.environ.get('TMPDIR') |
| 38 | ++ or os.environ.get('TEMP') |
| 39 | ++ or f'/run/user/{os.getuid()}', |
| 40 | + '.', |
| 41 | + 'borgmatic', |
| 42 | + ) |
| 43 | +diff --git a/borgmatic/config/schema.yaml b/borgmatic/config/schema.yaml |
| 44 | +index 66ee665..accfbfd 100644 |
| 45 | +--- a/borgmatic/config/schema.yaml |
| 46 | ++++ b/borgmatic/config/schema.yaml |
| 47 | +@@ -218,7 +218,7 @@ properties: |
| 48 | + Path for storing temporary runtime data like streaming database |
| 49 | + dumps and bootstrap metadata. borgmatic automatically creates and |
| 50 | + uses a "borgmatic" subdirectory here. Defaults to $XDG_RUNTIME_DIR |
| 51 | +- or /run/user/$UID. |
| 52 | ++ or or $TMPDIR or $TEMP or /run/user/$UID. |
| 53 | + example: /run/user/1001/borgmatic |
| 54 | + user_state_directory: |
| 55 | + type: string |
| 56 | +diff --git a/docs/how-to/backup-your-databases.md b/docs/how-to/backup-your-databases.md |
| 57 | +index fc5aa5e..f216275 100644 |
| 58 | +--- a/docs/how-to/backup-your-databases.md |
| 59 | ++++ b/docs/how-to/backup-your-databases.md |
| 60 | +@@ -76,6 +76,11 @@ borgmatic created temporary streaming database dumps within the `~/.borgmatic` |
| 61 | + directory by default. At that time, the path was configurable by the |
| 62 | + `borgmatic_source_directory` configuration option (now deprecated). |
| 63 | + |
| 64 | ++<span class="minilink minilink-addedin">New in version 1.9.1</span>In addition |
| 65 | ++to `XDG_RUNTIME_DIR`, borgmatic also uses the `TMPDIR` or `TEMP` environment |
| 66 | ++variable if set. `TMPDIR` is available on macOS, while `TEMP` is often |
| 67 | ++available on other platforms. |
| 68 | ++ |
| 69 | + Also note that using a database hook implicitly enables the |
| 70 | + `read_special` configuration option (even if it's disabled in your |
| 71 | + configuration) to support this dump and restore streaming. See Limitations |
| 72 | +diff --git a/pyproject.toml b/pyproject.toml |
| 73 | +index 647fa06..c3338c9 100644 |
| 74 | +--- a/pyproject.toml |
| 75 | ++++ b/pyproject.toml |
| 76 | +@@ -1,6 +1,6 @@ |
| 77 | + [project] |
| 78 | + name = "borgmatic" |
| 79 | +-version = "1.9.0" |
| 80 | ++version = "1.9.1.dev0" |
| 81 | + authors = [ |
| 82 | + { name="Dan Helfman", email=" [email protected]" }, |
| 83 | + ] |
0 commit comments