backutil
Python Backup Utility
Description:
backutil is a wrapper for the python tarfile library. As tarfile is a standard Python library, using backutil will provide a cross-platform and simple backup utility.
Installation:
Install using pip:
sudo pip3 install backutil
Usage:
❯ backutil --help
usage: backutil [-h] [--path PATH [PATH ...]] [-o OUTFILE] [--webdav URL]
[--remote REMOTE PATH] [--encrypt RECIPIENT] [-z] [--rm] [-v]
[-q] [-i] [-V]
Python backup utility
optional arguments:
-h, --help show this help message and exit
--path PATH [PATH ...]
path(s) to backup
-o OUTFILE, --outfile OUTFILE
output file of backup
--webdav URL WebDav URL to upload to
--remote REMOTE PATH Remote WebDav path to upload to
--encrypt RECIPIENT Use gpg to encrypt file
-z, --zip use gzip to compress the backup file
--rm remove local backup file
-v, --verbose enable verbose output
-q, --quiet suppress output
-i, --insecure ignore SSL certificate warnings
-V, --version print version of backutil
Example commands:
Backup two files to a .tar archive:
❯ backutil --path tmp.txt tmp2.txt --outfile ~/Documents/file.tar
Backup and compress to .tar.gz archive:
❯ backutil --path tmp.txt tmp2.txt --outfile ~/Documents/file.tar.gz -z
Backup to a .tar archive verbosely:
❯ backutil --path tmp.txt tmp2.txt --outfile ~/Documents/file.tar -v
Backup and compress to a .tar.gz archive, supressing output:
❯ backutil --path tmp.txt tmp2.txt --outfile ~/Documents/file.tar.gz -z -q
Backup file, zip it and upload to Nextcloud Webdav as file.tar.gz in the Nextcloud user's root directory:
❯ backutil --path tmp.txt tmp2.txt --outfile ~/file.tar.gz --webdav 'https://cloud.example.com:8080/' --remote file.tar.gz -z
Backup files, zip them and upload the archive to Nextcloud Webdav as file.tar.gz in the Nextcloud user's root directory, then remove the local archive:
❯ backutil --path tmp.txt tmp2.txt --outfile ~/file.tar.gz --webdav 'https://cloud.example.com:8080/' --remote file.tar.gz -z --rm
Configuration:
Backutil supports a configuration file storing details, which enables non-interactive usage of backups (in case you'd like to run backutil as a cron job or something similar).
Place the file in your home directory as .backutil.conf. Currently this is the configuration you can use:
[WEBDAV]
Username = username
Password = mysupersecretpassword
#Command = command_to_print_password
I would recommend not storing your password in plaintext and use gpg, pass or some other secure way to print your password from the command line without storing it unencrypted. That is why the 'Command' directive is supported in the configuration.
Additional Information:
Currently WebDav functionality has only been tested on an instance of Nextcloud.
Metadata
Release files for backutil 0.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| backutil-0.1.6.tar.gz | 4.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| backutil-0.1.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.6 kB
Release files / backutil-0.1.6.tar.gz
| Download URL | backutil-0.1.6.tar.gz |
|---|---|
| Size | 4.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6b8ce99c51170c3d176468b00e0e9227282b985e77f603b55fb6f51235995408
|
|
BLAKE2b-256 checksum How to use checksums |
0c1fd033ea901306a3227aad368c76fbbab32944ad81bd3e26f92b61475fb259
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3
|
Release files / backutil-0.1.6-py3-none-any.whl
| Download URL | backutil-0.1.6-py3-none-any.whl |
|---|---|
| Size | 8.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ab1dfcd3ccd86ac426b3de6385968e02c4e9dad064b284514ba215bfa77cedca
|
|
BLAKE2b-256 checksum How to use checksums |
fa2d47b8b0737c3f28cf860f7406810e73796cc9266a5e05567bc33de0023359
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3
|
Security for backutil 0.1.6
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.