dar-backup 1.0.0.1__py3-none-any.whl → 1.0.2__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 +64 -1
- dar_backup/README.md +355 -34
- dar_backup/__about__.py +3 -2
- dar_backup/clean_log.py +102 -63
- dar_backup/cleanup.py +225 -76
- dar_backup/command_runner.py +198 -103
- dar_backup/config_settings.py +158 -1
- dar_backup/dar-backup.conf +18 -0
- dar_backup/dar-backup.conf.j2 +44 -0
- dar_backup/dar_backup.py +806 -131
- dar_backup/demo.py +18 -9
- dar_backup/installer.py +18 -1
- dar_backup/manager.py +304 -91
- dar_backup/util.py +502 -141
- {dar_backup-1.0.0.1.dist-info → dar_backup-1.0.2.dist-info}/METADATA +358 -37
- dar_backup-1.0.2.dist-info/RECORD +25 -0
- {dar_backup-1.0.0.1.dist-info → dar_backup-1.0.2.dist-info}/WHEEL +1 -1
- dar_backup-1.0.0.1.dist-info/RECORD +0 -25
- {dar_backup-1.0.0.1.dist-info → dar_backup-1.0.2.dist-info}/entry_points.txt +0 -0
- {dar_backup-1.0.0.1.dist-info → dar_backup-1.0.2.dist-info}/licenses/LICENSE +0 -0
dar_backup/Changelog.md
CHANGED
|
@@ -1,6 +1,69 @@
|
|
|
1
1
|
<!-- markdownlint-disable MD024 -->
|
|
2
2
|
# dar-backup Changelog
|
|
3
3
|
|
|
4
|
+
## v2-1.0.2 - 2026-01-25
|
|
5
|
+
|
|
6
|
+
### Added
|
|
7
|
+
|
|
8
|
+
- Streaming restore-test sampling using reservoir sampling to avoid holding full file lists in memory.
|
|
9
|
+
- Configurable command output capture cap (`COMMAND_CAPTURE_MAX_BYTES`, default 100 KB) to limit in-memory stdout/stderr while still logging full output.
|
|
10
|
+
- Streaming list output for `dar-backup --list-contents` and `manager --list-archive-contents` to avoid large in-memory buffers.
|
|
11
|
+
- Test coverage additions for config parsing, util helpers, restore-test sampling edge cases, par2 slice helpers, and get_backed_up_files error paths.
|
|
12
|
+
- Tests for missing source files during restore verification and for par2 generation order after verification.
|
|
13
|
+
- CommandRunner test coverage for sanitize failure notes, text/binary output handling, timeouts, Popen failures, and TTY restore logic.
|
|
14
|
+
- Tests for COMMAND_CAPTURE_MAX_BYTES defaults (0 and 1k) and binary stdout/stderr capture with truncation and log_output disabled.
|
|
15
|
+
- Manager test coverage for create-db guardrails and catalog listing parsing/sorting across runner/subprocess paths.
|
|
16
|
+
- Cleanup now reports PREREQ/POSTREQ failures cleanly and sends Discord failure notifications when configured.
|
|
17
|
+
- New trace logger that always logs at DEBUG and captures stacktraces if they happens. Default max size is 10MB + 1 rollover file.
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
|
|
21
|
+
- BUGFIX: Ensure existing files are removed before restore verification to prevent false positives.
|
|
22
|
+
- Clears out restore-test directory on program start to ensure a clean slate.
|
|
23
|
+
- Restore-test selection now streams DAR XML listings and samples candidates without loading all entries into RAM.
|
|
24
|
+
- `get_backed_up_files` uses incremental XML parsing to reduce memory use for large archives.
|
|
25
|
+
- Restore verification now logs a warning and continues when a source or restored file is missing during comparison.
|
|
26
|
+
- CommandRunner supports per-command capture cap overrides (disable cap with `capture_output_limit_bytes=-1`).
|
|
27
|
+
- Cleanup now rejects unsafe archive names when `--cleanup-specific-archives` is used to prevent accidental deletions.
|
|
28
|
+
- Removed deprecated PAR2 layout/mode settings and simplified PAR2 cleanup to delete all matching .par2 artifacts.
|
|
29
|
+
- Config templates/docs updated to drop PAR2_LAYOUT/PAR2_MODE references.
|
|
30
|
+
- [Snyk] Python 3.11 required in pyproject.toml. Snyk has flagged a vulnerabilly in an xml parser that requires the bump to 3.11.
|
|
31
|
+
- Config parsing errors now emit concise messages (no stack trace) and trigger Discord failure notifications in CLI tools.
|
|
32
|
+
|
|
33
|
+
## v2-1.0.1 - 2026-01-09
|
|
34
|
+
|
|
35
|
+
### Added
|
|
36
|
+
|
|
37
|
+
- Cleanup `--dry-run` to preview archive, PAR2, and catalog deletions.
|
|
38
|
+
- Completion: `cleanup` supports comma-separated archive lists with whitespace normalization.
|
|
39
|
+
- Completion: `cleanup` now offers archive-only suggestions after `--cleanup-specific-archives`.
|
|
40
|
+
- Tests for completion list parsing and cleanup dry-run.
|
|
41
|
+
- 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).
|
|
42
|
+
- Backup runs now emit a per-backup-definition status message (`YYYY-MM-DD_HH:MM - dar-backup, <backup definition>: SUCCESS|FAILURE`).
|
|
43
|
+
- dar-backup `--list-definitions` option to list backup definitions from `BACKUP.D_DIR`.
|
|
44
|
+
- Test coverage: webhook unit tests plus optional live Discord test (guarded by `live_discord` marker).
|
|
45
|
+
- 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.
|
|
46
|
+
- 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.
|
|
47
|
+
- New tests for PAR2_DIR + per-archive verify/repair flow, per-backup overrides.
|
|
48
|
+
- Documentation: new config options and per-backup overrides are documented in the README “Config changes” section.
|
|
49
|
+
- Restore test filters: optional case-insensitive prefix/suffix/regex exclusions for restore-test file sampling, plus a dedicated unit test.
|
|
50
|
+
- Env var `DAR_BACKUP_CONFIG_FILE` now supported.
|
|
51
|
+
|
|
52
|
+
### Changed
|
|
53
|
+
|
|
54
|
+
- Completion: `dar-backup -l -d <def>` and `cleanup --cleanup-specific-archives -d <def>` now narrow archive suggestions by definition and prefix.
|
|
55
|
+
- Pytest defaults exclude live Discord tests; enable with `-m live_discord` when a webhook is available.
|
|
56
|
+
- Skip Discord notifications for the demo/example backup definition to avoid spam during sample runs.
|
|
57
|
+
- Discord backup status now includes WARNING when a backup is skipped because it already exists.
|
|
58
|
+
- Completer logging now uses a per-user logfile and falls back safely if the completer logger setup fails.
|
|
59
|
+
- Verification failures and existing-backup skips now emit exit code 2 (warning), while errors continue to emit exit code 1.
|
|
60
|
+
- Cleanup deletion hardening (Snyk): validate archive names and enforce safe, base-dir-bound file deletions.
|
|
61
|
+
- Snyk badge links to [Snyk dar-backup page](https://security.snyk.io/vuln/?search=dar-backup)
|
|
62
|
+
- Removed the rich progress bar wrapper from backup/verify runs to simplify core execution.
|
|
63
|
+
- PAR2 tests now align with per-archive parity flow (single create command, repair via `.par2` set).
|
|
64
|
+
- Slice-order test reads slice numbers from the logged `par2 create` command output.
|
|
65
|
+
- CommandRunner now restores terminal attributes after subprocesses and runs with stdin set to `/dev/null` by default to avoid terminal echo issues.
|
|
66
|
+
|
|
4
67
|
## v2-1.0.0 - 2025-10-09
|
|
5
68
|
|
|
6
69
|
Github link: [v2-1.0.0](https://github.com/per2jensen/dar-backup/tree/v2-1.0.0/v2)
|
|
@@ -364,4 +427,4 @@ Github link: [v2-alpha-0.6.0](https://github.com/per2jensen/dar-backup/tree/v2-a
|
|
|
364
427
|
- FIX: ensure run_command() works correctly when a command writes a lot of data to stdout
|
|
365
428
|
- updated README with details on --restore-dir option
|
|
366
429
|
|
|
367
|
-
<!-- markdownlint-enable MD024 -->
|
|
430
|
+
<!-- markdownlint-enable MD024 -->
|