Example #1
0
    def backup_data(self, environments=pantheon.get_environments()):
        """Backup databases for all environments (dev, test, live) of a project.

        """
        for env in environments:
            drupal_vars = pantheon.parse_vhost(self.server.get_vhost_file(
                                               self.project, env))
            dest = os.path.join(self.backup_dir, env, 'database.sql')
            self._dump_data(dest, drupal_vars)
Example #2
0
    def backup_data(self, environments=pantheon.get_environments()):
        """Backup databases for all environments (dev, test, live) of a project.

        """
        for env in environments:
            drupal_vars = pantheon.parse_vhost(
                self.server.get_vhost_file(self.project, env))
            dest = os.path.join(self.backup_dir, env, 'database.sql')
            self._dump_data(dest, drupal_vars)
Example #3
0
    def backup_data(self):
        """Backup databases for environments of a project.

        """
        self.log.info('Initialized backup of data.')
        try:
            for env in self.environments:
                drupal_vars = pantheon.parse_vhost(
                    self.server.get_vhost_file(self.project, env))
                dest = os.path.join(self.backup_dir, env, 'database.sql')
                self._dump_data(dest, drupal_vars)
        except:
            self.log.exception('Backing up the data was unsuccessful.')
            raise
        else:
            self.log.info('Backup of data successful.')
Example #4
0
    def get_dev_data(self):
        """USED FOR REMOTE DEV: dev site data.

        """
        self.log.info('Initialized archive of data.')
        try:
            local('mkdir -p %s' % self.backup_dir)
            drupal_vars = pantheon.parse_vhost(
                self.server.get_vhost_file(self.project, 'dev'))
            destination = os.path.join(self.backup_dir, 'dev_database.sql')
            self._dump_data(destination, drupal_vars)
        except:
            self.log.exception('Archival of data was unsuccessful.')
            raise
        else:
            self.log.info('Archive of data successful.')
Example #5
0
    def backup_data(self):
        """Backup databases for environments of a project.

        """
        self.log.info('Initialized backup of data.')
        try:
            for env in self.environments:
                drupal_vars = pantheon.parse_vhost(self.server.get_vhost_file(
                                                   self.project, env))
                dest = os.path.join(self.backup_dir, env, 'database.sql')
                self._dump_data(dest, drupal_vars)
        except:
            self.log.exception('Backing up the data was unsuccessful.')
            raise
        else:
            self.log.info('Backup of data successful.')
Example #6
0
    def get_dev_data(self):
        """USED FOR REMOTE DEV: dev site data.

        """
        self.log.info('Initialized archive of data.')
        try:
            local('mkdir -p %s' % self.backup_dir)
            drupal_vars = pantheon.parse_vhost(self.server.get_vhost_file(
                                                     self.project, 'dev'))
            destination = os.path.join(self.backup_dir, 'dev_database.sql')
            self._dump_data(destination, drupal_vars)
        except:
            self.log.exception('Archival of data was unsuccessful.')
            raise
        else:
            self.log.info('Archive of data successful.')