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.12.0.

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-0.1.7.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

resticpy-0.1.7-py3-none-any.whl (18.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: resticpy-0.1.7.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/5.0.0 pkginfo/1.8.3 requests/2.28.1 requests-toolbelt/0.10.0 tqdm/4.64.1 CPython/3.7.13

File hashes

Hashes for resticpy-0.1.7.tar.gz
Algorithm Hash digest
SHA256 a892d0548d9c7d8c0a34eefd5a29ddfd8fb870073b89d5f33e584de188d6200e
MD5 7edb92c64166d9d544ff173749a5a64d
BLAKE2b-256 f022e19b4747365304e55c90774f9158540d26b90dbbd1bf3560577583c043e6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: resticpy-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 18.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/5.0.0 pkginfo/1.8.3 requests/2.28.1 requests-toolbelt/0.10.0 tqdm/4.64.1 CPython/3.7.13

File hashes

Hashes for resticpy-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 87e784b62882f16de7cd7cb8630b2c11e53b5a62a486b2171b3bb6bc91f69edf
MD5 1a8c6f5f4a899f23a070fc48af18f558
BLAKE2b-256 bb2a0decc187243c8f4486cbc164078ee58b69e44536fce1144fa18b119dae7c

See more details on using hashes here.

Supported by

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