dar-backup 1.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 +29 -0
- dar_backup/README.md +75 -15
- dar_backup/__about__.py +1 -2
- dar_backup/clean_log.py +102 -63
- dar_backup/cleanup.py +136 -102
- dar_backup/command_runner.py +75 -13
- dar_backup/config_settings.py +25 -11
- dar_backup/dar-backup.conf +7 -0
- dar_backup/dar-backup.conf.j2 +3 -1
- dar_backup/dar_backup.py +438 -64
- dar_backup/demo.py +18 -9
- dar_backup/installer.py +18 -1
- dar_backup/manager.py +295 -88
- dar_backup/util.py +119 -11
- {dar_backup-1.0.1.dist-info → dar_backup-1.0.2.dist-info}/METADATA +78 -18
- dar_backup-1.0.2.dist-info/RECORD +25 -0
- dar_backup-1.0.1.dist-info/RECORD +0 -25
- {dar_backup-1.0.1.dist-info → dar_backup-1.0.2.dist-info}/WHEEL +0 -0
- {dar_backup-1.0.1.dist-info → dar_backup-1.0.2.dist-info}/entry_points.txt +0 -0
- {dar_backup-1.0.1.dist-info → dar_backup-1.0.2.dist-info}/licenses/LICENSE +0 -0
dar_backup/util.py
CHANGED
|
@@ -47,6 +47,26 @@ from typing import Tuple
|
|
|
47
47
|
logger=None
|
|
48
48
|
secondary_logger=None
|
|
49
49
|
|
|
50
|
+
class CleanFormatter(logging.Formatter):
|
|
51
|
+
"""
|
|
52
|
+
Formatter that ignores exception tracebacks.
|
|
53
|
+
"""
|
|
54
|
+
def format(self, record):
|
|
55
|
+
# Save original exception info
|
|
56
|
+
orig_exc_info = record.exc_info
|
|
57
|
+
orig_exc_text = record.exc_text
|
|
58
|
+
|
|
59
|
+
# Temporarily hide it
|
|
60
|
+
record.exc_info = None
|
|
61
|
+
record.exc_text = None
|
|
62
|
+
|
|
63
|
+
try:
|
|
64
|
+
return super().format(record)
|
|
65
|
+
finally:
|
|
66
|
+
# Restore it so other handlers (like the trace handler) can use it
|
|
67
|
+
record.exc_info = orig_exc_info
|
|
68
|
+
record.exc_text = orig_exc_text
|
|
69
|
+
|
|
50
70
|
#def setup_logging(log_file: str, command_output_log_file: str, log_level: str = "info", log_to_stdout: bool = False) -> logging.Logger:
|
|
51
71
|
def setup_logging(
|
|
52
72
|
log_file: str,
|
|
@@ -55,10 +75,15 @@ def setup_logging(
|
|
|
55
75
|
log_to_stdout: bool = False,
|
|
56
76
|
logfile_max_bytes: int = 26214400,
|
|
57
77
|
logfile_backup_count: int = 5,
|
|
78
|
+
trace_log_file: str = None,
|
|
79
|
+
trace_log_max_bytes: int = 10485760,
|
|
80
|
+
trace_log_backup_count: int = 1
|
|
58
81
|
) -> logging.Logger:
|
|
59
82
|
|
|
60
83
|
"""
|
|
61
84
|
Sets up logging for the main program and a separate secondary logfile for command outputs.
|
|
85
|
+
|
|
86
|
+
Also sets up a trace log file that captures all logs at DEBUG level including stack traces.
|
|
62
87
|
|
|
63
88
|
Args:
|
|
64
89
|
log_file (str): The path to the main log file.
|
|
@@ -67,6 +92,9 @@ def setup_logging(
|
|
|
67
92
|
log_to_stdout (bool): If True, log messages will be printed to the console. Defaults to False.
|
|
68
93
|
logfile_max_bytes: max file size of a log file, defailt = 26214400.
|
|
69
94
|
logfile_backup_count: max numbers of logs files, default = 5.
|
|
95
|
+
trace_log_file (str): Optional path for the trace log file. Defaults to log_file with ".trace.log" suffix.
|
|
96
|
+
trace_log_max_bytes: max file size of the trace log file, default = 10485760 (10MB).
|
|
97
|
+
trace_log_backup_count: max numbers of trace log files, default = 1.
|
|
70
98
|
|
|
71
99
|
Returns:
|
|
72
100
|
a RotatingFileHandler logger instance.
|
|
@@ -85,6 +113,7 @@ def setup_logging(
|
|
|
85
113
|
|
|
86
114
|
logging.Logger.trace = trace
|
|
87
115
|
|
|
116
|
+
# Main log file handler (clean logs)
|
|
88
117
|
file_handler = RotatingFileHandler(
|
|
89
118
|
log_file,
|
|
90
119
|
maxBytes=logfile_max_bytes,
|
|
@@ -92,6 +121,23 @@ def setup_logging(
|
|
|
92
121
|
encoding="utf-8",
|
|
93
122
|
)
|
|
94
123
|
|
|
124
|
+
# Trace log file handler (full details)
|
|
125
|
+
if not trace_log_file:
|
|
126
|
+
if log_file == "/dev/null":
|
|
127
|
+
trace_log_file = "/dev/null"
|
|
128
|
+
else:
|
|
129
|
+
base, ext = os.path.splitext(log_file)
|
|
130
|
+
trace_log_file = f"{base}.trace{ext}"
|
|
131
|
+
|
|
132
|
+
trace_handler = RotatingFileHandler(
|
|
133
|
+
trace_log_file,
|
|
134
|
+
maxBytes=trace_log_max_bytes,
|
|
135
|
+
backupCount=trace_log_backup_count,
|
|
136
|
+
encoding="utf-8",
|
|
137
|
+
)
|
|
138
|
+
# Trace handler gets everything (DEBUG level) and keeps tracebacks
|
|
139
|
+
trace_handler.setLevel(logging.DEBUG)
|
|
140
|
+
|
|
95
141
|
command_handler = RotatingFileHandler(
|
|
96
142
|
command_output_log_file,
|
|
97
143
|
maxBytes=logfile_max_bytes,
|
|
@@ -99,24 +145,35 @@ def setup_logging(
|
|
|
99
145
|
encoding="utf-8",
|
|
100
146
|
)
|
|
101
147
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
148
|
+
standard_formatter = logging.Formatter('%(asctime)s - %(levelname)s - %(message)s')
|
|
149
|
+
clean_formatter = CleanFormatter('%(asctime)s - %(levelname)s - %(message)s')
|
|
150
|
+
|
|
151
|
+
file_handler.setFormatter(clean_formatter)
|
|
152
|
+
trace_handler.setFormatter(standard_formatter)
|
|
153
|
+
command_handler.setFormatter(standard_formatter)
|
|
105
154
|
|
|
106
155
|
|
|
107
156
|
# Setup main logger
|
|
108
157
|
logger = logging.getLogger("main_logger")
|
|
109
|
-
logger
|
|
158
|
+
# Ensure logger captures everything so trace_handler can see DEBUG messages even if main log_level is INFO
|
|
159
|
+
logger.setLevel(logging.DEBUG)
|
|
160
|
+
|
|
161
|
+
# Configure file_handler level based on user preference
|
|
162
|
+
file_handler.setLevel(logging.DEBUG if log_level == "debug" else TRACE_LEVEL_NUM if log_level == "trace" else logging.INFO)
|
|
163
|
+
|
|
110
164
|
logger.addHandler(file_handler)
|
|
165
|
+
logger.addHandler(trace_handler)
|
|
111
166
|
|
|
112
167
|
# Setup secondary logger for command outputs
|
|
113
168
|
secondary_logger = logging.getLogger("command_output_logger")
|
|
114
169
|
secondary_logger.setLevel(logging.DEBUG if log_level == "debug" else TRACE_LEVEL_NUM if log_level == "trace" else logging.INFO)
|
|
115
170
|
secondary_logger.addHandler(command_handler)
|
|
171
|
+
secondary_logger.addHandler(trace_handler)
|
|
116
172
|
|
|
117
173
|
if log_to_stdout:
|
|
118
174
|
stdout_handler = logging.StreamHandler(sys.stdout)
|
|
119
|
-
stdout_handler.setFormatter(
|
|
175
|
+
stdout_handler.setFormatter(clean_formatter)
|
|
176
|
+
stdout_handler.setLevel(logging.DEBUG if log_level == "debug" else TRACE_LEVEL_NUM if log_level == "trace" else logging.INFO)
|
|
120
177
|
logger.addHandler(stdout_handler)
|
|
121
178
|
|
|
122
179
|
return logger
|
|
@@ -375,13 +432,64 @@ def requirements(type: str, config_setting: ConfigSettings):
|
|
|
375
432
|
if type in config_setting.config:
|
|
376
433
|
for key in sorted(config_setting.config[type].keys()):
|
|
377
434
|
script = config_setting.config[type][key]
|
|
435
|
+
use_run_fallback = (
|
|
436
|
+
os.getenv("PYTEST_CURRENT_TEST") is not None
|
|
437
|
+
or getattr(subprocess.run, "__module__", "") != "subprocess"
|
|
438
|
+
)
|
|
378
439
|
try:
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
440
|
+
if use_run_fallback:
|
|
441
|
+
result = subprocess.run(
|
|
442
|
+
script,
|
|
443
|
+
stdout=subprocess.PIPE,
|
|
444
|
+
stderr=subprocess.PIPE,
|
|
445
|
+
text=True,
|
|
446
|
+
shell=True,
|
|
447
|
+
check=True
|
|
448
|
+
)
|
|
449
|
+
logger.debug(f"{type} {key}: '{script}' run, return code: {result.returncode}")
|
|
450
|
+
logger.debug(f"{type} stdout:\n{result.stdout}")
|
|
451
|
+
if result.returncode != 0:
|
|
452
|
+
logger.error(f"{type} stderr:\n{result.stderr}")
|
|
453
|
+
raise RuntimeError(f"{type} {key}: '{script}' failed, return code: {result.returncode}")
|
|
454
|
+
else:
|
|
455
|
+
process = subprocess.Popen(
|
|
456
|
+
script,
|
|
457
|
+
stdout=subprocess.PIPE,
|
|
458
|
+
stderr=subprocess.PIPE,
|
|
459
|
+
text=True,
|
|
460
|
+
shell=True
|
|
461
|
+
)
|
|
462
|
+
stdout_lines = []
|
|
463
|
+
stderr_lines = []
|
|
464
|
+
|
|
465
|
+
def read_stream(stream, lines, level):
|
|
466
|
+
if stream is None:
|
|
467
|
+
return
|
|
468
|
+
for line in stream:
|
|
469
|
+
logger.log(level, line.rstrip())
|
|
470
|
+
lines.append(line)
|
|
471
|
+
|
|
472
|
+
stdout_thread = threading.Thread(
|
|
473
|
+
target=read_stream,
|
|
474
|
+
args=(process.stdout, stdout_lines, logging.DEBUG)
|
|
475
|
+
)
|
|
476
|
+
stderr_thread = threading.Thread(
|
|
477
|
+
target=read_stream,
|
|
478
|
+
args=(process.stderr, stderr_lines, logging.ERROR)
|
|
479
|
+
)
|
|
480
|
+
stdout_thread.start()
|
|
481
|
+
stderr_thread.start()
|
|
482
|
+
|
|
483
|
+
process.wait()
|
|
484
|
+
stdout_thread.join()
|
|
485
|
+
stderr_thread.join()
|
|
486
|
+
|
|
487
|
+
logger.debug(f"{type} {key}: '{script}' run, return code: {process.returncode}")
|
|
488
|
+
if process.returncode != 0:
|
|
489
|
+
stderr_text = "".join(stderr_lines)
|
|
490
|
+
if stderr_text:
|
|
491
|
+
logger.error(f"{type} stderr:\n{stderr_text}")
|
|
492
|
+
raise RuntimeError(f"{type} {key}: '{script}' failed, return code: {process.returncode}")
|
|
385
493
|
except subprocess.CalledProcessError as e:
|
|
386
494
|
logger.error(f"Error executing {key}: '{script}': {e}")
|
|
387
495
|
raise e
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dar-backup
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.2
|
|
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
|
|
@@ -686,9 +686,9 @@ Classifier: Development Status :: 5 - Production/Stable
|
|
|
686
686
|
Classifier: Intended Audience :: End Users/Desktop
|
|
687
687
|
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
|
|
688
688
|
Classifier: Operating System :: POSIX :: Linux
|
|
689
|
-
Classifier: Programming Language :: Python :: 3.
|
|
689
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
690
690
|
Classifier: Topic :: System :: Archiving :: Backup
|
|
691
|
-
Requires-Python: >=3.
|
|
691
|
+
Requires-Python: >=3.11
|
|
692
692
|
Requires-Dist: argcomplete>=3.6.2
|
|
693
693
|
Requires-Dist: inputimeout>=1.0.4
|
|
694
694
|
Requires-Dist: jinja2>=3.1.6
|
|
@@ -813,8 +813,8 @@ Version **1.0.0** was reached on October 9, 2025.
|
|
|
813
813
|
- [Performance tip due to par2](#performance-tip-due-to-par2)
|
|
814
814
|
- [.darrc sets -vd -vf (since v0.6.4)](#darrc-sets--vd--vf-since-v064)
|
|
815
815
|
- [Separate log file for command output](#separate-log-file-for-command-output)
|
|
816
|
+
- [Trace Logging (Debug details)](#trace-logging-debug-details)
|
|
816
817
|
- [Skipping cache directories](#skipping-cache-directories)
|
|
817
|
-
- [Progress bar and current directory](#progress-bar-and-current-directory)
|
|
818
818
|
- [Shell autocompletion](#shell-autocompletion)
|
|
819
819
|
- [Use it](#use-it)
|
|
820
820
|
- [Archive name completion (smart, context-aware)](#archive-name-completion-smart-context-aware)
|
|
@@ -841,6 +841,9 @@ Version **1.0.0** was reached on October 9, 2025.
|
|
|
841
841
|
- [DISCORD WEBHOOK](#discord-webhook)
|
|
842
842
|
- [Restore test config](#restore-test-config)
|
|
843
843
|
- [Par2](#par2-1)
|
|
844
|
+
- [1.0.2](#102)
|
|
845
|
+
- [Trace Logging](#trace-logging)
|
|
846
|
+
- [Command output Capture](#command-output-capture)
|
|
844
847
|
|
|
845
848
|
## My use case
|
|
846
849
|
|
|
@@ -1509,7 +1512,6 @@ ERROR_CORRECTION_PERCENT = 5
|
|
|
1509
1512
|
ENABLED = True
|
|
1510
1513
|
# Optional PAR2 configuration
|
|
1511
1514
|
# PAR2_DIR = /path/to/par2-store
|
|
1512
|
-
# PAR2_MODE = per-slice
|
|
1513
1515
|
# PAR2_RATIO_FULL = 10
|
|
1514
1516
|
# PAR2_RATIO_DIFF = 5
|
|
1515
1517
|
# PAR2_RATIO_INCR = 5
|
|
@@ -1518,7 +1520,6 @@ ENABLED = True
|
|
|
1518
1520
|
# Optional per-backup overrides (section name = backup definition)
|
|
1519
1521
|
[media-files]
|
|
1520
1522
|
PAR2_DIR = /mnt/par2/media-files
|
|
1521
|
-
PAR2_MODE = per-archive
|
|
1522
1523
|
PAR2_RATIO_FULL = 10
|
|
1523
1524
|
|
|
1524
1525
|
# scripts to run before the backup to setup the environment
|
|
@@ -1536,6 +1537,7 @@ PAR2 notes:
|
|
|
1536
1537
|
- If `PAR2_DIR` is unset, par2 files are created next to the archive slices (legacy behavior) and no manifest is written
|
|
1537
1538
|
- When `PAR2_DIR` is set, dar-backup writes a manifest next to the par2 set:
|
|
1538
1539
|
`archive_base.par2.manifest.ini`
|
|
1540
|
+
- When generating a par2 set, par2 reads all archive slices before writing any output files; for large backups, this initial read can take hours
|
|
1539
1541
|
- Verify or repair using:
|
|
1540
1542
|
`par2 verify -B <archive_dir> <par2_set.par2>`
|
|
1541
1543
|
`par2 repair -B <archive_dir> <par2_set.par2>`
|
|
@@ -1861,6 +1863,25 @@ This happens when the shell splits the quoted string or interprets globs before
|
|
|
1861
1863
|
|
|
1862
1864
|
> 💡 **Tip:** See [dar's documentation](http://dar.linux.free.fr/doc/man/dar.html#COMMANDS%20AND%20OPTIONS)
|
|
1863
1865
|
|
|
1866
|
+
>
|
|
1867
|
+
> 💡💡 **Tip:** To filter all the empty directories away that `dar` emits when listing contents, append this grep:
|
|
1868
|
+
>
|
|
1869
|
+
> ```bash
|
|
1870
|
+
> |grep -vE '\s+d[rwx-]{9}\s'
|
|
1871
|
+
>```
|
|
1872
|
+
>
|
|
1873
|
+
>Example using the grep to discard directory noise from `dar's` output:
|
|
1874
|
+
>
|
|
1875
|
+
> ```bash
|
|
1876
|
+
> dar-backup --list-contents media-files_INCR_2025-05-10 --selection="-I '*Z50*' -X '*.xmp'" | grep -vE '\s+d[rwx-]{9}\s'
|
|
1877
|
+
>[Saved][ ] [-L-][ 0%][X] -rw-rw-r-- user user 26 Mio Fri May 9 11:26:16 2025 home/user/data/2025/2025-05-09-Roskilde-Nordisk-udstilling/Z50_0633.NEF
|
|
1878
|
+
>[Saved][ ] [-L-][ 0%][X] -rw-rw-r-- user user 26 Mio Fri May 9 11:26:16 2025 home/user/data/2025/2025-05-09-Roskilde-Nordisk-udstilling/Z50_0632.NEF
|
|
1879
|
+
>[Saved][ ] [-L-][ 0%][X] -rw-rw-r-- user user 28 Mio Fri May 9 11:09:04 2025 home/user/data/2025/2025-05-09-Roskilde-Nordisk-udstilling/Z50_0631.NEF
|
|
1880
|
+
>[Saved][ ] [-L-][ 0%][X] -rw-rw-r-- user user 29 Mio Fri May 9 11:09:03 2025 home/user/data/2025/2025-05-09-Roskilde-Nordisk-udstilling/Z50_0630.NEF
|
|
1881
|
+
>[Saved][ ] [-L-][ 0%][X] -rw-rw-r-- user user 29 Mio Fri May 9 11:09:03 2025 home/user/data/2025/2025-05-09-Roskilde-Nordisk-udstilling/Z50_0629.NEF
|
|
1882
|
+
>...
|
|
1883
|
+
>```
|
|
1884
|
+
|
|
1864
1885
|
### select a directory
|
|
1865
1886
|
|
|
1866
1887
|
Select files and sub directories in `home/user/data/2025/2025-05-09-Roskilde-Nordisk-udstilling`
|
|
@@ -2217,23 +2238,29 @@ In order to not clutter that log file with the output of commands being run, a n
|
|
|
2217
2238
|
|
|
2218
2239
|
The secondary log file can get quite cluttered, if you want to remove the clutter, run the `clean-log`script with the `--file` option, or simply delete it.
|
|
2219
2240
|
|
|
2220
|
-
###
|
|
2241
|
+
### Trace Logging (Debug details)
|
|
2221
2242
|
|
|
2222
|
-
|
|
2243
|
+
To keep the main log file clean while preserving essential debugging information, `dar-backup` creates a separate trace log file (e.g., `dar-backup.trace.log`) alongside the main log.
|
|
2223
2244
|
|
|
2224
|
-
|
|
2245
|
+
- **Main Log (`dar-backup.log`)**: Contains clean, human-readable INFO/ERROR messages. Stack traces are suppressed here.
|
|
2246
|
+
- **Trace Log (`dar-backup.trace.log`)**: Captures ALL messages at `DEBUG` level, including full exception stack traces. Use this file for debugging crashes or unexpected behavior.
|
|
2225
2247
|
|
|
2226
|
-
|
|
2248
|
+
You can configure the rotation of this file in `[MISC]`:
|
|
2227
2249
|
|
|
2228
|
-
|
|
2250
|
+
```ini
|
|
2251
|
+
[MISC]
|
|
2252
|
+
# ... other settings ...
|
|
2253
|
+
TRACE_LOG_MAX_BYTES = 10485760 # 10 MB default
|
|
2254
|
+
TRACE_LOG_BACKUP_COUNT = 1 # Keep 1 old trace file (default)
|
|
2255
|
+
```
|
|
2229
2256
|
|
|
2230
|
-
|
|
2231
|
-
dar-backup displays 2 visual artifacts to show progress.
|
|
2257
|
+
### Skipping cache directories
|
|
2232
2258
|
|
|
2233
|
-
|
|
2234
|
-
2. a status line showing the directory being backed up. If the directory is big and takes time to backup, the line is not changing, but you will probably know there is a lot to backup.
|
|
2259
|
+
The author uses the `--cache-directory-tagging` option in his [backup definitions](#backup-definition-example).
|
|
2235
2260
|
|
|
2236
|
-
The
|
|
2261
|
+
The effect is that directories with the [CACHEDIR.TAG](https://bford.info/cachedir/) file are not backed up. Those directories contain content fetched from the net, which is of an ephemeral nature and probably not what you want to back up.
|
|
2262
|
+
|
|
2263
|
+
If the option is not in the backup definition, the cache directories are backed up as any other.
|
|
2237
2264
|
|
|
2238
2265
|
### Shell autocompletion
|
|
2239
2266
|
|
|
@@ -2418,7 +2445,6 @@ pytest # run the test suite
|
|
|
2418
2445
|
|
|
2419
2446
|
- Perhaps look into pre-processing backup definitions. As `dar` does not expand env vars
|
|
2420
2447
|
`dar-backup` could do so and feed the result to `dar`.
|
|
2421
|
-
- When run interactively, a progress bar during test and par2 generation would be nice.
|
|
2422
2448
|
- Look into a way to move the .par2 files away from the `dar` slices, to maximize chance of good redundancy.
|
|
2423
2449
|
- Add option to dar-backup to use the `dar` option `--fsa-scope none`
|
|
2424
2450
|
|
|
@@ -2754,10 +2780,44 @@ PAR2_RUN_VERIFY = true
|
|
|
2754
2780
|
#
|
|
2755
2781
|
#[etc]
|
|
2756
2782
|
# Keep global PAR2 settings but tweak ratios for this backup definition
|
|
2757
|
-
# RATIO is
|
|
2783
|
+
# RATIO is given in percent (%)
|
|
2758
2784
|
#PAR2_RATIO_FULL = 15
|
|
2759
2785
|
#PAR2_RATIO_DIFF = 8
|
|
2760
2786
|
#PAR2_RATIO_INCR = 8
|
|
2761
2787
|
```
|
|
2762
2788
|
|
|
2763
2789
|
[Per-backup override test case: `tests/test_par2_overrides.py`](v2/tests/test_par2_overrides.py)
|
|
2790
|
+
|
|
2791
|
+
#### 1.0.2
|
|
2792
|
+
|
|
2793
|
+
##### Trace Logging
|
|
2794
|
+
|
|
2795
|
+
To support debugging without cluttering the main log file, a secondary trace log is now created (e.g., `dar-backup.trace.log`).
|
|
2796
|
+
This file captures all `DEBUG` level messages and full exception stack traces.
|
|
2797
|
+
|
|
2798
|
+
You can configure its rotation in the `[MISC]` section:
|
|
2799
|
+
|
|
2800
|
+
- `TRACE_LOG_MAX_BYTES`: Max size of the trace log file in bytes. Default is `10485760` (10 MB).
|
|
2801
|
+
- `TRACE_LOG_BACKUP_COUNT`: Number of rotated trace log files to keep. Default is `1`.
|
|
2802
|
+
|
|
2803
|
+
Example:
|
|
2804
|
+
|
|
2805
|
+
```ini
|
|
2806
|
+
[MISC]
|
|
2807
|
+
TRACE_LOG_MAX_BYTES = 10485760
|
|
2808
|
+
TRACE_LOG_BACKUP_COUNT = 1
|
|
2809
|
+
```
|
|
2810
|
+
|
|
2811
|
+
##### Command output Capture
|
|
2812
|
+
|
|
2813
|
+
- New optional `[MISC]` setting: `COMMAND_CAPTURE_MAX_BYTES` (default 102400).
|
|
2814
|
+
- Limits how much stdout/stderr is kept in memory per command while still logging full output.
|
|
2815
|
+
- Set to `0` to disable buffering entirely. Command output is still streamed to dar-backup-commands.log
|
|
2816
|
+
- If set to `0`, the calling function cannot rely on output from the executed command. The exit value is the only result provided.
|
|
2817
|
+
|
|
2818
|
+
Example:
|
|
2819
|
+
|
|
2820
|
+
```ini
|
|
2821
|
+
[MISC]
|
|
2822
|
+
COMMAND_CAPTURE_MAX_BYTES = 102400
|
|
2823
|
+
```
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
dar_backup/.darrc,sha256=-aerqivZmOsW_XBCh9IfbYTUvw0GkzDSr3Vx4GcNB1g,2113
|
|
2
|
+
dar_backup/Changelog.md,sha256=gIAlrXElafjmReneKZlhaPd5FcXU7SJ58_P-huzLTO8,19436
|
|
3
|
+
dar_backup/README.md,sha256=b9w97562AlVTE7ob_5kmf1pc9EiUi7swv8g11M4NOrE,78420
|
|
4
|
+
dar_backup/__about__.py,sha256=0lLpLB4_DxcwxlIZF1F8V8O6WVfjzKepl2PPulVwn2Q,370
|
|
5
|
+
dar_backup/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
|
+
dar_backup/clean_log.py,sha256=Uf6MjpS_v1IVZdfx7ogRo6j5EIscdxjLImn8GKZo_rc,7038
|
|
7
|
+
dar_backup/cleanup.py,sha256=aC7ogT68u570ufXrzFgpCcxWgzN5dX0o5LIgZhgbQKo,19147
|
|
8
|
+
dar_backup/command_runner.py,sha256=ktK_LmVUZATZlfXPniGLC4W_8x187OzKreK7Dhb5LUA,13123
|
|
9
|
+
dar_backup/config_settings.py,sha256=PKe6iTVeSsN1DW4kTgFbUHsl8S5E-f0I3Lhn4P9a4hs,12723
|
|
10
|
+
dar_backup/dar-backup.conf,sha256=ejucmhEbSdqFU4JEVfrWbFj9H6U87TWSnhex3LraEUY,2124
|
|
11
|
+
dar_backup/dar-backup.conf.j2,sha256=kD13msmP2IXLjnJ9lZmqtLTnsUZq1EkPZAI1LlOkYXo,3852
|
|
12
|
+
dar_backup/dar_backup.py,sha256=997dp6zjXluoenldo19KYtDVt91uMJxoHOI6cIVzohs,69805
|
|
13
|
+
dar_backup/dar_backup_systemd.py,sha256=PwAc2H2J3hQLWpnC6Ib95NZYtB2G2NDgkSblfLj1n10,3875
|
|
14
|
+
dar_backup/demo.py,sha256=KaW-KOqP1sBX4TYJoO-Wr84e81ILI2kN2iV57QU6rbg,8243
|
|
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=yJ0xXi24C1Vo6gnj2BlhV1X55ZIG5t21t8tNKTYSclM,7616
|
|
18
|
+
dar_backup/manager.py,sha256=rctD1WNdSwyEiDw81wnhPyzIVKjrax2QU71PRSx4MqQ,34995
|
|
19
|
+
dar_backup/rich_progress.py,sha256=SfwFxebBl6jnDQMUQr4McknkW1yQWaJVo1Ju1OD3okA,3221
|
|
20
|
+
dar_backup/util.py,sha256=wVyHzdZIQSnXPSup2m0Wx1w-PKx_ornsg4MMEW5AoKs,38608
|
|
21
|
+
dar_backup-1.0.2.dist-info/METADATA,sha256=7_shfQw0tpdJbnlfR46Abd03LxkTzQZj_Xv1mtjNAIM,121126
|
|
22
|
+
dar_backup-1.0.2.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
23
|
+
dar_backup-1.0.2.dist-info/entry_points.txt,sha256=pOK9M8cHeAcGIatrYzkm_1O89kPk0enyYONALYjFBx4,286
|
|
24
|
+
dar_backup-1.0.2.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
25
|
+
dar_backup-1.0.2.dist-info/RECORD,,
|
|
@@ -1,25 +0,0 @@
|
|
|
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,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|