'Timestamp the checkpoint.'

def _timestamp_progress_dir(self):

    for _ in six.moves.range(2):
        timestamp = self._checkpoint_timestamp()
        final_dir = os.path.join(self.config.backup_dir, timestamp)
        try:
            os.rename(self.config.in_progress_dir, final_dir)
            return
        except OSError:
            logger.warning('Extreme,    unexpected    race    condition,    retrying    (%s)', timestamp)
    logger.error('Unable    to    finalize    checkpoint,    %s    ->    %s', self.config.in_progress_dir, final_dir)
    raise errors.ReverterError('Unable    to    finalize    checkpoint    renaming')
