Backup peer representing a remote peer in a backup pool.
This is a class representing a remote (networked) peer in a backup
pool. Remote peers are backed up using an rcp-compatible copy command. A
remote peer has associated with it a name (which must be a valid
hostname), a collect directory, a working directory and a copy method (an
rcp-compatible command).
You can also set an optional local user value. This username will be
used as the local user for any remote copies that are required. It can
only be used if the root user is executing the backup. The root user
will su
to the local user and execute the remote copies as
that user.
The copy method is associated with the peer and not with the actual
request to copy, because we can envision that each remote host might have
a different connect method.
The public methods other than the constructor are part of a
"backup peer" interface shared with the
|
__init__(self,
name,
collectDir,
workingDir,
remoteUser,
rcpCommand=None,
localUser=None)
Initializes a remote backup peer. |
source code
|
|
|
stagePeer(self,
targetDir,
ownership=None,
permissions=None)
Stages data from the peer into the indicated local target
directory. |
source code
|
|
|
|
|
|
|
|
|
_getName(self)
Property target used to get the peer name. |
source code
|
|
|
|
|
_getCollectDir(self)
Property target used to get the collect directory. |
source code
|
|
|
|
|
_getWorkingDir(self)
Property target used to get the working directory. |
source code
|
|
|
|
|
_getRemoteUser(self)
Property target used to get the remote user. |
source code
|
|
|
|
|
_getLocalUser(self)
Property target used to get the local user. |
source code
|
|
|
|
|
_getRcpCommand(self)
Property target used to get the rcp command. |
source code
|
|
Inherited from object :
__delattr__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__str__
|
|
|
|
_copyRemoteDir(remoteUser,
localUser,
remoteHost,
rcpCommand,
rcpCommandList,
sourceDir,
targetDir,
ownership=None,
permissions=None)
Copies files from the source directory to the target
directory. |
source code
|
|
|
_copyRemoteFile(remoteUser,
localUser,
remoteHost,
rcpCommand,
rcpCommandList,
sourceFile,
targetFile,
ownership=None,
permissions=None,
overwrite=True)
Copies a remote source file to a target file. |
source code
|
|
|
_pushLocalFile(remoteUser,
localUser,
remoteHost,
rcpCommand,
rcpCommandList,
sourceFile,
targetFile,
overwrite=True)
Copies a local source file to a remote host. |
source code
|
|