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.15.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-1.0.1.tar.gz (11.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-1.0.1-py3-none-any.whl (22.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: resticpy-1.0.1.tar.gz
  • Upload date:
  • Size: 11.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/6.0.0 pkginfo/1.9.6 requests/2.28.2 requests-toolbelt/0.10.1 tqdm/4.64.1 CPython/3.7.13

File hashes

Hashes for resticpy-1.0.1.tar.gz
Algorithm Hash digest
SHA256 3597e20b5d1708516ef3796d6b77c1b25dfe6f6e6325ae0010e22aacad2fec69
MD5 9d66a8c90d459c72a4c7376e36356d73
BLAKE2b-256 d0a07edc7f9ad90c42b79637be8483275d7eb1ecdba7f6c53673b5b2bd63b79c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: resticpy-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 22.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/6.0.0 pkginfo/1.9.6 requests/2.28.2 requests-toolbelt/0.10.1 tqdm/4.64.1 CPython/3.7.13

File hashes

Hashes for resticpy-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 eaccb58ac6becab4f1e1cfedee0a4fe887b2afaa5c2111885407c6f3a8b136ba
MD5 e483921e277e3847d9e9fd20e7b76652
BLAKE2b-256 866b3456e46d1f1234308a9c5feb42efcc4bccd088fee01ac36bd4eca2cdc1c0

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