Skip to main content

Restic backup Python wrapper

Project description

resticpy

PyPI CircleCI Coverage Status License

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

resticpy-1.2.1.tar.gz (16.2 kB view details)

Uploaded Source

Built Distribution

resticpy-1.2.1-py3-none-any.whl (26.3 kB view details)

Uploaded Python 3

File details

Details for the file resticpy-1.2.1.tar.gz.

File metadata

  • Download URL: resticpy-1.2.1.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

Hashes for resticpy-1.2.1.tar.gz
Algorithm Hash digest
SHA256 e0cee238044235d178c50ef06ad577dfc9b7037a434686c69ae5ce09b08de039
MD5 214d07125774e744dba56af7b8016e83
BLAKE2b-256 c9fd80083fcd311f4c1c574c13fc9318e8b60423eee1728a2a1c12727da2607a

See more details on using hashes here.

File details

Details for the file resticpy-1.2.1-py3-none-any.whl.

File metadata

  • Download URL: resticpy-1.2.1-py3-none-any.whl
  • Upload date:
  • Size: 26.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.1

File hashes

Hashes for resticpy-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 06676bf88a06b4bc068055c74a0135a93b782c015c5a57ced4b2bc60837fdb06
MD5 e1d92631b917301c76e543424adcef36
BLAKE2b-256 6024ab14faa6a0255cce466c00cc093f28e48021da81ee4bc51cc78c3feda8de

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page