Example #1
0
 def sync_data(self, exclude=None):
     """
         Implements sync of root directory to mounted volumes
     """
     if self.mountpoint and self.is_mounted():
         data = DataSync(self.root_dir, self.mountpoint)
         data.sync_data(exclude)
Example #2
0
 def sync_data(self, exclude=None):
     if self.mountpoint and self.is_mounted():
         sync_target = self.mountpoint + '/@'
         if self.custom_args['root_is_snapshot']:
             sync_target = self.mountpoint + '/@/.snapshots/1/snapshot'
         data = DataSync(self.root_dir, sync_target)
         data.sync_data(exclude)
Example #3
0
 def sync_data(self, exclude=None):
     """
         Implements sync of root directory to mounted volumes
     """
     if self.mountpoint and self.is_mounted():
         data = DataSync(self.root_dir, self.mountpoint)
         data.sync_data(exclude)
Example #4
0
 def sync_data(self, exclude=None):
     if self.mountpoint and self.is_mounted():
         sync_target = self.mountpoint + '/@'
         if self.custom_args['root_is_snapshot']:
             sync_target = self.mountpoint + '/@/.snapshots/1/snapshot'
         data = DataSync(self.root_dir, sync_target)
         data.sync_data(exclude)
Example #5
0
 def sync_data(self, exclude=None):
     if not self.root_dir:
         raise KiwiFileSystemSyncError('no root directory specified')
     if not os.path.exists(self.root_dir):
         raise KiwiFileSystemSyncError(
             'given root directory %s does not exist' % self.root_dir)
     device = self.device_provider.get_device()
     Command.run(['mount', device, self.__setup_mountpoint()])
     if self.mountpoint and self.is_mounted():
         data = DataSync(self.root_dir, self.mountpoint)
         data.sync_data(exclude)
         Command.run(['umount', self.mountpoint])
         Path.remove(self.mountpoint)
         self.mountpoint = None
Example #6
0
 def sync_data(self, exclude=None):
     if not self.root_dir:
         raise KiwiFileSystemSyncError(
             'no root directory specified'
         )
     if not os.path.exists(self.root_dir):
         raise KiwiFileSystemSyncError(
             'given root directory %s does not exist' % self.root_dir
         )
     device = self.device_provider.get_device()
     Command.run(
         ['mount', device, self.__setup_mountpoint()]
     )
     if self.mountpoint and self.is_mounted():
         data = DataSync(self.root_dir, self.mountpoint)
         data.sync_data(exclude)
         Command.run(
             ['umount', self.mountpoint]
         )
         Path.remove(self.mountpoint)
         self.mountpoint = None