added --include-received to overrule auto enabling of exclude received. :) fix #150

This commit is contained in:
Edwin Eefting 2023-09-26 22:01:02 +02:00
parent 4e4de2de5a
commit defbc2d0bf
No known key found for this signature in database
GPG Key ID: 0F3C35D8E9887737

View File

@ -47,8 +47,8 @@ class ZfsAuto(CliBase):
self.verbose("NOTE: Source and target are on the same host, excluding target-path from selection.")
self.exclude_paths.append(args.target_path)
else:
if not args.exclude_received:
self.verbose("NOTE: Source and target are on the same host, adding --exclude-received to commandline.")
if not args.exclude_received and not args.include_received:
self.verbose("NOTE: Source and target are on the same host, adding --exclude-received to commandline. (use --include-received to overrule)")
args.exclude_received = True
if args.test:
@ -108,6 +108,9 @@ class ZfsAuto(CliBase):
group.add_argument('--exclude-received', action='store_true',
help='Exclude datasets that have the origin of their autobackup: property as "received". '
'This can avoid recursive replication between two backup partners.')
group.add_argument('--include-received', action='store_true',
help=argparse.SUPPRESS)
return parser