Represents a generic duplicity backend, capable of storing and
retrieving files.
Concrete sub-classes are expected to implement:
|
|
|
|
|
put(self,
source_path,
remote_filename=None)
Transfer source_path (Path object) to remote_filename (string) |
source code
|
|
|
|
get(self,
remote_filename,
local_path)
Retrieve remote_filename and place in local_path |
source code
|
|
|
|
list(self)
Return list of filenames (strings) present in backend |
source code
|
|
|
|
delete(self,
filename_list)
Delete each filename in filename_list, in order if possible. |
source code
|
|
|
|
|
|
|
munge_password(self,
commandline)
Remove password from commandline by substituting the password
found in the URL, if any, with a generic place-holder. |
source code
|
|
|
|
run_command(self,
commandline)
Execute the given command line, interpreted as a shell command,
with logging and error detection. |
source code
|
|
|
|
run_command_persist(self,
commandline)
Like run_command(), but repeat the attempt several times (with a
delay in between) if it fails. |
source code
|
|
|
|
popen(self,
commandline)
Like run_command(), but capture stdout and return it (the contents
read from stdout) as a string. |
source code
|
|
|
|
popen_persist(self,
commandline)
Like run_command_persist(), but capture stdout and return it (the
contents read from stdout) as a string. |
source code
|
|
|
|
|
|
|
get_fileobj_write(self,
filename,
parseresults=None,
sizelist=None)
Return fileobj opened for writing, which will cause the file to be
written to the backend on close(). |
source code
|
|
|
|
get_data(self,
filename,
parseresults=None)
Retrieve a file from backend, process it, return contents. |
source code
|
|
|
|
put_data(self,
buffer,
filename,
parseresults=None)
Put buffer into filename on backend after processing. |
source code
|
|
|
|
close(self)
Close the backend, releasing any resources held and invalidating
any file objects obtained from the backend. |
source code
|
|