• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..26-Jun-2021-

pyrax_identity/H26-Jun-2021-301229

READMEH A D26-Jun-20212.5 KiB8063

__init__.pyH A D26-Jun-20211.1 KiB275

_boto_multi.pyH A D26-Jun-20219.7 KiB251187

_boto_single.pyH A D26-Jun-202114.6 KiB352243

adbackend.pyH A D26-Jun-202117 KiB411301

azurebackend.pyH A D26-Jun-20215.5 KiB14588

b2backend.pyH A D26-Jun-20218.8 KiB213158

boxbackend.pyH A D26-Jun-20217 KiB223160

dpbxbackend.pyH A D26-Jun-202119.9 KiB486351

gdrivebackend.pyH A D26-Jun-202115.5 KiB344246

hsibackend.pyH A D26-Jun-20212.7 KiB7039

hubicbackend.pyH A D26-Jun-20212.4 KiB6935

idrivedbackend.pyH A D26-Jun-202119.1 KiB470265

imapbackend.pyH A D26-Jun-202110 KiB283197

jottacloudbackend.pyH A D26-Jun-20215.5 KiB15783

lftpbackend.pyH A D26-Jun-20219.8 KiB237172

localbackend.pyH A D26-Jun-20212.8 KiB8145

mediafirebackend.pyH A D26-Jun-20214.7 KiB14286

megabackend.pyH A D26-Jun-20216.7 KiB195117

megav2backend.pyH A D26-Jun-20218.6 KiB215144

megav3backend.pyH A D26-Jun-202110.1 KiB281204

multibackend.pyH A D26-Jun-202113.7 KiB352209

ncftpbackend.pyH A D26-Jun-20215.6 KiB13281

onedrivebackend.pyH A D26-Jun-202113.3 KiB300205

par2backend.pyH A D26-Jun-20218.3 KiB222153

pcabackend.pyH A D26-Jun-20219 KiB211151

pydrivebackend.pyH A D26-Jun-202113.1 KiB283223

rclonebackend.pyH A D26-Jun-20214.2 KiB11678

rsyncbackend.pyH A D26-Jun-20216.5 KiB171127

s3_boto3_backend.pyH A D26-Jun-20219.4 KiB225140

s3_boto_backend.pyH A D26-Jun-20211.5 KiB3812

ssh_paramiko_backend.pyH A D26-Jun-202119.9 KiB471355

ssh_pexpect_backend.pyH A D26-Jun-202112.6 KiB303240

swiftbackend.pyH A D26-Jun-20218.9 KiB201144

sxbackend.pyH A D26-Jun-20212.3 KiB5827

tahoebackend.pyH A D26-Jun-20212.6 KiB7942

webdavbackend.pyH A D26-Jun-202119.8 KiB483378

README

1= How to write a backend, in five easy steps! =
2
3There are five main methods you want to implement:
4
5__init__  - Initial setup
6_get
7 - Get one file
8 - Retried if an exception is thrown
9_put
10 - Upload one file
11 - Retried if an exception is thrown
12_list
13 - List all files in the backend
14 - Return a list of filenames
15 - Retried if an exception is thrown
16_delete
17 - Delete one file
18 - Retried if an exception is thrown
19
20There are other methods you may optionally implement:
21
22_delete_list
23 - Delete list of files
24 - This is used in preference of _delete if defined
25 - Must gracefully handle individual file errors itself
26 - Retried if an exception is thrown
27_query
28 - Query metadata of one file
29 - Return a dict with a 'size' key, and a file size value (-1 for not found)
30 - Retried if an exception is thrown
31_query_list
32 - Query metadata of a list of files
33 - Return a dict of filenames mapping to a dict with a 'size' key,
34   and a file size value (-1 for not found)
35 - This is used in preference of _query if defined
36 - Must gracefully handle individual file errors itself
37 - Retried if an exception is thrown
38_retry_cleanup
39 - If the backend wants to do any bookkeeping or connection resetting inbetween
40   retries, do it here.
41_error_code
42 - Passed an exception thrown by your backend, return a log.ErrorCode that
43   corresponds to that exception
44_move
45 - If your backend can more optimally move a local file into its backend,
46   implement this.  If it's not implemented or returns False, _put will be
47   called instead (and duplicity will delete the source file after).
48 - Retried if an exception is thrown
49_close
50 - If your backend needs to clean up after itself, do that here.
51
52== Subclassing ==
53
54Always subclass from duplicity.backend.Backend
55
56== Registering ==
57
58You can register your class as a single backend like so:
59
60duplicity.backend.register_backend("foo", FooBackend)
61
62This will allow a URL like so: foo://hostname/path
63
64Or you can register your class as a meta backend like so:
65duplicity.backend.register_backend_prefix("bar", BarBackend)
66
67Which will allow a URL like so: bar+foo://hostname/path and your class will
68be passed the inner URL to either interpret how you like or create a new
69inner backend instance with duplicity.backend.get_backend_object(url).
70
71== Naming ==
72
73Any method that duplicity calls will start with one underscore.  Please use
74zero or two underscores in your method names to avoid conflicts.
75
76== Testing ==
77
78Use "./testing/manual/backendtest foo://hostname/path" to test your new
79backend.  It will load your backend from your current branch.
80