changement du path btrfs
This commit is contained in:
		
							parent
							
								
									26c45f3fe6
								
							
						
					
					
						commit
						82ca9dfa35
					
				@ -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
 | 
			
		||||
 | 
			
		||||
@ -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
 | 
			
		||||
 | 
			
		||||
@ -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)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user