Beispiel #1
0
 def __init__(self, global_conf, job_conf):
     """Constructor
     
     @param global_conf: Dictionary of general configuration options.
     @param job_conf:    Dictionary of job configuration options.
     
     """
     BackupPluginBase.__init__(self, global_conf, job_conf)
Beispiel #2
0
 def __init__(self, global_conf, job_conf):
     """Constructor
     
     @param global_conf: Dictionary of general configuration options.
     @param job_conf:    Dictionary of job configuration options.
     
     """
     BackupPluginBase.__init__(self, global_conf, job_conf)
     self._connArgs = []
     for (opt, key) in (("-h", "db_host"), ("-P", "db_port"), ("-u", "db_user")):
         val = self._conf.get(key)
         if val is not None:
             self._connArgs.extend([opt, val])
     self._env = os.environ.copy()
     db_password = self._conf.get("db_password")
     if db_password is not None:
         self._env["MYSQL_PWD"] = db_password
Beispiel #3
0
 def __init__(self, global_conf, job_conf):
     """Constructor
     
     @param global_conf: Dictionary of general configuration options.
     @param job_conf:    Dictionary of job configuration options.
     
     """
     BackupPluginBase.__init__(self, global_conf, job_conf)
     self._index_filename = "%s.%s" % (self._conf["filename_index"], self._conf["suffix_index"])
     self._index_path = os.path.join(self._conf["job_path"], self._index_filename)
     self._remote_host = self._conf.get("remote_host")
     self._remote_user = self._conf.get("remote_user")
     if self._remote_host is not None:
         if self._remote_user is not None:
             self._remote = "%s@%s" % (self._remote_user, self._remote_host)
         else:
             self._remote = self._remote_host
     else:
         self._remote = None
Beispiel #4
0
 def __init__(self, global_conf, job_conf):
     """Constructor
     
     @param global_conf: Dictionary of general configuration options.
     @param job_conf:    Dictionary of job configuration options.
     
     """
     BackupPluginBase.__init__(self, global_conf, job_conf)
     self._connArgs = []
     for (opt, key) in (('-h', 'db_host'),
                        ('-p', 'db_port'),
                        ('-l', 'db_database'),
                        ('-U', 'db_user')):
         val = self._conf.get(key) 
         if val is not None:
             self._connArgs.extend([opt, val])
     self._env = os.environ.copy()
     db_password = self._conf.get('db_password')
     if db_password is not None:
         self._env['PGPASSWORD'] = db_password