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

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