added --files-changed flag

This commit is contained in:
slantsh
2026-02-22 13:17:09 +05:30
parent 7ca42a8f4f
commit ea2a253134
3 changed files with 11 additions and 0 deletions
+2
View File
@@ -198,6 +198,7 @@ def make_base_create_command( # noqa: PLR0912
umask = config.get('umask', None)
lock_wait = config.get('lock_wait', None)
list_filter_flags = flags.make_list_filter_flags(local_borg_version, dry_run)
files_changed = config.get('files_changed')
files_cache = config.get('files_cache')
archive_name_format = (
config.get('archive_name_format', flags.get_default_archive_name_format(local_borg_version))
@@ -248,6 +249,7 @@ def make_base_create_command( # noqa: PLR0912
+ (('--nobirthtime',) if config.get('birthtime') is False else ())
+ (('--read-special',) if config.get('read_special') or stream_processes else ())
+ noflags_flags
+ (('--files-changed', files_changed) if files_changed else ())
+ (('--files-cache', files_cache) if files_cache else ())
+ (('--remote-path', remote_path) if remote_path else ())
+ (('--umask', str(umask)) if umask else ())
+8
View File
@@ -166,6 +166,14 @@ properties:
Record filesystem flags (e.g. NODUMP, IMMUTABLE) in archive.
Defaults to true.
example: false
files_changed:
type: string
description: |
Threshold for considering a file as changed. See
https://borgbackup.readthedocs.io/en/stable/usage/create.html for
details. Defaults to "mtime" (i.e., a file is considered
changed if its mtime has changed since the last backup).
example: mtime,size
files_cache:
type: string
description: |
+1
View File
@@ -482,6 +482,7 @@ def test_make_base_create_command_with_store_config_false_omits_config_files():
('flags', True, False, ()),
('flags', False, True, ('--noflags',)),
('flags', False, False, ('--nobsdflags',)),
('files_changed', 'mtime', True, ('--files-changed', 'mtime')),
('files_cache', 'ctime,size', True, ('--files-cache', 'ctime,size')),
('umask', 740, True, ('--umask', '740')),
('lock_wait', 5, True, ('--lock-wait', '5')),