def persist_database(self): """Write the database contents to disk""" fsp = FilesystemPersistence(\ database=self.config.get('warehouse', 'database'), user=self.config.get('warehouse', 'database_user'), password=self.config.get('warehouse', 'database_password')) fsp.persist()
def restore_database(self): """Pull previously persisted data into database""" fsp = FilesystemPersistence(\ database=self.config.get('warehouse', 'database'), user=self.config.get('warehouse', 'database_user'), password=self.config.get('warehouse', 'database_password')) fsp.restore()