Package CedarBackup2 :: Package extend :: Module postgresql :: Class PostgresqlConfig
[hide private]
[frames] | no frames]

Class PostgresqlConfig

source code

object --+
         |
        PostgresqlConfig

Class representing PostgreSQL configuration.

The PostgreSQL configuration information is used for backing up PostgreSQL databases.

The following restrictions exist on data in this class:

Instance Methods [hide private]
 
__init__(self, user=None, compressMode=None, all=None, databases=None)
Constructor for the PostgresqlConfig class.
source code
 
__repr__(self)
Official string representation for class instance.
source code
 
__str__(self)
Informal string representation for class instance.
source code
 
__cmp__(self, other)
Definition of equals operator for this class.
source code
 
_setUser(self, value)
Property target used to set the user value.
source code
 
_getUser(self)
Property target used to get the user value.
source code
 
_setCompressMode(self, value)
Property target used to set the compress mode.
source code
 
_getCompressMode(self)
Property target used to get the compress mode.
source code
 
_setAll(self, value)
Property target used to set the 'all' flag.
source code
 
_getAll(self)
Property target used to get the 'all' flag.
source code
 
_setDatabases(self, value)
Property target used to set the databases list.
source code
 
_getDatabases(self)
Property target used to get the databases list.
source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__

Properties [hide private]
  user
User to execute backup as.
  all
Indicates whether to back up all databases.
  databases
List of databases to back up.
  compressMode
Compress mode to be used for backed-up files.

Inherited from object: __class__

Method Details [hide private]

__init__(self, user=None, compressMode=None, all=None, databases=None)
(Constructor)

source code 
Constructor for the PostgresqlConfig class.
Parameters:
  • user - User to execute backup as.
  • compressMode - Compress mode for backed-up files.
  • all - Indicates whether to back up all databases.
  • databases - List of databases to back up.
Overrides: object.__init__

__repr__(self)
(Representation operator)

source code 
Official string representation for class instance.
Overrides: object.__repr__

__str__(self)
(Informal representation operator)

source code 
Informal string representation for class instance.
Overrides: object.__str__

__cmp__(self, other)
(Comparison operator)

source code 
Definition of equals operator for this class.
Parameters:
  • other - Other object to compare to.
Returns:
-1/0/1 depending on whether self is <, = or > other.

_setCompressMode(self, value)

source code 
Property target used to set the compress mode. If not None, the mode must be one of the values in VALID_COMPRESS_MODES.
Raises:
  • ValueError - If the value is not valid.

_setAll(self, value)

source code 
Property target used to set the 'all' flag. No validations, but we normalize the value to True or False.

_setDatabases(self, value)

source code 
Property target used to set the databases list. Either the value must be None or each element must be a string.
Raises:
  • ValueError - If the value is not a string.

Property Details [hide private]

user

User to execute backup as.
Get Method:
CedarBackup2.extend.postgresql.PostgresqlConfig._getUser(self) - Property target used to get the user value.
Set Method:
CedarBackup2.extend.postgresql.PostgresqlConfig._setUser(self, value) - Property target used to set the user value.

all

Indicates whether to back up all databases.
Get Method:
CedarBackup2.extend.postgresql.PostgresqlConfig._getAll(self) - Property target used to get the 'all' flag.
Set Method:
CedarBackup2.extend.postgresql.PostgresqlConfig._setAll(self, value) - Property target used to set the 'all' flag.

databases

List of databases to back up.
Get Method:
CedarBackup2.extend.postgresql.PostgresqlConfig._getDatabases(self) - Property target used to get the databases list.
Set Method:
CedarBackup2.extend.postgresql.PostgresqlConfig._setDatabases(self, value) - Property target used to set the databases list.

compressMode

Compress mode to be used for backed-up files.
Get Method:
CedarBackup2.extend.postgresql.PostgresqlConfig._getCompressMode(self) - Property target used to get the compress mode.
Set Method:
CedarBackup2.extend.postgresql.PostgresqlConfig._setCompressMode(self, value) - Property target used to set the compress mode.