Skip to main content

DAVBACKUP

Downloads an entire tree from a DAV server. This can be used to make backups from an owncloud/nextcloud server.

Usage

The following output of the --help option shows the usage:

$ python3 davbackup.py --help
usage: davbackup.py [-h] [--config FILE] [--destdir DIR] [--start RMT_DIR]

Download content from DAV server.

optional arguments:
  -h, --help            show this help message and exit
  --config FILE, -c FILE
                        Specify a config file other than the default.
  --destdir DIR, -d DIR
                        Specify destination directory.
  --start RMT_DIR, -s RMT_DIR
                        Download only the specified subtree.

Configuration file

A sample configuration file is provided with the name davbackup.json.sample. Rename and edit to suit your needs.

The configuration is a json file whose fields are self explanatory, except perhaps the nbackups field, explained below. Note that the password is base64 encoded. This makes it obscure, not secure, but the program is meant to be run on a trusted machine:

{
    "protocol": "https",
    "server": "nextcloud.samplesite.com",
    "username": "fred",
    "password": "YWJyYWNhZGFicmE=",
    "davstart": "/remote.php/dav/files/fred",
    "nbackups": 4
}

The field nbackups is the number of backups copy to keep. When the local directory exists already, it is presumed to contain a previous backup, and it is renamed with an extension .001, if a directory with a .001 extension exists, it is renamed to .002 and so on until the specified number of backups is reached. Directories that would have a higher number than the number of backups are simply deleted.

Installing

Use the provided setup.py utility to install:

$ python3 setup.py install

Or simply use pip to install from the the Pypi site:

$ pip install davbackup

Running

Once you have a valid configuration file as described above, just run:

$ davbackup --config <configfile> --destdir <localdir>

You can use the arguments described above.

Metadata

Release files for davbackup 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for davbackup 0.1.4
File Size Uploaded Provenance Actions
davbackup-0.1.4.tar.gz 6.0 kB Without provenance Details for davbackup-0.1.4.tar.gz

Release files / davbackup-0.1.4.tar.gz

Download URL davbackup-0.1.4.tar.gz
Size 6.0 kB
Tags Source
SHA-256 checksum
How to use checksums
cdb718db9af6d0dcc404755a51fce9e848cfe4e0cad7b1660e261aa2f187c441
BLAKE2b-256 checksum
How to use checksums
59ad028e9a1cb4a1b63e7fd17bf0ee3387e9e7e21a3aab7a194aadc8c4063e90
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.7

Security for davbackup 0.1.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page