Beispiel #1
0
 def cmd(self):
     cmd = ('sudo innobackupex'
            ' --stream=xbstream'
            ' --incremental'
            ' --incremental-lsn=%(lsn)s'
            ' %(extra_opts)s ' + get_datadir() + ' 2>/tmp/innobackupex.log')
     return cmd + self.zip_cmd + self.encrypt_cmd
Beispiel #2
0
 def cmd(self):
     cmd = ('sudo innobackupex'
            ' --stream=xbstream'
            ' %(extra_opts)s '
            + get_datadir() +
            ' 2>/tmp/innobackupex.log'
            )
     return cmd + self.zip_cmd + self.encrypt_cmd
Beispiel #3
0
 def _read_log_position(self):
     INFO_FILE = ('%s/xtrabackup_binlog_info' % get_datadir())
     LOG.info(_("Setting read permissions on %s") % INFO_FILE)
     operating_system.chmod(INFO_FILE, FileMode.ADD_READ_ALL, as_root=True)
     LOG.info(_("Reading log position from %s") % INFO_FILE)
     try:
         with open(INFO_FILE, 'rb') as f:
             row = csv.reader(f, delimiter='\t',
                              skipinitialspace=True).next()
             return {'log_file': row[0], 'log_position': int(row[1])}
     except (IOError, IndexError) as ex:
         LOG.exception(ex)
         raise self.UnableToDetermineBinlogPosition(
             {'info_file': INFO_FILE})
Beispiel #4
0
 def _read_log_position(self):
     INFO_FILE = ('%s/xtrabackup_binlog_info' % get_datadir())
     LOG.info(_("Setting read permissions on %s") % INFO_FILE)
     operating_system.chmod(INFO_FILE, FileMode.ADD_READ_ALL, as_root=True)
     LOG.info(_("Reading log position from %s") % INFO_FILE)
     try:
         with open(INFO_FILE, 'rb') as f:
             row = csv.reader(f, delimiter='\t',
                              skipinitialspace=True).next()
             return {
                 'log_file': row[0],
                 'log_position': int(row[1])
             }
     except (IOError, IndexError) as ex:
         LOG.exception(ex)
         raise self.UnableToDetermineBinlogPosition(
             {'info_file': INFO_FILE})