Only limit rsync to one file systen if no --source-mountpoint demands have been set

This commit is contained in:
Mike 2019-08-05 06:23:11 -07:00
parent b11d69c957
commit 85bb2d7290

View File

@ -209,6 +209,11 @@ class MikesBackup:
#
return datetime.datetime.now().strftime('%Y-%b-%d_%I%M%p')
#
def is_using_source_mountpoints(self):
return len(self.__source_mountpoint_demands) > 0
#
def demand_source_mountpoints(self):
@ -631,7 +636,6 @@ class MikesBackup:
"--stats",
"--human-readable",
"--itemize-changes",
"--one-file-system",
"--delete",
"--delete-excluded"
]
@ -643,6 +647,11 @@ class MikesBackup:
args.append("--log-file")
args.append(log_path)
# Only allow recursion into multiple file systems
# if any mountpoints were specified
if not self.is_using_source_mountpoints():
args.append("--one-file-system")
#
for i in self.__source_dir_includes:
args.append("--include")