Dan Helfman
468b2537f1
Add a "steps" option to run command hooks around particular sub-action steps like individual checks ( #1134 ).
2025-09-26 14:40:27 -07:00
Dan Helfman
4f0162d5f2
Add loading of systemd credentials even when running borgmatic outside of a systemd service ( #1123 ).
2025-09-24 10:34:20 -07:00
Dan Helfman
a388b17271
No longer defaulting Dump(hostname=...) to "localhost" ( #1116 ).
2025-09-18 19:22:45 -07:00
Dan Helfman
da65063216
Make test code style more consistent with the rest of the codebase ( #1116 ).
2025-09-17 21:55:36 -07:00
Florian Apolloner
0e90087dc4
Finalize container support
2025-09-15 22:16:49 +02:00
Florian Apolloner
b306cac5c1
raise ValueError if json decode fails when getting the container ip
2025-09-15 20:02:31 +02:00
Florian Apolloner
0d190016d3
rename utils.py to config.py
2025-09-15 20:02:31 +02:00
Florian Apolloner
a2c9bb12e5
test fixes
2025-09-15 20:02:31 +02:00
Florian Apolloner
04cc58a5c7
fixes and more tests.
2025-09-15 20:02:31 +02:00
Florian Apolloner
133a11c647
add support for container names/id when dumping databases.
2025-09-15 20:02:31 +02:00
Florian Apolloner
c084f10fe2
Add support for a database backup label instead of host:port ( #1116 )
2025-09-15 20:02:31 +02:00
Dan Helfman
084fbd2f16
PR "feedback": Adding a key to the dumps metadata JSON for clarity and expandability ( #1136 ).
2025-09-14 15:30:07 -07:00
Dan Helfman
627898cc23
Add tests for new code.
2025-09-05 16:02:23 -07:00
Dan Helfman
46381175ef
Code formatting.
2025-09-05 14:33:40 -07:00
Dan Helfman
9bbce71673
Fix tests for database hooks.
2025-09-04 10:36:00 -07:00
Dan Helfman
563cb8441e
When making HTTP requests in monitoring hooks, set "borgmatic" as the user agent ( #1139 ).
2025-09-01 16:51:33 -07:00
Dan Helfman
36d6619099
Create LVM snapshots as read-write to avoid an error when snapshotting ext4 filesystems with orphaned files that need recovery ( #1126 ).
2025-08-11 10:01:13 -07:00
Dan Helfman
9a80fec91b
When running tests, use Ruff for faster and more comprehensive code linting and formatting.
2025-07-17 23:24:58 -07:00
Dan Helfman
3eed3191e8
Add a flake8 extension to tests to detect commented out code.
2025-06-30 21:42:38 -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
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
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
6ebfd60e21
Fix an incorrect warning about Borg placeholders being unsupported in a command hook ( #1075 ).
2025-04-20 15:06:21 -07:00
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
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
edee3c3788
Fix broken monitoring verbosity ( #793 ).
2025-04-05 16:11:42 -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
Dan Helfman
1c9d25b892
Add "key-file" and "yubikey" options to KeePassXC credential hook ( #1047 ).
...
Reviewed-on: https://projects.torsion.org/borgmatic-collective/borgmatic/pulls/1049
2025-04-03 18:28:08 +00:00
Gautam Aggarwal
248999c23e
Final
2025-04-03 17:10:52 +00:00
Gautam Aggarwal
4e55547235
Command Restructuring
2025-04-02 15:35:12 +00:00
Gautam Aggarwal
7a0c56878b
Applied changes
2025-04-02 10:47:35 +00:00
Dan Helfman
6f07402407
Fix end-to-end tests and don't stat() directories that don't exist ( #1048 ).
2025-03-30 19:04:36 -07:00
Dan Helfman
ab01e97a5e
Fix a "no such file or directory" error in ZFS, Btrfs, and LVM hooks with nested directories that reside on separate devices/filesystems ( #1048 ).
2025-03-30 14:55:54 -07:00
Gautam Aggarwal
92ebc77597
2nd Draft
2025-03-30 16:19:56 +00:00
Gautam Aggarwal
f7e4d38762
First Draft
2025-03-30 14:02:56 +00:00
Dan Helfman
d2714cb706
Fix an error in the systemd credential hook when the credential name contains a "." chararcter ( #1044 ).
2025-03-26 09:53:52 -07:00
Dan Helfman
23efbb8df3
Fix line wrapping / code style ( #837 ).
2025-03-25 22:31:50 -07:00
Dan Helfman
76f7c53a1c
Add custom command options for MongoDB hook ( #837 ).
...
Reviewed-on: https://projects.torsion.org/borgmatic-collective/borgmatic/pulls/1041
2025-03-26 05:27:03 +00:00
Gautam Aggarwal
532a97623c
Added test_build_restore_command_prevents_shell_injection()
2025-03-25 04:50:45 +00:00
Dan Helfman
83a56a3fef
Add directory expansion for file-based and KeyPassXC credential hooks ( #1042 ).
...
Reviewed-on: https://projects.torsion.org/borgmatic-collective/borgmatic/pulls/1042
2025-03-24 19:57:18 +00:00
Nish_
4bca7bb198
add directory expansion for file-based and KeyPassXC credentials
...
Signed-off-by: Nish_ <120EE0980@nitrkl.ac.in >
2025-03-24 21:04:55 +05:30
Gautam Aggarwal
6a470be924
Made some changes in test file
2025-03-24 03:53:42 +00:00
Gautam Aggarwal
d651813601
Custom command options for MongoDB hook #837
2025-03-24 03:39:26 +00:00
Dan Helfman
587d31de7c
Run all command hooks respecting the "working_directory" option if configured ( #790 ).
2025-03-21 10:53:06 -07:00
Dan Helfman
c2409d9968
Remove the "dump_data_sources" command hook, as it doesn't really solve the use case and works differently than all the other command hooks ( #790 ).
2025-03-20 11:13:37 -07:00
Dan Helfman
624a7de622
Document "after" command hooks running in case of error and make sure that happens in case of "before" hook error ( #790 ).
2025-03-20 10:57:39 -07:00
Nish_
c84815bfb0
add custom dump and restore commands for sqlite hook
...
Signed-off-by: Nish_ <120EE0980@nitrkl.ac.in >
2025-03-16 09:07:49 +05:30
Dan Helfman
7965eb9de3
Correctly handle errors in command hooks ( #1019 ).
2025-03-11 11:36:28 -07:00