From 85bb2d7290ccc73952857b9bbb65f521e06462c5 Mon Sep 17 00:00:00 2001 From: Mike Date: Mon, 5 Aug 2019 06:23:11 -0700 Subject: [PATCH] Only limit rsync to one file systen if no --source-mountpoint demands have been set --- mikes-backup | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/mikes-backup b/mikes-backup index e46dc61..41f44ee 100755 --- a/mikes-backup +++ b/mikes-backup @@ -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")