dar-backup 1.0.1__py3-none-any.whl → 1.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
dar_backup/Changelog.md DELETED
@@ -1,401 +0,0 @@
1
- <!-- markdownlint-disable MD024 -->
2
- # dar-backup Changelog
3
-
4
- ## v2-1.0.1 - 2026-01-09
5
-
6
- ### Added
7
-
8
- - Cleanup `--dry-run` to preview archive, PAR2, and catalog deletions.
9
- - Completion: `cleanup` supports comma-separated archive lists with whitespace normalization.
10
- - Completion: `cleanup` now offers archive-only suggestions after `--cleanup-specific-archives`.
11
- - Tests for completion list parsing and cleanup dry-run.
12
- - Optional Discord webhook notifications: `send_discord_message` helper with config-over-env precedence (`DAR_BACKUP_DISCORD_WEBHOOK_URL`), JSON payload, timeout, and detailed error logging (HTTP body).
13
- - Backup runs now emit a per-backup-definition status message (`YYYY-MM-DD_HH:MM - dar-backup, <backup definition>: SUCCESS|FAILURE`).
14
- - dar-backup `--list-definitions` option to list backup definitions from `BACKUP.D_DIR`.
15
- - Test coverage: webhook unit tests plus optional live Discord test (guarded by `live_discord` marker).
16
- - Automatic preflight checks now run before every invocation (or standalone via `--preflight-check`) to verify required directories, write access, and availability of `dar`/`par2` binaries.
17
- - PAR2 enhancements: optional PAR2_DIR storage, per-archive parity mode, per-backup overrides, and parity manifests to support verify/repair against archives in a different directory.
18
- - New tests for PAR2_DIR + per-archive verify/repair flow, per-backup overrides.
19
- - Documentation: new config options and per-backup overrides are documented in the README “Config changes” section.
20
- - Restore test filters: optional case-insensitive prefix/suffix/regex exclusions for restore-test file sampling, plus a dedicated unit test.
21
- - Env var `DAR_BACKUP_CONFIG_FILE` now supported.
22
-
23
- ### Changed
24
-
25
- - Completion: `dar-backup -l -d <def>` and `cleanup --cleanup-specific-archives -d <def>` now narrow archive suggestions by definition and prefix.
26
- - Pytest defaults exclude live Discord tests; enable with `-m live_discord` when a webhook is available.
27
- - Skip Discord notifications for the demo/example backup definition to avoid spam during sample runs.
28
- - Discord backup status now includes WARNING when a backup is skipped because it already exists.
29
- - Completer logging now uses a per-user logfile and falls back safely if the completer logger setup fails.
30
- - Verification failures and existing-backup skips now emit exit code 2 (warning), while errors continue to emit exit code 1.
31
- - Cleanup deletion hardening (Snyk): validate archive names and enforce safe, base-dir-bound file deletions.
32
- - Snyk badge links to [Snyk dar-backup page](https://security.snyk.io/vuln/?search=dar-backup)
33
- - Removed the rich progress bar wrapper from backup/verify runs to simplify core execution.
34
- - PAR2 tests now align with per-archive parity flow (single create command, repair via `.par2` set).
35
- - Slice-order test reads slice numbers from the logged `par2 create` command output.
36
- - CommandRunner now restores terminal attributes after subprocesses and runs with stdin set to `/dev/null` by default to avoid terminal echo issues.
37
-
38
- ## v2-1.0.0 - 2025-10-09
39
-
40
- Github link: [v2-1.0.0](https://github.com/per2jensen/dar-backup/tree/v2-1.0.0/v2)
41
-
42
- ### Added
43
-
44
- - Version 2 **1.0.0** declared
45
- - A bunch of test cases
46
- - Codecov config changes
47
-
48
- ## v2-beta-0.8.4 - 2025-08-23
49
-
50
- Github link: [v2-beta-0.8.4](https://github.com/per2jensen/dar-backup/tree/v2-beta-0.8.4/v2)
51
-
52
- ### Added
53
-
54
- - Option '-D' only added when restoring FULL backups.
55
- - A test case on [my dar-backup-image repo](https://github.com/per2jensen/dar-backup-image) does not delete a lone file in a directory if -D is used restoring from a DIFF.
56
-
57
- ## v2-beta-0.8.3 - 2025-08-23
58
-
59
- Github link: [v2-beta-0.8.3](https://github.com/per2jensen/dar-backup/tree/v2-beta-0.8.3/v2)
60
-
61
- ### Added
62
-
63
- - Dar-backup now deletes files if noted as "removed" in the archive catalog for DIFF and INCR backups.
64
- - This ensures a restore of a FULL + DIFF + INCR matches the files in the source directories.
65
- - Options '-wa' & '-/ Oo' added to the restore command.
66
-
67
- ## v2-beta-0.8.2 - 2025-07-17
68
-
69
- Github link: [v2-beta-0.8.2](https://github.com/per2jensen/dar-backup/tree/v2-beta-0.8.2/v2)
70
-
71
- ### Added
72
-
73
- - Security hardening: CommandRunner now performs strict command-line sanitization
74
- - Disallows potentially dangerous characters (e.g. ;, &, |) in command arguments
75
- - Prevents injection-style misuse when restoring specific files or invoking custom commands
76
-
77
- - Documentation:
78
- - New [README section](https://github.com/per2jensen/dar-backup?tab=readme-ov-file#limitations-on-file-names-with-special-characters) explains filename restrictions and safe workarounds (e.g. restoring directly with dar, if needed)
79
- - Includes a Markdown table listing all disallowed characters
80
-
81
- - Test suite:
82
- - Existing test cases updated to comply with the new sanitization rules
83
- - Additional tests ensure CommandRunner handles large binary output and edge cases cleanly
84
-
85
- ## v2-beta-0.8.1 - 2025-07-16
86
-
87
- Github link: [v2-beta-0.8.1](https://github.com/per2jensen/dar-backup/tree/v2-beta-0.8.1/v2)
88
-
89
- ### Added
90
-
91
- - FIX: runner now logs an error and fills more data into the returned CommandResult.
92
-
93
- ## v2-beta-0.8.0 - 2025-06-13
94
-
95
- Github link: [v2-beta-0.8.0](https://github.com/per2jensen/dar-backup/tree/v2-beta-0.8.0/v2)
96
-
97
- ### Added
98
-
99
- - Modified clone dashboard generator to produce easier to read dashboard and be more robust.
100
- - Dir_traversal sanitation: clean_log.py now only accepts files in configured log directory to `--file` option.
101
-
102
- ## v2-beta-0.7.2 - 2025-06-07
103
-
104
- Github link: [v2-beta-0.7.2](https://github.com/per2jensen/dar-backup/tree/v2-beta-0.7.2/v2)
105
-
106
- ### Added
107
-
108
- - Refactored build system, so all dependencies are kept in `pyproject.toml`. The dependencies are separated into dev, packaging and delivery phases.
109
- - Use `build.sh` to setup pytest environment in Github workflow.
110
-
111
- - Do the same to get a development environment going.
112
-
113
- - Added 2 new optional params to control log file roll.
114
- - Enrolling into [Snyk code checker](https://snyk.io/code-checker/) and learning how to work with it.
115
-
116
- - Snyk helped pointing out vulnerable versions of some packages used.
117
- - Input sanitation started, there is room for improvement.
118
-
119
- ## v2-beta-0.7.1 - 2025-05-22
120
-
121
- Github link: [v2-beta-0.7.1](https://github.com/per2jensen/dar-backup/tree/v2-beta-0.7.1/v2)
122
-
123
- ### Added
124
-
125
- - Quick Guide with reworked `demo` program.
126
- - util.get_invocation_command_line() used to print command line.
127
- - Installer to setup directories and catalog databases as prescribed in config file.
128
- - Documentation on dar-backup --selection option improved.
129
- - README.md clean up, signing section now with multiple collabsible sections.
130
- - Install instructions fixed after trial in fresh utuntu VM.
131
- - Small license display refac.
132
- - .deb package for Ubuntu can now be built (draft quality)
133
-
134
- -- DO NOT use unless for testing on an empty VM
135
- -- no real checking if this package aligns with Ubuntu's package requirements
136
- -- package `inputimeout` is installed via pip as Ubuntu does not have a .deb
137
-
138
- - SPDX license header added to many files
139
- - Action + program to capture cloning stats and store them in v2/doc directory. Includes a badge.
140
-
141
- -- annotate new daily max number of clones
142
- -- Celebration badge when certain clones numbers are hit (just for fun)
143
-
144
- - Action + program to generate 12 weeks cloning dashboard (a PNG) with annotation
145
- - Tweaked the auto completion setup in .bashrc, it stopped working for me unknown reasons (needs some looking into)
146
- - --verbose now affects the startup banner. Now it is printed only if --verbose is given
147
-
148
- ## v2-beta-0.6.20.1 - 2025-05-04
149
-
150
- Github link: [v2-beta-0.6.20.1](https://github.com/per2jensen/dar-backup/tree/v2-beta-0.6.20.1/v2)
151
-
152
- ### Added
153
-
154
- - FIX: bash/zsh completers fixed to support MANAGER_DB_DIR config if set
155
- - `cleanup` and `manager` completer now sorts archives by \<backup-definition> and \<archive date> (so not using \<type>)
156
-
157
- ## v2-beta-0.6.20 - 2025-05-03
158
-
159
- Github link: [v2-beta-0.6.20](https://github.com/per2jensen/dar-backup/tree/v2-beta-0.6.20/v2)
160
-
161
- ### Added
162
-
163
- - show_version() moved to util and tests for dar-backup, manager and cleanup
164
- - startup informational messages now works the same across the scripts
165
- - Improved ConfigSettings class to handle optional configuration keys
166
-
167
- -- test cases added
168
-
169
- - Optional config parameter: MANAGER_DB_DIR, ideally to point to another disk for safe keeping backup catalogs
170
-
171
- -- test cases added
172
-
173
- ## v2-beta-0.6.19 - 2025-04-21
174
-
175
- Github link: [v2-beta-0.6.19](https://github.com/per2jensen/dar-backup/tree/v2-beta-0.6.19/v2)
176
-
177
- ### Added
178
-
179
- - removed a BackupError in the verify() to reduce noise in logs and let the rest of "compares" run.
180
- - Added bash and zsh auto completion for a nicer CLI experience.
181
-
182
- -- See [README for details](https://github.com/per2jensen/dar-backup?tab=readme-ov-file#shell-autocompletion)
183
-
184
- - Improvement to command_runner.run(), more robust decoding
185
-
186
- - Manager --add-specific-archive now gives a prompt with a warning if user attempts to add a catalog that breaks chronology. The user is allowed to go forward and ignore the warning or can choose to abort. The program times out after a little while and discards the operation.
187
-
188
- ## v2-beta-0.6.18 - 2025-04-05
189
-
190
- Github link: [v2-beta-0.6.18](https://github.com/per2jensen/dar-backup/tree/v2-beta-0.6.18/v2)
191
-
192
- ### Added
193
-
194
- - setup of package signing using key: `dar-backup@pm.me` added.
195
- -- key created
196
- -- docs updated
197
- -- release script created
198
- -- key added top OpenPGP.org key server
199
- -- pypi setup modified and set to use the new Signing subkey
200
- - README.md and Changelog.md now included in the wheel and installed on `pip install dar-backup`
201
- - new options to make it easy to find docs (--readme, --readme-pretty, --changelog, --changelog-pretty)
202
- - Generate systemd user units, and optionally install them
203
- - Progress bar and status line showing current directory being backed up (thanks to `rich`)
204
- - Pytest coverage now computed and displayed on Github
205
- - 2 code improvements and multiple cleanup tests added
206
- - Many test cases added, manager now in good pytest shape
207
-
208
- ## v2-beta-0.6.17 - 2025-03-29
209
-
210
- Github link: [v2-beta-0.6.17](https://github.com/per2jensen/dar-backup/tree/v2-beta-0.6.17/v2)
211
-
212
- ### Added
213
-
214
- - prereq and postreq logging now using debug level.
215
- - documentation: updates, links and fixes. Test coverage result included.
216
- - multiple .info() modified to debug() to keep the log file easily readable.
217
- - FIX: test case found an error in config_setting init
218
- - more testcases to expand coverage
219
- - code reorganization. util.run_command() replaced with CommandRunner class.
220
-
221
- ## v2-beta-0.6.16- 2025-03-22
222
-
223
- Github link: [v2-beta-0.6.16](https://github.com/per2jensen/dar-backup/tree/v2-beta-0.6.16/v2)
224
-
225
- ### Added
226
-
227
- - The generated filtered darrc file from `-suppress-dar-msg` now removed at program exit. Test case modified to check for removal
228
- - README.md updated to reflect recent changes
229
- - `cleanup` now requires a confirmation to delete a _FULL_ archive (using the option: --cleanup-specific-archives)
230
- - Module `inputimeout` used and installed into the venv, when `dar-backup` is installed
231
- - Much more clean log file in default config, use `--verbose` for more information, `--log-level debug` for even more
232
- - Added option --test-mode to `cleanup` to run tests verifying that FULL archives are deleted only if the user answers "yes"
233
-
234
- ## v2-beta-0.6.15- 2025-03-16
235
-
236
- Github link: [v2-beta-0.6.15](https://github.com/per2jensen/dar-backup/tree/v2-beta-0.6.15/v2)
237
-
238
- ### Added
239
-
240
- - Restore test details now logged only if args.verbose is set (less clutter in log file)
241
- - `--log-stdout` now does not show run_command() output from program being run
242
- - Report error and exit code `1` if manager did not add an archive to it's database
243
-
244
- ## v2-beta-0.6.14 - 2025-03-02
245
-
246
- Github link: [v2-beta-0.6.14](https://github.com/per2jensen/dar-backup/tree/v2-beta-0.6.14/v2)
247
-
248
- ### Added
249
-
250
- - `dar` catalog in xml now parsed correctly, test case added
251
- - error handling improved, --verbose print terse list of errors on exit, test case added
252
- - test cases simulating disk corruption being worked on, not yet in test suite
253
- - postreq test case improved
254
- - manager is not given "-ai" when adding catalogs (might give an issue on cloud backups, investigate....)
255
-
256
- ## v2-beta-0.6.13.1 - 2025-02-25
257
-
258
- Github link: [v2-beta-0.6.13.1](https://github.com/per2jensen/dar-backup/tree/v2-beta-0.6.13.1/v2)
259
-
260
- ### FIX
261
-
262
- - remove a leftover print() in run_command()
263
-
264
- ## v2-beta-0.6.13 - 2025-02-25
265
-
266
- Github link: [v2-beta-0.6.13](https://github.com/per2jensen/dar-backup/tree/v2-beta-0.6.13/v2)
267
-
268
- ### Added
269
-
270
- - README.md now good MarkDown, fixed reference section
271
- - Changelog.md now good MarkDown
272
- - --suppress-dar-msg option added (one way to cancel the verbosity options in .darrc)
273
- - separate log file for command outputs. This keeps the core dar-backup.log more readable
274
-
275
- ## v2-beta-0.6.12 - 2025-02-23
276
-
277
- Github link: [v2-beta-0.6.12](https://github.com/per2jensen/dar-backup/tree/v2-beta-0.6.12/v2)
278
-
279
- ### Added
280
-
281
- - support environment variables in paths, both on command line and in config files
282
- - test case for env vars in dar-backup.conf added
283
- - test case for ~ in dar-backup.conf added
284
- - dar-backup.py does not import sys, use from/import of specific functions
285
- - fix handling of missing config file
286
- - if config file, .darrc or backup definition not found, return 127
287
- - installer added to demo dar-back, installs demo config and backup definition
288
-
289
- ## v2-beta-0.6.11 - 2025-02-23
290
-
291
- Github link: [v2-beta-0.6.11](https://github.com/per2jensen/dar-backup/tree/v2-beta-0.6.11/v2)
292
-
293
- ### Added
294
-
295
- - run_command() fixed to handle missing command. Test case added.
296
- - refactoring xml parsing of dar list output. From recursive to iterating the xml document.
297
- - a bit more input verification to ensure the given config file actually exists.
298
- - README.md updated with useful information from v1 + some tweaks
299
-
300
- ## v2-beta-0.6.10 - 2025-02-22
301
-
302
- Github link: [v2-beta-0.6.10](https://github.com/per2jensen/dar-backup/tree/v2-beta-0.6.10/v2)
303
-
304
- ### Added
305
-
306
- - unit test verifying no compression of many compressed file formats
307
- - README.md lint fixes + a TOC
308
-
309
- ## v2-beta-0.6.9 - 2025-02-21
310
-
311
- Github link: [v2-beta-0.6.9](https://github.com/per2jensen/dar-backup/tree/v2-beta-0.6.9/v2)
312
-
313
- ### Added
314
-
315
- - clean-log script added (can remove much of `dar's` output that might be put in the dar-backup log file)
316
- - ChatGPT generated pytest cases
317
-
318
- ## v2-beta-0.6.8 - 2025-02-13
319
-
320
- Github link: [v2-beta-0.6.8](https://github.com/per2jensen/dar-backup/tree/v2-beta-0.6.8/v2)
321
-
322
- ### Added
323
-
324
- - switching from alpha --> beta status
325
- - manager --list-archive-contents added
326
-
327
- ## v2-alpha-0.6.7 - 2025-02-11
328
-
329
- Github link: [v2-alpha-0.6.7](https://github.com/per2jensen/dar-backup/tree/v2-alpha-0.6.7/v2)
330
-
331
- ### Added
332
-
333
- - Cleanups now remove catalogs from the catalog databases
334
-
335
- ## v2-alpha-0.6.6 - 2025-02-02
336
-
337
- Github link: [v2-alpha-0.6.6](https://github.com/per2jensen/dar-backup/tree/v2-alpha-0.6.6/v2)
338
-
339
- ### Added
340
-
341
- - Archive catalogs now added to database(s) after a backup has been performed
342
-
343
- ## v2-alpha-0.6.5 - 2025-01-24
344
-
345
- Github link: [v2-alpha-0.6.5](https://github.com/per2jensen/dar-backup/tree/v2-alpha-0.6.5/v2)
346
-
347
- ### Added
348
-
349
- - Changelog.md added
350
- - LICENSE added to the dar-backup wheel package
351
- - Link to Changelog added to PyPi page
352
-
353
- ## v2-alpha-0.6.4 - 2025-01-23
354
-
355
- Github link: [v2-alpha-0.6.4](https://github.com/per2jensen/dar-backup/tree/v2-alpha-0.6.4/v2)
356
-
357
- ### Added
358
-
359
- - Stdout & stderr from called programs are streamed to logfile in real time. This makes it easier to see if a very long running process is still active.
360
- - .darrc: -vd & -vf options enabled, so `dar` emits information when entering a directory and print some stats when leaving it
361
- - manager --remove-specific-archive option added
362
- - manager --list-catalog option added
363
- - improved tests for manager
364
- - manager --add-dir option added
365
- - verify slices are par2 processed by increasing slice number
366
- - reorg unit test,
367
- - added test for --restore-dir
368
-
369
- ## v2-alpha-0.6.2 - 2025-01-12
370
-
371
- Github link: [v2-alpha-0.6.2](https://github.com/per2jensen/dar-backup/tree/v2-alpha-0.6.2/v2)
372
-
373
- ### Added
374
-
375
- - refactor backup functions
376
- - minor doc fixes
377
- - par2: process slices by increasing #
378
- - dar-backup --verbose option: print info on par2 generation
379
-
380
- ## v2-alpha-0.6.1 - 2025-01-05
381
-
382
- Github link: [v2-alpha-0.6.1](https://github.com/per2jensen/dar-backup/tree/v2-alpha-0.6.1/v2)
383
-
384
- ### Added
385
-
386
- - FIX timeout error on run_command(). Set a long timeout on "heavy" operations. Default is 30 seconds.
387
- - Log the __str__ of CommandResult on return from run_command()
388
-
389
- ## v2-alpha-0.6.0 - 2025-01-05
390
-
391
- Github link: [v2-alpha-0.6.0](https://github.com/per2jensen/dar-backup/tree/v2-alpha-0.6.0/v2)
392
-
393
- ### Added
394
-
395
- - pytest session logger now used
396
- - if a prereq fails, dar-backup must fail
397
- - document 0.6.0 breaking change
398
- - FIX: ensure run_command() works correctly when a command writes a lot of data to stdout
399
- - updated README with details on --restore-dir option
400
-
401
- <!-- markdownlint-enable MD024 -->