dar-backup 1.0.0.1__tar.gz → 1.0.1__tar.gz
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-1.0.0.1/src/dar_backup → dar_backup-1.0.1}/Changelog.md +35 -1
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/PKG-INFO +284 -23
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/README.md +283 -22
- dar_backup-1.0.1/doc/Configfile.svg +391 -0
- dar_backup-1.0.1/doc/dar-backup-overview-small.png +0 -0
- dar_backup-1.0.1/doc/dar-backup-overview.png +0 -0
- dar_backup-1.0.1/doc/dar-backup-overview.svg +1374 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/doc/dev.md +13 -4
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/doc/doc.md +7 -1
- dar_backup-1.0.1/doc/portable-par2-layout.md +126 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1/src/dar_backup}/Changelog.md +35 -1
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/src/dar_backup/README.md +283 -22
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/src/dar_backup/__about__.py +3 -1
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/src/dar_backup/cleanup.py +153 -38
- dar_backup-1.0.1/src/dar_backup/command_runner.py +281 -0
- dar_backup-1.0.1/src/dar_backup/config_settings.py +290 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/src/dar_backup/dar-backup.conf +11 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/src/dar_backup/dar-backup.conf.j2 +42 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/src/dar_backup/dar_backup.py +391 -90
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/src/dar_backup/manager.py +9 -3
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/src/dar_backup/util.py +383 -130
- dar_backup-1.0.1/venv/lib/python3.12/site-packages/pip/_vendor/certifi/LICENSE +20 -0
- dar_backup-1.0.1/venv/lib/python3.12/site-packages/pip/_vendor/distro/LICENSE +202 -0
- dar_backup-1.0.1/venv/lib/python3.12/site-packages/pip/_vendor/packaging/LICENSE +3 -0
- dar_backup-1.0.1/venv/lib/python3.12/site-packages/pip/_vendor/pkg_resources/LICENSE +17 -0
- dar_backup-1.0.1/venv/lib/python3.12/site-packages/pip/_vendor/platformdirs/LICENSE +21 -0
- dar_backup-1.0.1/venv/lib/python3.12/site-packages/pip/_vendor/pygments/LICENSE +25 -0
- dar_backup-1.0.1/venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/LICENSE +21 -0
- dar_backup-1.0.1/venv/lib/python3.12/site-packages/pip/_vendor/requests/LICENSE +175 -0
- dar_backup-1.0.1/venv/lib/python3.12/site-packages/pip/_vendor/resolvelib/LICENSE +13 -0
- dar_backup-1.0.1/venv/lib/python3.12/site-packages/pip/_vendor/rich/LICENSE +19 -0
- dar_backup-1.0.1/venv/lib/python3.12/site-packages/pip/_vendor/tomli/LICENSE +21 -0
- dar_backup-1.0.1/venv/lib/python3.12/site-packages/pip/_vendor/tomli_w/LICENSE +21 -0
- dar_backup-1.0.1/venv/lib/python3.12/site-packages/pip/_vendor/truststore/LICENSE +21 -0
- dar_backup-1.0.1/venv/lib/python3.12/site-packages/pip-25.3.dist-info/licenses/src/pip/_vendor/certifi/LICENSE +20 -0
- dar_backup-1.0.1/venv/lib/python3.12/site-packages/pip-25.3.dist-info/licenses/src/pip/_vendor/distro/LICENSE +202 -0
- dar_backup-1.0.1/venv/lib/python3.12/site-packages/pip-25.3.dist-info/licenses/src/pip/_vendor/pkg_resources/LICENSE +17 -0
- dar_backup-1.0.1/venv/lib/python3.12/site-packages/pip-25.3.dist-info/licenses/src/pip/_vendor/tomli_w/LICENSE +21 -0
- dar_backup-1.0.1/venv/lib/python3.12/site-packages/pip-25.3.dist-info/licenses/src/pip/_vendor/truststore/LICENSE +21 -0
- dar_backup-1.0.1/venv/lib/python3.12/site-packages/platformdirs-4.3.8.dist-info/licenses/LICENSE +21 -0
- dar_backup-1.0.1/venv/lib/python3.12/site-packages/pygments-2.19.1.dist-info/licenses/LICENSE +25 -0
- dar_backup-1.0.1/venv/lib/python3.12/site-packages/pyproject_hooks-1.2.0.dist-info/LICENSE +21 -0
- dar_backup-1.0.1/venv/lib/python3.12/site-packages/requests-2.32.3.dist-info/LICENSE +175 -0
- dar_backup-1.0.1/venv/lib/python3.12/site-packages/rich-14.0.0.dist-info/LICENSE +19 -0
- dar_backup-1.0.1/venv/lib/python3.12/site-packages/shellingham-1.5.4.dist-info/LICENSE +13 -0
- dar_backup-1.0.1/venv/lib/python3.12/site-packages/tomli_w-1.2.0.dist-info/LICENSE +21 -0
- dar_backup-1.0.1/venv/lib/python3.12/site-packages/wheel/vendored/packaging/LICENSE +3 -0
- dar_backup-1.0.0.1/doc/badges/README.md +0 -5
- dar_backup-1.0.0.1/doc/badges/badge_clones.json +0 -6
- dar_backup-1.0.0.1/doc/badges/milestone_1000.txt +0 -1
- dar_backup-1.0.0.1/doc/badges/milestone_2000.txt +0 -1
- dar_backup-1.0.0.1/doc/badges/milestone_500.txt +0 -1
- dar_backup-1.0.0.1/doc/badges/milestone_badge.json +0 -6
- dar_backup-1.0.0.1/doc/clones.json +0 -799
- dar_backup-1.0.0.1/doc/dar-backup-overview-small.png +0 -0
- dar_backup-1.0.0.1/doc/dar-backup-overview.png +0 -0
- dar_backup-1.0.0.1/doc/dar-backup-overview.svg +0 -1150
- dar_backup-1.0.0.1/doc/weekly_clones.png +0 -0
- dar_backup-1.0.0.1/src/dar_backup/command_runner.py +0 -248
- dar_backup-1.0.0.1/src/dar_backup/config_settings.py +0 -147
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/.gitignore +0 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/LICENSE +0 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/packages/deb/README.md +0 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/pyproject.toml +0 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/src/dar_backup/.darrc +0 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/src/dar_backup/__init__.py +0 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/src/dar_backup/clean_log.py +0 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/src/dar_backup/dar_backup_systemd.py +0 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/src/dar_backup/demo.py +0 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/src/dar_backup/demo_backup_def.j2 +0 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/src/dar_backup/exceptions.py +0 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/src/dar_backup/installer.py +0 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/src/dar_backup/rich_progress.py +0 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/venv/lib/python3.12/site-packages/SecretStorage-3.3.3.dist-info/LICENSE +0 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/venv/lib/python3.12/site-packages/anyio-4.9.0.dist-info/LICENSE +0 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/venv/lib/python3.12/site-packages/black-25.1.0.dist-info/licenses/LICENSE +0 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/venv/lib/python3.12/site-packages/blib2to3/LICENSE +0 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/venv/lib/python3.12/site-packages/build-1.2.2.post1.dist-info/LICENSE +0 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/venv/lib/python3.12/site-packages/certifi-2025.4.26.dist-info/licenses/LICENSE +0 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/venv/lib/python3.12/site-packages/cffi-1.17.1.dist-info/LICENSE +0 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/venv/lib/python3.12/site-packages/charset_normalizer-3.4.2.dist-info/licenses/LICENSE +0 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/venv/lib/python3.12/site-packages/contourpy-1.3.2.dist-info/LICENSE +0 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/venv/lib/python3.12/site-packages/cryptography-45.0.3.dist-info/licenses/LICENSE +0 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/venv/lib/python3.12/site-packages/cycler-0.12.1.dist-info/LICENSE +0 -0
- {dar_backup-1.0.0.1/venv/lib/python3.12/site-packages/dar_backup-0.8.2.dist-info → dar_backup-1.0.1/venv/lib/python3.12/site-packages/dar_backup-1.0.1.dist-info}/licenses/LICENSE +0 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/venv/lib/python3.12/site-packages/filelock-3.18.0.dist-info/licenses/LICENSE +0 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/venv/lib/python3.12/site-packages/fonttools-4.58.2.dist-info/licenses/LICENSE +0 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/venv/lib/python3.12/site-packages/hyperlink-21.0.0.dist-info/LICENSE +0 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/venv/lib/python3.12/site-packages/id-1.5.0.dist-info/LICENSE +0 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/venv/lib/python3.12/site-packages/iniconfig-2.1.0.dist-info/licenses/LICENSE +0 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/venv/lib/python3.12/site-packages/jaraco.classes-3.4.0.dist-info/LICENSE +0 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/venv/lib/python3.12/site-packages/jaraco.context-6.0.1.dist-info/LICENSE +0 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/venv/lib/python3.12/site-packages/jaraco.functools-4.1.0.dist-info/LICENSE +0 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/venv/lib/python3.12/site-packages/jeepney-0.9.0.dist-info/licenses/LICENSE +0 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/venv/lib/python3.12/site-packages/keyring-25.6.0.dist-info/LICENSE +0 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/venv/lib/python3.12/site-packages/kiwisolver-1.4.8.dist-info/LICENSE +0 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/venv/lib/python3.12/site-packages/markdown_it_py-3.0.0.dist-info/LICENSE +0 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/venv/lib/python3.12/site-packages/matplotlib-3.10.3.dist-info/LICENSE +0 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/venv/lib/python3.12/site-packages/mdurl-0.1.2.dist-info/LICENSE +0 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/venv/lib/python3.12/site-packages/more_itertools-10.7.0.dist-info/LICENSE +0 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/venv/lib/python3.12/site-packages/mypy_extensions-1.1.0.dist-info/licenses/LICENSE +0 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/venv/lib/python3.12/site-packages/nh3-0.2.21.dist-info/licenses/LICENSE +0 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/venv/lib/python3.12/site-packages/numpy/ma/LICENSE +0 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/venv/lib/python3.12/site-packages/packaging-25.0.dist-info/licenses/LICENSE +0 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/venv/lib/python3.12/site-packages/pandas-2.3.0.dist-info/LICENSE +0 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/venv/lib/python3.12/site-packages/pathspec-0.12.1.dist-info/LICENSE +0 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/venv/lib/python3.12/site-packages/pexpect-4.9.0.dist-info/LICENSE +0 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/venv/lib/python3.12/site-packages/pillow-11.2.1.dist-info/licenses/LICENSE +0 -0
- {dar_backup-1.0.0.1/venv/lib/python3.12/site-packages/wheel/vendored → dar_backup-1.0.1/venv/lib/python3.12/site-packages/pip-25.3.dist-info/licenses/src/pip/_vendor}/packaging/LICENSE +0 -0
- {dar_backup-1.0.0.1/venv/lib/python3.12/site-packages/platformdirs-4.3.8.dist-info/licenses → dar_backup-1.0.1/venv/lib/python3.12/site-packages/pip-25.3.dist-info/licenses/src/pip/_vendor/platformdirs}/LICENSE +0 -0
- {dar_backup-1.0.0.1/venv/lib/python3.12/site-packages/pygments-2.19.1.dist-info/licenses → dar_backup-1.0.1/venv/lib/python3.12/site-packages/pip-25.3.dist-info/licenses/src/pip/_vendor/pygments}/LICENSE +0 -0
- {dar_backup-1.0.0.1/venv/lib/python3.12/site-packages/pyproject_hooks-1.2.0.dist-info → dar_backup-1.0.1/venv/lib/python3.12/site-packages/pip-25.3.dist-info/licenses/src/pip/_vendor/pyproject_hooks}/LICENSE +0 -0
- {dar_backup-1.0.0.1/venv/lib/python3.12/site-packages/requests-2.32.3.dist-info → dar_backup-1.0.1/venv/lib/python3.12/site-packages/pip-25.3.dist-info/licenses/src/pip/_vendor/requests}/LICENSE +0 -0
- {dar_backup-1.0.0.1/venv/lib/python3.12/site-packages/shellingham-1.5.4.dist-info → dar_backup-1.0.1/venv/lib/python3.12/site-packages/pip-25.3.dist-info/licenses/src/pip/_vendor/resolvelib}/LICENSE +0 -0
- {dar_backup-1.0.0.1/venv/lib/python3.12/site-packages/rich-14.0.0.dist-info → dar_backup-1.0.1/venv/lib/python3.12/site-packages/pip-25.3.dist-info/licenses/src/pip/_vendor/rich}/LICENSE +0 -0
- {dar_backup-1.0.0.1/venv/lib/python3.12/site-packages/tomli_w-1.2.0.dist-info → dar_backup-1.0.1/venv/lib/python3.12/site-packages/pip-25.3.dist-info/licenses/src/pip/_vendor/tomli}/LICENSE +0 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/venv/lib/python3.12/site-packages/pluggy-1.6.0.dist-info/licenses/LICENSE +0 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/venv/lib/python3.12/site-packages/psutil-7.0.0.dist-info/LICENSE +0 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/venv/lib/python3.12/site-packages/ptyprocess-0.7.0.dist-info/LICENSE +0 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/venv/lib/python3.12/site-packages/pycparser-2.22.dist-info/LICENSE +0 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/venv/lib/python3.12/site-packages/pyparsing-3.2.3.dist-info/LICENSE +0 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/venv/lib/python3.12/site-packages/pytest-8.4.0.dist-info/licenses/LICENSE +0 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/venv/lib/python3.12/site-packages/pytest_cov-6.1.1.dist-info/licenses/LICENSE +0 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/venv/lib/python3.12/site-packages/pytest_timeout-2.4.0.dist-info/licenses/LICENSE +0 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/venv/lib/python3.12/site-packages/python_dateutil-2.9.0.post0.dist-info/LICENSE +0 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/venv/lib/python3.12/site-packages/readme_renderer-44.0.dist-info/LICENSE +0 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/venv/lib/python3.12/site-packages/requests_toolbelt-1.0.0.dist-info/LICENSE +0 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/venv/lib/python3.12/site-packages/rfc3986-2.0.0.dist-info/LICENSE +0 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/venv/lib/python3.12/site-packages/six-1.17.0.dist-info/LICENSE +0 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/venv/lib/python3.12/site-packages/sniffio-1.3.1.dist-info/LICENSE +0 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/venv/lib/python3.12/site-packages/tomlkit-0.13.2.dist-info/LICENSE +0 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/venv/lib/python3.12/site-packages/trove_classifiers-2025.5.9.12.dist-info/licenses/LICENSE +0 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/venv/lib/python3.12/site-packages/twine-6.1.0.dist-info/LICENSE +0 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/venv/lib/python3.12/site-packages/typing_extensions-4.14.0.dist-info/licenses/LICENSE +0 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/venv/lib/python3.12/site-packages/tzdata-2025.2.dist-info/licenses/LICENSE +0 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/venv/lib/python3.12/site-packages/virtualenv-20.31.2.dist-info/licenses/LICENSE +0 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/venv/lib/python3.12/site-packages/zipp-3.22.0.dist-info/licenses/LICENSE +0 -0
- {dar_backup-1.0.0.1 → dar_backup-1.0.1}/venv/lib/python3.12/site-packages/zstandard-0.23.0.dist-info/LICENSE +0 -0
|
@@ -1,6 +1,40 @@
|
|
|
1
1
|
<!-- markdownlint-disable MD024 -->
|
|
2
2
|
# dar-backup Changelog
|
|
3
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
|
+
|
|
4
38
|
## v2-1.0.0 - 2025-10-09
|
|
5
39
|
|
|
6
40
|
Github link: [v2-1.0.0](https://github.com/per2jensen/dar-backup/tree/v2-1.0.0/v2)
|
|
@@ -364,4 +398,4 @@ Github link: [v2-alpha-0.6.0](https://github.com/per2jensen/dar-backup/tree/v2-a
|
|
|
364
398
|
- FIX: ensure run_command() works correctly when a command writes a lot of data to stdout
|
|
365
399
|
- updated README with details on --restore-dir option
|
|
366
400
|
|
|
367
|
-
<!-- markdownlint-enable MD024 -->
|
|
401
|
+
<!-- markdownlint-enable MD024 -->
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dar-backup
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.1
|
|
4
4
|
Summary: A script to do full, differential and incremental backups using dar. Some files are restored from the backups during verification, after which par2 redundancy files are created. The script also has a cleanup feature to remove old backups and par2 files.
|
|
5
5
|
Project-URL: GPG Public Key, https://keys.openpgp.org/search?q=dar-backup@pm.me
|
|
6
6
|
Project-URL: Homepage, https://github.com/per2jensen/dar-backup/tree/main/v2
|
|
@@ -722,17 +722,19 @@ Description-Content-Type: text/markdown
|
|
|
722
722
|
**Reliable DAR backups, automated in clean Python**
|
|
723
723
|
|
|
724
724
|
[](https://codecov.io/gh/per2jensen/dar-backup)
|
|
725
|
-
[](https://snyk.io/
|
|
725
|
+
[](https://security.snyk.io/vuln/?search=dar-backup)
|
|
726
726
|

|
|
727
727
|
[](https://pypi.org/project/dar-backup/)
|
|
728
728
|
[](https://pypi.org/project/dar-backup/)
|
|
729
|
-
[](https://github.com/per2jensen/dar-backup/blob/main/clonepulse/weekly_clones.png)
|
|
730
|
+
[](https://github.com/per2jensen/dar-backup/blob/main/clonepulse/weekly_clones.png) <sub>🎯 Stats powered by [ClonePulse](https://github.com/per2jensen/clonepulse)</sub>
|
|
731
731
|
|
|
732
732
|
The wonderful 'dar' [Disk Archiver](https://github.com/Edrusb/DAR) is used for
|
|
733
733
|
the heavy lifting, together with the [parchive](https://github.com/Parchive/par2cmdline) suite in these scripts.
|
|
734
734
|
|
|
735
|
-
This is the `Python` based [**version 2**](
|
|
735
|
+
This is the `Python` based [**version 2**](v2) of `dar-backup`.
|
|
736
|
+
|
|
737
|
+
You can see the [v2 Changelog](v2/Changelog.md) for details on features and progress.
|
|
736
738
|
|
|
737
739
|
## TL;DR
|
|
738
740
|
|
|
@@ -746,6 +748,9 @@ Version **1.0.0** was reached on October 9, 2025.
|
|
|
746
748
|
- [TL;DR](#tldr)
|
|
747
749
|
- [Table of Contents](#table-of-contents)
|
|
748
750
|
- [My use case](#my-use-case)
|
|
751
|
+
- [My setup](#my-setup)
|
|
752
|
+
- [Why PAR2 is especially good for portable / offsite copies](#why-par2-is-especially-good-for-portable--offsite-copies)
|
|
753
|
+
- [Design choices](#design-choices)
|
|
749
754
|
- [Features](#features)
|
|
750
755
|
- [License](#license)
|
|
751
756
|
- [Quick Guide](#quick-guide)
|
|
@@ -789,6 +794,8 @@ Version **1.0.0** was reached on October 9, 2025.
|
|
|
789
794
|
- [restore test fails with exit code 5](#restore-test-fails-with-exit-code-5)
|
|
790
795
|
- [Par2](#par2)
|
|
791
796
|
- [Par2 to verify/repair](#par2-to-verifyrepair)
|
|
797
|
+
- [Par2 files kept with archives](#par2-files-kept-with-archives)
|
|
798
|
+
- [Par2 files in separate directory](#par2-files-in-separate-directory)
|
|
792
799
|
- [Par2 create redundancy files](#par2-create-redundancy-files)
|
|
793
800
|
- [Points of interest](#points-of-interest)
|
|
794
801
|
- [Limitations on File Names with Special Characters](#limitations-on-file-names-with-special-characters)
|
|
@@ -821,12 +828,19 @@ Version **1.0.0** was reached on October 9, 2025.
|
|
|
821
828
|
- [CLI Tools Overview](#cli-tools-overview)
|
|
822
829
|
- [test coverage](#test-coverage)
|
|
823
830
|
- [Dar-backup options](#dar-backup-options)
|
|
831
|
+
- [Dar-backup exit codes](#dar-backup-exit-codes)
|
|
832
|
+
- [Dar-backup env vars](#dar-backup-env-vars)
|
|
824
833
|
- [Manager Options](#manager-options)
|
|
825
|
-
|
|
834
|
+
- [Cleanup env vars](#cleanup-env-vars)
|
|
826
835
|
- [Clean-log options](#clean-log-options)
|
|
827
836
|
- [Dar-backup-systemd options](#dar-backup-systemd-options)
|
|
828
837
|
- [Installer options](#installer-options)
|
|
829
838
|
- [Demo options](#demo-options)
|
|
839
|
+
- [Config changes](#config-changes)
|
|
840
|
+
- [1.0.1](#101)
|
|
841
|
+
- [DISCORD WEBHOOK](#discord-webhook)
|
|
842
|
+
- [Restore test config](#restore-test-config)
|
|
843
|
+
- [Par2](#par2-1)
|
|
830
844
|
|
|
831
845
|
## My use case
|
|
832
846
|
|
|
@@ -836,7 +850,7 @@ I needed the following:
|
|
|
836
850
|
- Backup primarily photos, home made video and different types of documents
|
|
837
851
|
- I have cloud storage mounted on a directory within my home dir. The filesystem is [FUSE based](https://www.kernel.org/doc/html/latest/filesystems/fuse.html), which gives it a few special features
|
|
838
852
|
|
|
839
|
-
- Backup cloud storage (cloud is convenient, but I want control over my backups)
|
|
853
|
+
- Backup my cloud storage (cloud is convenient, but I want control over my backups)
|
|
840
854
|
- A non-privileged user can perform a mount
|
|
841
855
|
- A privileged user cannot look into the filesystem --> a backup script running as root is not suitable
|
|
842
856
|
|
|
@@ -847,6 +861,48 @@ I needed the following:
|
|
|
847
861
|
|
|
848
862
|
I do not need the encryption features of dar, as all storage is already encrypted.
|
|
849
863
|
|
|
864
|
+
## My setup
|
|
865
|
+
|
|
866
|
+
1. Primary backup to server with an ext4 file system on mdadm RAID1
|
|
867
|
+
|
|
868
|
+
2. Secondary copies to multiple USB disks / cloud
|
|
869
|
+
|
|
870
|
+
3. Archive integrity verification anywhere using [Par2](#par2) and `dar -t`.
|
|
871
|
+
|
|
872
|
+
4. Archive repair anywhere if needed. By default `dar-backup` creates par2 redundancy files with 5% coverage. Enough to fix localized bitrot.
|
|
873
|
+
|
|
874
|
+
5. No dependency on original system
|
|
875
|
+
|
|
876
|
+
### Why PAR2 is especially good for portable / offsite copies
|
|
877
|
+
|
|
878
|
+
PAR2 parity is:
|
|
879
|
+
|
|
880
|
+
> Self-contained (travels with the data)
|
|
881
|
+
>
|
|
882
|
+
>Format-agnostic (works on any filesystem)
|
|
883
|
+
>
|
|
884
|
+
>Location-agnostic (local disk, USB, cloud object storage)
|
|
885
|
+
>
|
|
886
|
+
>Tool-stable (PAR2 spec has not changed in years)
|
|
887
|
+
>
|
|
888
|
+
>That means:
|
|
889
|
+
>
|
|
890
|
+
>**Integrity protection moves with the archive**.
|
|
891
|
+
|
|
892
|
+
### Design choices
|
|
893
|
+
|
|
894
|
+
My design choices are boring, proven and pragmatic:
|
|
895
|
+
>
|
|
896
|
+
>mdadm handles disks
|
|
897
|
+
>
|
|
898
|
+
>PAR2 handles data integrity
|
|
899
|
+
>
|
|
900
|
+
>You control when and how verification happens
|
|
901
|
+
>
|
|
902
|
+
>Errors have a fair chance of being diagnosed and fixed, due to well known tooling.
|
|
903
|
+
>
|
|
904
|
+
>No hidden magic, no lock-in
|
|
905
|
+
|
|
850
906
|
## Features
|
|
851
907
|
|
|
852
908
|
- The battle tested [dar](https://github.com/Edrusb/DAR) Disk Archiver is used for the actual backups - it comes highly recommended.
|
|
@@ -869,7 +925,7 @@ I needed the following:
|
|
|
869
925
|
## License
|
|
870
926
|
|
|
871
927
|
These scripts are licensed under the GPLv3 license.
|
|
872
|
-
Read more here: [GNU GPL3.0](https://www.gnu.org/licenses/gpl-3.0.en.html), or have a look at the ["LICENSE"](
|
|
928
|
+
Read more here: [GNU GPL3.0](https://www.gnu.org/licenses/gpl-3.0.en.html), or have a look at the ["LICENSE"](LICENSE) file in this repository.
|
|
873
929
|
|
|
874
930
|
## Quick Guide
|
|
875
931
|
|
|
@@ -1214,7 +1270,7 @@ This python version is v2 of dar-backup, v1 is made in bash.
|
|
|
1214
1270
|
|
|
1215
1271
|
## Community
|
|
1216
1272
|
|
|
1217
|
-
Please review the [Code of Conduct](
|
|
1273
|
+
Please review the [Code of Conduct](CODE_OF_CONDUCT.md) to help keep this project welcoming and focused.
|
|
1218
1274
|
|
|
1219
1275
|
## Requirements
|
|
1220
1276
|
|
|
@@ -1234,7 +1290,7 @@ On Ubuntu, install the requirements this way:
|
|
|
1234
1290
|
|
|
1235
1291
|
### dar-backup overview
|
|
1236
1292
|
|
|
1237
|
-
](v2/doc/dar-backup-overview.png)
|
|
1238
1294
|
|
|
1239
1295
|
### dar-backup
|
|
1240
1296
|
|
|
@@ -1263,6 +1319,15 @@ The `cleanup` application deletes DIFF and INCR if the archives are older than t
|
|
|
1263
1319
|
|
|
1264
1320
|
`cleanup` will only remove FULL archives if the option `--cleanup-specific-archives` is used. It requires the user to confirm deletion of FULL archives.
|
|
1265
1321
|
|
|
1322
|
+
Use `--dry-run` to preview which archives, PAR2 files, and catalogs would be removed without deleting anything.
|
|
1323
|
+
|
|
1324
|
+
Examples:
|
|
1325
|
+
|
|
1326
|
+
```bash
|
|
1327
|
+
cleanup --dry-run -d media-files --log-stdout
|
|
1328
|
+
cleanup --dry-run --cleanup-specific-archives -d media-files media-files_INCR_2025-12-22
|
|
1329
|
+
```
|
|
1330
|
+
|
|
1266
1331
|
### manager
|
|
1267
1332
|
|
|
1268
1333
|
`dar`has the concept of catalogs which can be exported and optionally be added to a catalog database. That database makes it much easier to restore the correct version of a backed up file if for example a target date has been set.
|
|
@@ -1406,7 +1471,7 @@ deactivate
|
|
|
1406
1471
|
|
|
1407
1472
|
The configuration file's default location is: ~/.config/dar-backup/dar-backup.conf
|
|
1408
1473
|
|
|
1409
|
-
If you have your config file somewhere else, use the `--config` option to point to it.
|
|
1474
|
+
If you have your config file somewhere else, use the `--config-file` option to point to it.
|
|
1410
1475
|
|
|
1411
1476
|
Tilde `~` and environment variables can be used in the paths for various file locations.
|
|
1412
1477
|
|
|
@@ -1442,6 +1507,19 @@ INCR_AGE = 40
|
|
|
1442
1507
|
[PAR2]
|
|
1443
1508
|
ERROR_CORRECTION_PERCENT = 5
|
|
1444
1509
|
ENABLED = True
|
|
1510
|
+
# Optional PAR2 configuration
|
|
1511
|
+
# PAR2_DIR = /path/to/par2-store
|
|
1512
|
+
# PAR2_MODE = per-slice
|
|
1513
|
+
# PAR2_RATIO_FULL = 10
|
|
1514
|
+
# PAR2_RATIO_DIFF = 5
|
|
1515
|
+
# PAR2_RATIO_INCR = 5
|
|
1516
|
+
# PAR2_RUN_VERIFY = false
|
|
1517
|
+
|
|
1518
|
+
# Optional per-backup overrides (section name = backup definition)
|
|
1519
|
+
[media-files]
|
|
1520
|
+
PAR2_DIR = /mnt/par2/media-files
|
|
1521
|
+
PAR2_MODE = per-archive
|
|
1522
|
+
PAR2_RATIO_FULL = 10
|
|
1445
1523
|
|
|
1446
1524
|
# scripts to run before the backup to setup the environment
|
|
1447
1525
|
[PREREQ]
|
|
@@ -1453,6 +1531,15 @@ SCRIPT_1 = df -h
|
|
|
1453
1531
|
#SCRIPT_2 = another_script.sh
|
|
1454
1532
|
```
|
|
1455
1533
|
|
|
1534
|
+
PAR2 notes:
|
|
1535
|
+
|
|
1536
|
+
- If `PAR2_DIR` is unset, par2 files are created next to the archive slices (legacy behavior) and no manifest is written
|
|
1537
|
+
- When `PAR2_DIR` is set, dar-backup writes a manifest next to the par2 set:
|
|
1538
|
+
`archive_base.par2.manifest.ini`
|
|
1539
|
+
- Verify or repair using:
|
|
1540
|
+
`par2 verify -B <archive_dir> <par2_set.par2>`
|
|
1541
|
+
`par2 repair -B <archive_dir> <par2_set.par2>`
|
|
1542
|
+
|
|
1456
1543
|
### .darrc
|
|
1457
1544
|
|
|
1458
1545
|
The package includes a default `darrc` file which configures `dar`.
|
|
@@ -1900,9 +1987,39 @@ If you need to use this option, un-comment it in the [.darrc](#darrc) file (loca
|
|
|
1900
1987
|
|
|
1901
1988
|
## Par2
|
|
1902
1989
|
|
|
1990
|
+
Why keep PAR2 on a different storage device:
|
|
1991
|
+
|
|
1992
|
+
- Reduces single-disk failure impact: bitrot on the archive disk does not affect the parity.
|
|
1993
|
+
- Easier offsite rotation: you can sync only the PAR2 sets to a different failure domain.
|
|
1994
|
+
|
|
1995
|
+
Redundancy guidance:
|
|
1996
|
+
|
|
1997
|
+
- FULL backups: 10% is a practical default for larger data sets and longer retention.
|
|
1998
|
+
- DIFF/INCR: 5% is often enough because the delta is smaller and easier to re-create.
|
|
1999
|
+
- Increase the ratio if the storage is flaky or the backup is hard to re-run.
|
|
2000
|
+
|
|
2001
|
+
Rule of thumb table:
|
|
2002
|
+
|
|
2003
|
+
| Backup type | Suggested PAR2 ratio | Notes |
|
|
2004
|
+
|-------------|----------------------|-------|
|
|
2005
|
+
| FULL | 10% | Longer retention, larger data set |
|
|
2006
|
+
| DIFF | 5% | Smaller delta |
|
|
2007
|
+
| INCR | 5% | Smaller delta |
|
|
2008
|
+
|
|
2009
|
+
>
|
|
2010
|
+
>For large, contiguous archives on reliable local storage, 7–8% has proven sufficient in practice; 10% remains a conservative default.
|
|
2011
|
+
>
|
|
2012
|
+
|
|
2013
|
+
Cloud sync / air-gap note:
|
|
2014
|
+
|
|
2015
|
+
- Syncing PAR2 sets to a different device or remote store protects against bitrot and small corruption, but it cannot recover a completely lost archive.
|
|
2016
|
+
- An air-gapped PAR2 store is useful when the archive disk is exposed to ransomware or accidental deletion.
|
|
2017
|
+
|
|
1903
2018
|
### Par2 to verify/repair
|
|
1904
2019
|
|
|
1905
|
-
|
|
2020
|
+
#### Par2 files kept with archives
|
|
2021
|
+
|
|
2022
|
+
If PAR2 files are stored next to the archives (legacy per-slice behavior), you can verify like this:
|
|
1906
2023
|
|
|
1907
2024
|
```bash
|
|
1908
2025
|
for file in <archive>*.dar.par2; do
|
|
@@ -1916,6 +2033,14 @@ if there are problems with a slice, try to repair it like this:
|
|
|
1916
2033
|
par2 repair <archive>.<slice number>.dar.par2
|
|
1917
2034
|
```
|
|
1918
2035
|
|
|
2036
|
+
#### Par2 files in separate directory
|
|
2037
|
+
|
|
2038
|
+
See [docs on disk layout matters](v2/doc/portable-par2-layout.md)
|
|
2039
|
+
|
|
2040
|
+
>Test case proving this flow:
|
|
2041
|
+
>
|
|
2042
|
+
>[tests/test_par2_manifest.py](v2/tests/test_par2_manifest.py)
|
|
2043
|
+
|
|
1919
2044
|
### Par2 create redundancy files
|
|
1920
2045
|
|
|
1921
2046
|
If you have merged archives, you will need to create the .par2 redundency files manually.
|
|
@@ -1929,6 +2054,15 @@ done
|
|
|
1929
2054
|
|
|
1930
2055
|
where "c" is create, -r5 is 5% redundency and -n1 is 1 redundency file
|
|
1931
2056
|
|
|
2057
|
+
If you want to create a single parity set for all slices in an archive:
|
|
2058
|
+
|
|
2059
|
+
```bash
|
|
2060
|
+
par2 create -B <archive_dir> -r5 <par2_dir>/<archive_base>.par2 <archive_dir>/<archive_base>.*.dar
|
|
2061
|
+
```
|
|
2062
|
+
|
|
2063
|
+
**OBSERVE** [docs on disk layout matters](v2/doc/portable-par2-layout.md)
|
|
2064
|
+
|
|
2065
|
+
|
|
1932
2066
|
## Points of interest
|
|
1933
2067
|
|
|
1934
2068
|
### Limitations on File Names with Special Characters
|
|
@@ -2309,15 +2443,15 @@ One backup definition per file
|
|
|
2309
2443
|
|
|
2310
2444
|
### CLI Tools Overview
|
|
2311
2445
|
|
|
2312
|
-
| Command
|
|
2313
|
-
|
|
2314
|
-
| [dar-backup](#dar-backup-options)| Perform full, differential, or incremental backups with verification and restore testing |
|
|
2315
|
-
| [manager](#manager-options)
|
|
2316
|
-
| [cleanup](#cleanup-options)
|
|
2317
|
-
| [clean-log](#clean-log-options)
|
|
2446
|
+
| Command | Description |
|
|
2447
|
+
| --- | --- |
|
|
2448
|
+
| [dar-backup](#dar-backup-options) | Perform full, differential, or incremental backups with verification and restore testing |
|
|
2449
|
+
| [manager](#manager-options) | Maintain and query catalog databases for archives |
|
|
2450
|
+
| [cleanup](#cleanup-options) | Remove outdated DIFF/INCR archives (and optionally FULLs) |
|
|
2451
|
+
| [clean-log](#clean-log-options) | Clean up excessive log output from dar command logs |
|
|
2318
2452
|
| [dar-backup-systemd](#dar-backup-systemd-options) | Generate (and optionally install) systemd timers and services for automated backups |
|
|
2319
|
-
| [installer](#installer-options)
|
|
2320
|
-
| [demo](#demo-options)
|
|
2453
|
+
| [installer](#installer-options) | Set up directories and optionally create catalog databases according to a config file |
|
|
2454
|
+
| [demo](#demo-options) | Set up required directories and config files for a demo|
|
|
2321
2455
|
|
|
2322
2456
|
### test coverage
|
|
2323
2457
|
|
|
@@ -2372,6 +2506,7 @@ Available options:
|
|
|
2372
2506
|
--examples Show examples of using dar-backup.py.
|
|
2373
2507
|
-l, --list List available backups.
|
|
2374
2508
|
--list-contents <archive> List the contents of a specified archive.
|
|
2509
|
+
--list-definitions List backup definitions from BACKUP.D_DIR.
|
|
2375
2510
|
--selection <params> Define file selection for listing/restoring.
|
|
2376
2511
|
--restore <archive> Restore a specified archive.
|
|
2377
2512
|
-r, --restore <archive> Restore archive.
|
|
@@ -2381,6 +2516,7 @@ Available options:
|
|
|
2381
2516
|
--log-level <level> `debug` or `trace`, default is `info`.
|
|
2382
2517
|
--log-stdout Also print log messages to stdout.
|
|
2383
2518
|
--do-not-compare Do not compare restores to file system.
|
|
2519
|
+
--preflight-check Run preflight checks and exit (runs automatically; this flag just exits after checks).
|
|
2384
2520
|
--examples Show examples of using dar-backup.
|
|
2385
2521
|
--readme Print README.md and exit
|
|
2386
2522
|
--readme-pretty Print README.md with Markdown styling and exit
|
|
@@ -2389,6 +2525,22 @@ Available options:
|
|
|
2389
2525
|
-v, --version Show version and license information.
|
|
2390
2526
|
```
|
|
2391
2527
|
|
|
2528
|
+
#### Dar-backup exit codes
|
|
2529
|
+
|
|
2530
|
+
- 0: Success.
|
|
2531
|
+
- 1: Error (backup/restore/preflight failure).
|
|
2532
|
+
- 2: Warning (restore test failed or backup already exists and is skipped).
|
|
2533
|
+
- 127: Typically an error during startup, file or config value missing
|
|
2534
|
+
- if the `dar -t` test fails, exit code 1 is emitted
|
|
2535
|
+
- restore tests could fail if the source file has changed after the backup
|
|
2536
|
+
|
|
2537
|
+
#### Dar-backup env vars
|
|
2538
|
+
|
|
2539
|
+
| Env var | Value | Description |
|
|
2540
|
+
| --- | --- | --- |
|
|
2541
|
+
| DAR_BACKUP_CONFIG_FILE | Full path to config file | Overrides built-in default, overridden by --config-file |
|
|
2542
|
+
| DAR_BACKUP_DISCORD_WEBHOOK_URL | https://discord.com/api/webhooks/\<userID\>/\<webhook UUID\> | The full url |
|
|
2543
|
+
|
|
2392
2544
|
### Manager Options
|
|
2393
2545
|
|
|
2394
2546
|
This script manages `dar` databases and catalogs.
|
|
@@ -2408,7 +2560,12 @@ Available options:
|
|
|
2408
2560
|
--find-file <file> Search catalogs for a specific file.
|
|
2409
2561
|
--verbose Enable verbose output.
|
|
2410
2562
|
--log-level <level> Set log level (`debug` or `trace`, default is `info`).
|
|
2411
|
-
|
|
2563
|
+
|
|
2564
|
+
#### Manager env vars
|
|
2565
|
+
|
|
2566
|
+
| Env var | Value | Description |
|
|
2567
|
+
| --- | --- | --- |
|
|
2568
|
+
| DAR_BACKUP_CONFIG_FILE | path to the config file | Default is $HOME/.config/dar-backup/dar-backup.conf |```
|
|
2412
2569
|
|
|
2413
2570
|
### Cleanup options
|
|
2414
2571
|
|
|
@@ -2425,12 +2582,19 @@ Supported options:
|
|
|
2425
2582
|
--alternate-archive-dir Clean up in this directory instead of the default one.
|
|
2426
2583
|
--cleanup-specific-archives "<archive>, <>, ..." Comma separated list of archives to cleanup.
|
|
2427
2584
|
-l, --list List available archives (filter using the -d option).
|
|
2585
|
+
--dry-run Show what would be deleted without removing files.
|
|
2428
2586
|
--verbose Print various status messages to screen.
|
|
2429
2587
|
--log-level <level> `debug` or `trace`, default is `info`", default="info".
|
|
2430
2588
|
--log-stdout Print log messages to stdout.
|
|
2431
2589
|
--test-mode This is used when running pytest test cases
|
|
2432
2590
|
```
|
|
2433
2591
|
|
|
2592
|
+
#### Cleanup env vars
|
|
2593
|
+
|
|
2594
|
+
| Env var | Value | Description |
|
|
2595
|
+
| --- | --- | --- |
|
|
2596
|
+
| DAR_BACKUP_CONFIG_FILE | path to the config file | Default is $HOME/.config/dar-backup/dar-backup.conf |
|
|
2597
|
+
|
|
2434
2598
|
### Clean-log options
|
|
2435
2599
|
|
|
2436
2600
|
This script removes excessive logging output from `dar` logs, improving readability and efficiency. Available options:
|
|
@@ -2480,8 +2644,8 @@ Create directories:
|
|
|
2480
2644
|
- ~/.config/dar-backup/
|
|
2481
2645
|
- ~/.config/dar-backup/backup.d/
|
|
2482
2646
|
- ~/dar-backup/
|
|
2483
|
-
- ~/dar-backup/backups
|
|
2484
|
-
- ~/dar-backup/restore
|
|
2647
|
+
- ~/dar-backup/backups/
|
|
2648
|
+
- ~/dar-backup/restore/
|
|
2485
2649
|
|
|
2486
2650
|
Sets up demo config files:
|
|
2487
2651
|
|
|
@@ -2500,3 +2664,100 @@ Sets up demo config files:
|
|
|
2500
2664
|
-v, --version Display version and licensing information.
|
|
2501
2665
|
-h, --help Displays usage info
|
|
2502
2666
|
```
|
|
2667
|
+
|
|
2668
|
+
### Config changes
|
|
2669
|
+
|
|
2670
|
+
#### 1.0.1
|
|
2671
|
+
|
|
2672
|
+
##### DISCORD WEBHOOK
|
|
2673
|
+
|
|
2674
|
+
For Discord notifications use the `DAR_BACKUP_DISCORD_WEBHOOK_URL` environment variable. It should not be placed in the config file.
|
|
2675
|
+
|
|
2676
|
+
DAR_BACKUP_DISCORD_WEBHOOK_URL is the entire endpoint like this:
|
|
2677
|
+
|
|
2678
|
+
```bash
|
|
2679
|
+
export DAR_BACKUP_DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/\<userId\>/\<uuid\>
|
|
2680
|
+
```
|
|
2681
|
+
|
|
2682
|
+
##### Restore test config
|
|
2683
|
+
|
|
2684
|
+
Restore tests choose random files from the archive and compare them with the live filesystem.
|
|
2685
|
+
To avoid noisy paths (caches, temp files, logs), you can exclude candidates before the random
|
|
2686
|
+
selection happens. All matching is case-insensitive.
|
|
2687
|
+
|
|
2688
|
+
Config keys (in [MISC]):
|
|
2689
|
+
|
|
2690
|
+
- RESTORETEST_EXCLUDE_PREFIXES: comma-separated path prefixes to skip. Matches from the start of
|
|
2691
|
+
the path (after trimming a leading "/"). Use trailing "/" for directories.
|
|
2692
|
+
- RESTORETEST_EXCLUDE_SUFFIXES: comma-separated filename suffixes to skip.
|
|
2693
|
+
- RESTORETEST_EXCLUDE_REGEX: optional regex to skip anything matching the path.
|
|
2694
|
+
|
|
2695
|
+
Example:
|
|
2696
|
+
|
|
2697
|
+
```ini
|
|
2698
|
+
[MISC]
|
|
2699
|
+
RESTORETEST_EXCLUDE_PREFIXES = .cache/, .local/share/Trash/, .mozilla/, snap/firefox/common/.mozilla/
|
|
2700
|
+
RESTORETEST_EXCLUDE_SUFFIXES = .sqlite-wal, .sqlite-shm, .log, .tmp, .lock, .journal
|
|
2701
|
+
RESTORETEST_EXCLUDE_REGEX = (^|/)(Cache|cache|Logs|log)/
|
|
2702
|
+
```
|
|
2703
|
+
|
|
2704
|
+
Regex tips (case-insensitive):
|
|
2705
|
+
|
|
2706
|
+
- Match common cache/log directories anywhere:
|
|
2707
|
+
`(^|/)(cache|logs)/`
|
|
2708
|
+
- Skip thumbnails and temp dirs:
|
|
2709
|
+
`(^|/)(thumbnails|tmp|temp)/`
|
|
2710
|
+
- Exclude browser profile noise while keeping other files:
|
|
2711
|
+
`(^|/)\.mozilla/|/snap/firefox/common/\.mozilla/`
|
|
2712
|
+
|
|
2713
|
+
##### Par2
|
|
2714
|
+
|
|
2715
|
+
New optional PAR2 settings were added to the config file. If none of these keys are added, dar-backup behaves exactly as before (PAR2 files next to archives, per-slice parity).
|
|
2716
|
+
|
|
2717
|
+
| Name | Description | When it is in effect | Suggested value |
|
|
2718
|
+
|------|-------------|----------------------|-----------------|
|
|
2719
|
+
| PAR2_DIR | Directory to store .par2 and .vol*.par2 files | When set | A different device or mount from BACKUP_DIR |
|
|
2720
|
+
| PAR2_RATIO_FULL | Redundancy percent for FULL | When set | 10 (%) |
|
|
2721
|
+
| PAR2_RATIO_DIFF | Redundancy percent for DIFF | When set | 5 (%)|
|
|
2722
|
+
| PAR2_RATIO_INCR | Redundancy percent for INCR | When set | 5 (%)|
|
|
2723
|
+
| PAR2_RUN_VERIFY | Verify after create | When set | false |
|
|
2724
|
+
|
|
2725
|
+
Notes:
|
|
2726
|
+
|
|
2727
|
+
- PAR2_RATIO_*, and PAR2_RUN_VERIFY apply even if PAR2_DIR is not set (i.e. par2 output stays next to the archives).
|
|
2728
|
+
|
|
2729
|
+
Per-backup overrides use a section named after the backup definition with the same PAR2_* keys:
|
|
2730
|
+
|
|
2731
|
+
```text
|
|
2732
|
+
|
|
2733
|
+
######################################################################
|
|
2734
|
+
# Per-backup configuration example overrides
|
|
2735
|
+
######################################################################
|
|
2736
|
+
|
|
2737
|
+
# --------------------------------------------------------------------
|
|
2738
|
+
# Per-backup overrides (section name must match backup.d filename stem)
|
|
2739
|
+
# Example: backup.d/home.conf -> [home]
|
|
2740
|
+
# --------------------------------------------------------------------
|
|
2741
|
+
|
|
2742
|
+
#[home]
|
|
2743
|
+
# Disable PAR2 entirely for this backup definition
|
|
2744
|
+
PAR2_ENABLED = false
|
|
2745
|
+
#
|
|
2746
|
+
#[media]
|
|
2747
|
+
# Store PAR2 files in a separate location for this backup definition
|
|
2748
|
+
#PAR2_DIR = /samba/par2/media
|
|
2749
|
+
# Raise redundancy only for FULL
|
|
2750
|
+
#
|
|
2751
|
+
[documents]
|
|
2752
|
+
# Run verify par2 sets after creation
|
|
2753
|
+
PAR2_RUN_VERIFY = true
|
|
2754
|
+
#
|
|
2755
|
+
#[etc]
|
|
2756
|
+
# Keep global PAR2 settings but tweak ratios for this backup definition
|
|
2757
|
+
# RATIO is i percent number
|
|
2758
|
+
#PAR2_RATIO_FULL = 15
|
|
2759
|
+
#PAR2_RATIO_DIFF = 8
|
|
2760
|
+
#PAR2_RATIO_INCR = 8
|
|
2761
|
+
```
|
|
2762
|
+
|
|
2763
|
+
[Per-backup override test case: `tests/test_par2_overrides.py`](v2/tests/test_par2_overrides.py)
|