Restic backup Python wrapper
Project description
resticpy
Overview
Minimal Python wrapper around the restic backup command-line interface.
Installation
From pip
pip install resticpy
From source
git clone https://github.com/mtlynch/resticpy.git
cd resticpy
pip install .
Quick start
Create a password file
printf "mysecretpass" > password.txt
Initialize a repository and back up a file
import restic
restic.repository = '/tmp/backup1'
restic.password_file = 'password.txt'
restic.init()
restic.backup(paths=['some-file.txt'])
Restore a snapshot
import restic
restic.repository = '/tmp/backup1'
restic.password_file = 'password.txt'
restic.restore(snapshot_id='latest', target_dir='~/restored')
API Documentation
https://mtlynch.github.io/resticpy/
Example
I personally use this library for my backups. I've published my backup script at mtlynch/mtlynch-backup.
Compatibility
resticpy is tested against restic 0.17.1.
resticpy's scope and future
resticpy is maintained by Michael Lynch as a hobby project.
resticpy is not meant to achieve feature parity with restic. It is meant to cover a small subset of the most useful features of restic.
Due to time limitations, I keep resticpy's scope limited to only the features that fit into my workflows.
Feature requests
I don't fulfill feature requests for resticpy. You are welcome to file a feature request for a third-party contributor to take on.
Pull requests
I accept pull requests when they are:
- Documented
- Tested
- Small
I don't accept pull requests for features that look like they'll be a large maintenance burden.
Acknowledgments
This project is forked from jstzwj/PyRestic.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file resticpy-1.2.0.tar.gz
.
File metadata
- Download URL: resticpy-1.2.0.tar.gz
- Upload date:
- Size: 16.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4d316bc1c2e771ada3868be33f5fc9d1b2bfd1d1f29533c2bdf1cdd134508aa |
|
MD5 | f4c3b55433b688454c3cfe79e14f434c |
|
BLAKE2b-256 | 43a4a6918f0c4a80d68003c45688e5e6cbbb3841a0465ce7a6b2c4c0dfe066fa |
File details
Details for the file resticpy-1.2.0-py3-none-any.whl
.
File metadata
- Download URL: resticpy-1.2.0-py3-none-any.whl
- Upload date:
- Size: 26.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e53bf28efc60c59461b7e22d3576855c67ce6baca0a552bbd3373efabb4638a4 |
|
MD5 | d863579aec192d88702b00f41f55d1e2 |
|
BLAKE2b-256 | fdecf812f4411bb5cb107923ad9bf9654d256b02054bf111a7952a6a1797f85c |