From 82ca9dfa355ed8c2f6b27ff6949b2567d10ca47b Mon Sep 17 00:00:00 2001 From: Vincent MAUGER Date: Thu, 11 Jun 2020 11:42:30 +0200 Subject: [PATCH] changement du path btrfs --- libtisbackup/backup_rsync_btrfs.py | 4 ++-- libtisbackup/common.py | 2 +- samples/migrate_rsync_to_btrfs.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libtisbackup/backup_rsync_btrfs.py b/libtisbackup/backup_rsync_btrfs.py index 354d332..a978c6d 100644 --- a/libtisbackup/backup_rsync_btrfs.py +++ b/libtisbackup/backup_rsync_btrfs.py @@ -68,7 +68,7 @@ class backup_rsync_btrfs(backup_generic): dest_dir = os.path.join(self.backup_dir,'last_backup') if not os.path.isdir(dest_dir): if not self.dry_run: - cmd = "/sbin/btrfs subvolume create %s"%dest_dir + cmd = "/bin/btrfs subvolume create %s"%dest_dir process = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, close_fds=True) log = monitor_stdout(process,'',self) returncode = process.returncode @@ -210,7 +210,7 @@ class backup_rsync_btrfs(backup_generic): self.logger.debug("[%s] snapshoting last_backup directory from %s to %s" ,self.backup_name,dest_dir,finaldest) if not os.path.isdir(finaldest): if not self.dry_run: - cmd = "/sbin/btrfs subvolume snapshot %s %s"%(dest_dir,finaldest) + cmd = "/bin/btrfs subvolume snapshot %s %s"%(dest_dir,finaldest) process = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, close_fds=True) log = monitor_stdout(process,'',self) returncode = process.returncode diff --git a/libtisbackup/common.py b/libtisbackup/common.py index 0d67e8f..e662f4e 100644 --- a/libtisbackup/common.py +++ b/libtisbackup/common.py @@ -778,7 +778,7 @@ class backup_generic: self.logger.info('[%s] removing directory "%s"',self.backup_name,oldbackup_location) if not self.dry_run: if self.type =="rsync+btrfs+ssh" or self.type == "rsync+btrfs": - cmd = "/sbin/btrfs subvolume delete %s"%oldbackup_location.encode('ascii') + cmd = "/bin/btrfs subvolume delete %s"%oldbackup_location.encode('ascii') process = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, close_fds=True) log = monitor_stdout(process,'',self) returncode = process.returncode diff --git a/samples/migrate_rsync_to_btrfs.py b/samples/migrate_rsync_to_btrfs.py index 2503b3c..ee4a24c 100644 --- a/samples/migrate_rsync_to_btrfs.py +++ b/samples/migrate_rsync_to_btrfs.py @@ -15,7 +15,7 @@ for backup in backups: base_dir = os.path.join(backup_base_dir,backup) dest_dir = os.path.join(base_dir, 'last_backup') if not os.path.isdir(dest_dir): - cmd = "/sbin/btrfs subvolume create %s"%dest_dir + cmd = "/bin/btrfs subvolume create %s"%dest_dir print 'btrfs subvolume create "%s"' %dest_dir print subprocess.check_output(cmd, shell=True)