dar-backup 1.0.0.1__py3-none-any.whl → 1.0.1__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dar-backup
3
- Version: 1.0.0.1
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
  [![Codecov](https://codecov.io/gh/per2jensen/dar-backup/branch/main/graph/badge.svg)](https://codecov.io/gh/per2jensen/dar-backup)
725
- [![Snyk Vuln findings](https://snyk.io/test/github/per2jensen/dar-backup/badge.svg)](https://snyk.io/test/github/per2jensen/dar-backup)
725
+ [![Snyk Vuln findings](https://snyk.io/test/github/per2jensen/dar-backup/badge.svg)](https://security.snyk.io/vuln/?search=dar-backup)
726
726
  ![CI](https://github.com/per2jensen/dar-backup/actions/workflows/py-tests.yml/badge.svg)
727
727
  [![PyPI version](https://img.shields.io/pypi/v/dar-backup.svg)](https://pypi.org/project/dar-backup/)
728
728
  [![PyPI downloads](https://img.shields.io/badge/dynamic/json?color=blue&label=PyPI%20downloads&query=total&url=https%3A%2F%2Fraw.githubusercontent.com%2Fper2jensen%2Fdar-backup%2Fmain%2Fdownloads.json)](https://pypi.org/project/dar-backup/)
729
- [![# clones](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/per2jensen/dar-backup/main/v2/doc/badges/badge_clones.json)](https://github.com/per2jensen/dar-backup/blob/main/v2/doc/weekly_clones.png)
730
- [![Milestone](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/per2jensen/dar-backup/main/v2/doc/badges/milestone_badge.json)](https://github.com/per2jensen/dar-backup/blob/main/v2/doc/weekly_clones.png) <sub>🎯 Stats powered by [ClonePulse](https://github.com/per2jensen/clonepulse)</sub>
729
+ [![# clones](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/per2jensen/dar-backup/main/clonepulse/badge_clones.json)](https://github.com/per2jensen/dar-backup/blob/main/clonepulse/weekly_clones.png)
730
+ [![Milestone](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/per2jensen/dar-backup/main/clonepulse/milestone_badge.json)](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**](https://github.com/per2jensen/dar-backup/tree/main/v2) of `dar-backup`.
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
- - [Cleanup options](#cleanup-options)
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"](https://github.com/per2jensen/dar-backup/blob/main/LICENSE) file in this repository.
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](https://github.com/per2jensen/dar-backup/blob/main/CODE_OF_CONDUCT.md) to help keep this project welcoming and focused.
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
- ![dar-backup overview](https://github.com/per2jensen/dar-backup/blob/main/v2/doc/dar-backup-overview.svg)
1293
+ [![dar-backup overview](v2/doc/dar-backup-overview-small.png)](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
- You can run a par2 verification on an archive like this:
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 | Description |
2313
- |----------------------|-------------------------------------------|
2314
- | [dar-backup](#dar-backup-options)| Perform full, differential, or incremental backups with verification and restore testing |
2315
- | [manager](#manager-options) | Maintain and query catalog databases for archives |
2316
- | [cleanup](#cleanup-options) | Remove outdated DIFF/INCR archives (and optionally FULLs) |
2317
- | [clean-log](#clean-log-options) | Clean up excessive log output from dar command logs |
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) | Set up directories and optionally create catalog databases according to a config file |
2320
- | [demo](#demo-options) | Set up required directories and config files for a demo|
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)
@@ -0,0 +1,25 @@
1
+ dar_backup/.darrc,sha256=-aerqivZmOsW_XBCh9IfbYTUvw0GkzDSr3Vx4GcNB1g,2113
2
+ dar_backup/Changelog.md,sha256=a6MKcGQhTuJUXvjbPH4v3n1mbgMTj03m3aXN8SmW8X0,16933
3
+ dar_backup/README.md,sha256=f33LBRGfiefUitDy59IUjNyIVLLgxRO98w3qZ7Ode-g,75846
4
+ dar_backup/__about__.py,sha256=63ob-AtIVSfL5dgrSzPig0J0VPwlcGlT2INaSsfsf5E,371
5
+ dar_backup/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
+ dar_backup/clean_log.py,sha256=pmmyPmLWbm3_3sHwJt9V_xBwUF8v015iS17ypJAGAZ4,6023
7
+ dar_backup/cleanup.py,sha256=uQ5ioShanREKw8h0t3HcV9eYY7QQiWBjpYtp2Ns03dM,18024
8
+ dar_backup/command_runner.py,sha256=Ao-QiKuJTsDRmayeDYyRukfaiOrCb2xdnOSkYHBe5D4,9762
9
+ dar_backup/config_settings.py,sha256=_tBiC9Wx90Xpy00KmP5nBTdQr7VYzrYZGsurRAnsAis,12487
10
+ dar_backup/dar-backup.conf,sha256=PutEj0O1s9vKLim3a1LKI6_w1OuARLldI4Vw788qLbc,1729
11
+ dar_backup/dar-backup.conf.j2,sha256=ZNcG9LNlPkyKFD93cNA4sx_jEd1qAEhaMVJ_tuLpHHQ,3698
12
+ dar_backup/dar_backup.py,sha256=M-ZZ4Li1bcbLKEDluSmFGkY03NOhD9gO-WdyA2i_w6Q,55486
13
+ dar_backup/dar_backup_systemd.py,sha256=PwAc2H2J3hQLWpnC6Ib95NZYtB2G2NDgkSblfLj1n10,3875
14
+ dar_backup/demo.py,sha256=bxEq_nJwHuQydERPppkvhotg1fdwBX_CE33m5fX_kxw,7945
15
+ dar_backup/demo_backup_def.j2,sha256=hQW2Glp0QGV3Kt8cwjS0mpOCdyzjVlpgbgL6LpXTKJA,1793
16
+ dar_backup/exceptions.py,sha256=dBQwgKUilgfb1Tnlm_m1Dl1IqoY75L0n1uRkm0DBVTk,158
17
+ dar_backup/installer.py,sha256=xSXh77qquIZbUTSY3AbhERQbS7bnrPE__M_yqpszdhM,6883
18
+ dar_backup/manager.py,sha256=-SJ6ENqz2Oip9Ox9i7l7ea2ATS_XE_YblAxYdr79ZRM,27365
19
+ dar_backup/rich_progress.py,sha256=SfwFxebBl6jnDQMUQr4McknkW1yQWaJVo1Ju1OD3okA,3221
20
+ dar_backup/util.py,sha256=D-Ck-F06MyXUmf2BtsqL5hHcXJCMoprtPX8V7oE2kYc,34085
21
+ dar_backup-1.0.1.dist-info/METADATA,sha256=hI4mLrwh-0X4At0cPo0vxt3bZezWT3MxWEIpvV5n3iU,118550
22
+ dar_backup-1.0.1.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
23
+ dar_backup-1.0.1.dist-info/entry_points.txt,sha256=pOK9M8cHeAcGIatrYzkm_1O89kPk0enyYONALYjFBx4,286
24
+ dar_backup-1.0.1.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
25
+ dar_backup-1.0.1.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: hatchling 1.27.0
2
+ Generator: hatchling 1.28.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -1,25 +0,0 @@
1
- dar_backup/.darrc,sha256=-aerqivZmOsW_XBCh9IfbYTUvw0GkzDSr3Vx4GcNB1g,2113
2
- dar_backup/Changelog.md,sha256=sfDbEsLwy8BxdPf_eTaq0bZYa9M7VyvHXh_U6yLpEu8,13950
3
- dar_backup/README.md,sha256=jAxeDjxV6sHaOXcmyWkUHXflZCpX5eD1WlTiPeAbz8o,66754
4
- dar_backup/__about__.py,sha256=K3N2OKtkjzO52Sk7VzhS70lhHv2e--FPMfk3BohF9KE,346
5
- dar_backup/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
- dar_backup/clean_log.py,sha256=pmmyPmLWbm3_3sHwJt9V_xBwUF8v015iS17ypJAGAZ4,6023
7
- dar_backup/cleanup.py,sha256=_ggDcpMCB1MhXStvYussp_PdGfhIFtEutT5BNrNkMSY,13297
8
- dar_backup/command_runner.py,sha256=AeS8jqx2i6RX7UW6QZKvWEau3_MCGL181LvYCKFBdqg,7939
9
- dar_backup/config_settings.py,sha256=2UAHvatrVO4ark6lCn2Q7qBvZN6DUMK2ftlNrKpzlWc,5792
10
- dar_backup/dar-backup.conf,sha256=46V2zdvjj_aThFY11wWlffjmoiChYmatdf5DXCsmmao,1208
11
- dar_backup/dar-backup.conf.j2,sha256=z3epGo6nB_Jh3liTOp93wJO_HKUsf7qghe9cdtFH7cY,2021
12
- dar_backup/dar_backup.py,sha256=ii7LIf5v3cgXPIbymDna4THYlxLAYEiuN4GHGH32dfA,43136
13
- dar_backup/dar_backup_systemd.py,sha256=PwAc2H2J3hQLWpnC6Ib95NZYtB2G2NDgkSblfLj1n10,3875
14
- dar_backup/demo.py,sha256=bxEq_nJwHuQydERPppkvhotg1fdwBX_CE33m5fX_kxw,7945
15
- dar_backup/demo_backup_def.j2,sha256=hQW2Glp0QGV3Kt8cwjS0mpOCdyzjVlpgbgL6LpXTKJA,1793
16
- dar_backup/exceptions.py,sha256=dBQwgKUilgfb1Tnlm_m1Dl1IqoY75L0n1uRkm0DBVTk,158
17
- dar_backup/installer.py,sha256=xSXh77qquIZbUTSY3AbhERQbS7bnrPE__M_yqpszdhM,6883
18
- dar_backup/manager.py,sha256=d1zliFpSuWc8JhjKqLMC-xOhp5kSIcfeGkMZOVuZcM0,27143
19
- dar_backup/rich_progress.py,sha256=SfwFxebBl6jnDQMUQr4McknkW1yQWaJVo1Ju1OD3okA,3221
20
- dar_backup/util.py,sha256=iTOGsZyIdkvh9tIu7hD_IXi-9HO6GhVgqact5GGInEY,26063
21
- dar_backup-1.0.0.1.dist-info/METADATA,sha256=21OuZSNVAL7ocqFeNWILnn6UfBm74xEpXHCaA1MG0z0,109460
22
- dar_backup-1.0.0.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
23
- dar_backup-1.0.0.1.dist-info/entry_points.txt,sha256=pOK9M8cHeAcGIatrYzkm_1O89kPk0enyYONALYjFBx4,286
24
- dar_backup-1.0.0.1.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
25
- dar_backup-1.0.0.1.dist-info/RECORD,,