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.5.tar.gz (9.2 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.5-py3-none-any.whl (17.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for resticpy-0.1.5.tar.gz
Algorithm Hash digest
SHA256 4df26bb6f8fab527b26be78e74abd55b2820f394e0c237d9e3723fe24c2b3b53
MD5 62824dc1bb8c19d8fa44e100e18b9dea
BLAKE2b-256 605ca6d652f75f64650564db80a195335078550636a6cfd6bbd3f6eb65a6948c

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for resticpy-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 6c6ac4e957942f57083a86c6a357cc432247bb88e8e29e67c939d444c28b3823
MD5 bcd30b4ff5c1a8a3fa42295f1b53eff4
BLAKE2b-256 7aa2c8ac985a9cce78656674ec26358a3758cc4c71d42444d4694e74643ac217

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