Dan Helfman
1b62be0949
Fix a bug in which quoted "extra_borg_options" values containing spaces are passed to Borg incorrectly. Add a "--comment" flag to the "create" action for creating an archive with a comment ( #1108 ).
2025-06-30 16:16:53 -07:00
Dan Helfman
0d54fda27a
Use the Bandit security analysis tool when running tests.
...
SECURITY: Add timeouts to all monitoring hooks to prevent hangs on network requests.
SECURITY: For the "spot" check, use a more secure source of randomness when selecting paths to check.
2025-06-27 22:30:00 -07:00
Dan Helfman
05b34d4b56
Fix unit/integration tests and add coverage ( #1043 ).
2025-06-27 12:37:03 -07:00
Tobias Schlatter and Dan Helfman
123f8958f6
Create a checkpoint archive first with streaming processes ( #1032 ).
...
This ensures that if a streaming process fails, we do not create a
real (i.e. non-checkpoint archive), (fixes #1032 ).
Without this, there is a race condition where borg already creates an
archive before borgmatic can kill it.
Tested locally (with `pipx install --editable .`):
```sh
borgmatic --config config.yaml create
borgmatic --config config.yaml create --json
```
## Hold up!
Thanks for your contribution. Unfortunately, we don't use GitHub pull requests to manage code contributions to this repository (and GitHub doesn't have any way to disable pull requests entirely). Instead, please see:
https://torsion.org/borgmatic/#contributing
... which provides full instructions on how to submit pull requests. You can even use your GitHub account to login.
Reviewed-on: https://projects.torsion.org/borgmatic-collective/borgmatic/pulls/1102
Reviewed-by: Dan Helfman <witten@torsion.org >
Co-authored-by: Tobias Schlatter <schlatter.tobias@gmail.com >
Co-committed-by: Tobias Schlatter <schlatter.tobias@gmail.com >
2025-06-25 16:24:07 +00:00
Nish_
df64794115
test yes/YES for env vars
...
Signed-off-by: Nish_ <120EE0980@nitrkl.ac.in >
2025-06-08 15:07:03 +05:30
Nish_ and 120EE0980
fede523dae
enhance passphrase handling
...
Signed-off-by: Nish_ <120EE0980@nitrkl.ac.in >
2025-06-08 09:31:13 +00:00
Dan Helfman
8e8d9e6267
Fix a bug in which "borg --version" failing isn't considered a "fail" state in a command hook ( #1100 ).
2025-05-27 11:52:36 -07:00
Dan Helfman
7f3e9c5347
Fix for the "spot" check's "xxh64sum_command" option erroring on commands containing spaces ( #1095 ).
2025-05-14 14:09:19 -07:00
Dan Helfman
5966022b67
Fix for the LVM hook erroring when the "--dry-run" flag is used ( #1093 ).
2025-05-12 11:50:55 -07:00
Dan Helfman
b68211cc0c
Fix for the "config generate" action generating invalid configuration when upgrading deprecated command hooks ( #1091 ).
2025-05-08 12:59:53 -07:00
Dan Helfman
1f773124f6
Add support for Borg 2's "s3:" and "b2:" repository URLs, so you can backup to S3 or B2 cloud storage services even without using Rclone.
2025-05-04 09:59:07 -07:00
Dan Helfman
3ff9a33468
Fix for the "spot" check breaking when the "--progress" flag is used ( #1086 ).
2025-05-01 18:46:34 -07:00
Florian Apolloner and apollo13
3d44e95c1a
Explicitly close filedescriptors when invoking lvm commands. Closes #1068
2025-04-30 07:42:55 +00:00
Dan Helfman
091e9fa9ee
Add a "password_transport" option to the MariaDB and MySQL database hooks for customizing how borgmatic transmits passwords to the database client ( #1033 ).
2025-04-29 14:19:15 -07:00
Dan Helfman
76c50555d3
Add Borg 1.4.1 features ( #1078 ).
...
Reviewed-on: https://projects.torsion.org/borgmatic-collective/borgmatic/pulls/1081
2025-04-25 19:02:27 +00:00
Vandal
1cde65b4eb
fix dry run not working borg 1.4.1+
2025-04-26 00:21:48 +05:30
Vandal
4e05539825
add review changes
2025-04-25 22:56:07 +05:30
Vandal
d17aa3e7cc
review changes
2025-04-25 22:28:43 +05:30
Dan Helfman
3eff794f44
Fix a regression in which the default monitoring verbosity is 0 instead of 1 ( #1085 ).
2025-04-24 23:27:09 -07:00
Vandal
1ac51e34bc
pass dry run flag
2025-04-25 11:40:25 +05:30
Vandal
27a2bbc231
add --dry-run feature check
2025-04-23 08:11:43 +05:30
Vandal
dbf1d0946a
make review changes
2025-04-23 07:38:52 +05:30
Dan Helfman
e2b5972c09
Fix end-to-end tests ( #1072 ).
2025-04-21 23:11:38 -07:00
Dan Helfman
9bf316e28f
If the exact same "everything" command hook is present in multiple configuration files, borgmatic only runs it once ( #1080 ).
2025-04-21 19:19:36 -07:00
Dan Helfman
3847f31939
Fix path rewriting for non-root patterns in the ZFS, Btrfs, and LVM hooks ( #1072 ).
2025-04-21 10:07:46 -07:00
Dan Helfman
6ebfd60e21
Fix an incorrect warning about Borg placeholders being unsupported in a command hook ( #1075 ).
2025-04-20 15:06:21 -07:00
Vandal
2078527539
add BORG_USE_CHUNKS_ARCHIVE
2025-04-20 09:58:09 +05:30
Vandal
620bf52e01
add prune test
2025-04-20 09:31:51 +05:30
Dan Helfman
a573e606a5
Add a "states" option to command hooks, so you can optionally skip an "after" hook if borgmatic encounters an error ( #1066 ).
2025-04-12 15:02:47 -07:00
Dan Helfman
81db67c759
Fix a regression in monitoring hooks in which an error pinged the finish state instead of the fail state ( #1065 ).
2025-04-09 11:32:59 -07:00
Dan Helfman
7de1c2121c
List the configured "when" action names in the log entries for command hooks ( #1063 ).
2025-04-08 12:04:10 -07:00
Dan Helfman
2c8dc5858f
Fix a regression that broke environment variable interpolation ( #1062 ).
2025-04-08 11:55:26 -07:00
Dan Helfman
f27a96e22d
Display a nicer error message when the "recreate" action encounters an archive that already exists ( #1053 ).
2025-04-08 10:58:53 -07:00
Dan Helfman
a892a308bd
Display a nicer error message when running the "recreate" action on a leftover temporary archive from a prior recreate run ( #1053 ).
2025-04-08 10:13:04 -07:00
Dan Helfman
2db023f785
Don't run action command hooks for actions listed in the "skip_actions" option ( #1060 ).
2025-04-07 23:10:59 -07:00
Dan Helfman
edaca2b3cd
Fix command hooks getting run too many times when multiple borgmatic actions are executed ( #1060 ).
2025-04-07 23:00:29 -07:00
Dan Helfman
68fafffe99
Fix a regression in which soft failure exit codes in command hooks were not respected ( #1059 ).
2025-04-07 10:29:51 -07:00
Dan Helfman
06a6444c86
Expand test that checks whether schema actions correspond to supported actions.
2025-04-06 21:25:06 -07:00
Dan Helfman
f6de79060e
Omit "pattern" from missing actions test ( #1056 ).
2025-04-06 20:57:15 -07:00
Dan Helfman
0d94a6587a
Move pattern and flag functions from create.py into their own module ( #1056 ).
...
Reviewed-on: https://projects.torsion.org/borgmatic-collective/borgmatic/pulls/1056
Reviewed-by: Dan Helfman <witten@torsion.org >
2025-04-07 03:51:36 +00:00
Vandal
360156e3b1
refactor codebase
2025-04-06 21:34:04 +05:30
Dan Helfman
edee3c3788
Fix broken monitoring verbosity ( #793 ).
2025-04-05 16:11:42 -07:00
Dan Helfman
732634f7ba
Add an additional test ( #793 ).
2025-04-04 18:49:20 -07:00
Dan Helfman
c0adc4f9df
Add test coverage for new code ( #793 ).
2025-04-04 17:19:14 -07:00
Dan Helfman
49839e884a
Add configuration options for logging and verbosity ( #793 ).
2025-04-04 10:11:00 -07:00
Dan Helfman
93b1172266
Remove merge conflict artifacts.
2025-04-03 17:31:06 -07:00
Dan Helfman
c6ce9c70ab
Merge branch 'main' into logging-verbosity-config.
2025-04-03 17:29:59 -07:00
Dan Helfman
3eabda45f2
If a boolean option name already starts with "no_", don't add a "--no-no-..." CLI flag ( #303 ).
2025-04-03 16:21:22 -07:00
Dan Helfman
3f25f3f0ff
Merge branch 'main' into config-command-line.
2025-04-03 11:47:29 -07:00
Dan Helfman
e8542f3613
Fix KeePassXC error when "keepassxc:" option is not present, add new options to NEWS ( #1047 ).
2025-04-03 11:41:58 -07:00