def __init__(self, values=None): if values: self.defaults.update( values.__dict__ ) # Ensure that context has default values for all unset variables super(self.__class__, self).__init__(vars(Values(self.defaults))) if self.masterDataDirectory: self.master_datadir = self.masterDataDirectory else: self.master_datadir = gp.get_masterdatadir() self.master_port = self.get_master_port() if self.local_dump_prefix: self.dump_prefix = self.local_dump_prefix + "_" else: self.dump_prefix = "" if not self.include_dump_tables: self.include_dump_tables = [] if not self.exclude_dump_tables: self.exclude_dump_tables = [] if not self.output_options: self.output_options = [] if not self.dump_schema: self.dump_schema = [] if not self.exclude_dump_schema: self.exclude_dump_schema = [] self.gparray = GpArray.initFromCatalog(dbconn.DbURL( dbname="template1", port=self.master_port), utility=True) self.use_old_filename_format = False # Use new filename format by default self.content_map = self.setup_content_map()
def __init__(self, values=None): if values: self.defaults.update( values.__dict__ ) # Ensure that context has default values for all unset variables super(self.__class__, self).__init__(vars(Values(self.defaults))) if self.masterDataDirectory: self.master_datadir = self.masterDataDirectory else: self.master_datadir = gp.get_masterdatadir() self.master_port = self.get_master_port() if self.local_dump_prefix: self.dump_prefix = self.local_dump_prefix + "_" else: self.dump_prefix = "" if not self.include_dump_tables: self.include_dump_tables = [] if not self.exclude_dump_tables: self.exclude_dump_tables = [] if not self.output_options: self.output_options = [] if not self.dump_schema: self.dump_schema = [] if not self.exclude_dump_schema: self.exclude_dump_schema = [] if self.netbackup_keyword and (len(self.netbackup_keyword) > 100): raise Exception( 'NetBackup Keyword provided has more than max limit (100) characters. Cannot proceed with backup.' )
def __init__(self, values=None): if values: self.defaults.update(values.__dict__) # Ensure that context has default values for all unset variables super(self.__class__, self).__init__(vars(Values(self.defaults))) if self.masterDataDirectory: self.master_datadir = self.masterDataDirectory else: self.master_datadir = gp.get_masterdatadir() self.master_port = self.get_master_port() if self.local_dump_prefix: self.dump_prefix = self.local_dump_prefix + "_" else: self.dump_prefix = "" if not self.include_dump_tables: self.include_dump_tables = [] if not self.exclude_dump_tables: self.exclude_dump_tables = [] if not self.output_options: self.output_options = [] if not self.dump_schema: self.dump_schema = [] if not self.exclude_dump_schema: self.exclude_dump_schema = []
def __init__(self, values=None): if values: self.defaults.update(values.__dict__) # Ensure that context has default values for all unset variables super(self.__class__, self).__init__(vars(Values(self.defaults))) if self.masterDataDirectory: self.master_datadir = self.masterDataDirectory else: self.master_datadir = gp.get_masterdatadir() self.master_port = self.get_master_port() if self.local_dump_prefix: self.dump_prefix = self.local_dump_prefix + "_" else: self.dump_prefix = "" if not self.include_dump_tables: self.include_dump_tables = [] if not self.exclude_dump_tables: self.exclude_dump_tables = [] if not self.output_options: self.output_options = [] if not self.dump_schema: self.dump_schema = [] if not self.exclude_dump_schema: self.exclude_dump_schema = [] if self.netbackup_keyword and (len(self.netbackup_keyword) > 100): raise Exception('NetBackup Keyword provided has more than max limit (100) characters. Cannot proceed with backup.')
def __init__(self, values=None): if values: self.defaults.update(values.__dict__) # Ensure that context has default values for all unset variables super(self.__class__, self).__init__(vars(Values(self.defaults))) if self.masterDataDirectory: self.master_datadir = self.masterDataDirectory else: self.master_datadir = gp.get_masterdatadir() self.master_port = self.get_master_port() if self.local_dump_prefix: self.dump_prefix = self.local_dump_prefix + "_" else: self.dump_prefix = "" if not self.include_dump_tables: self.include_dump_tables = [] if not self.exclude_dump_tables: self.exclude_dump_tables = [] if not self.output_options: self.output_options = [] if not self.dump_schema: self.dump_schema = [] if not self.exclude_dump_schema: self.exclude_dump_schema = [] self.gparray = GpArray.initFromCatalog(dbconn.DbURL(dbname="template1", port=self.master_port), utility=True) self.use_old_filename_format = False # Use new filename format by default self.content_map = self.setup_content_map()