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.8.tar.gz (10.6 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.8-py3-none-any.whl (20.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: resticpy-0.1.8.tar.gz
  • Upload date:
  • Size: 10.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/5.1.0 pkginfo/1.9.2 requests/2.28.1 requests-toolbelt/0.10.1 tqdm/4.64.1 CPython/3.7.13

File hashes

Hashes for resticpy-0.1.8.tar.gz
Algorithm Hash digest
SHA256 473fd29960465deb617b4fb13f94f1ec62dec6354ca1169d5023de0d6248b359
MD5 7b5da0f3a6a8fa861f2075a6d315de02
BLAKE2b-256 724050d8cc47b6547d128cd946035f2cfa7038b1b6d9131ffc7331918fed650c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: resticpy-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 20.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/5.1.0 pkginfo/1.9.2 requests/2.28.1 requests-toolbelt/0.10.1 tqdm/4.64.1 CPython/3.7.13

File hashes

Hashes for resticpy-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 1781826940141acc5c1011afe2d97aaf6c7539694088519f6326fc82674743d2
MD5 5b60f413c722e125040176ca3e5c6822
BLAKE2b-256 a65431b0ae941f6f46178f34291835a8968194b4e53001bf5eed48ecf10a42f1

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