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.16.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.3.tar.gz (12.3 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.3-py3-none-any.whl (24.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: resticpy-1.0.3.tar.gz
  • Upload date:
  • Size: 12.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/6.7.0 pkginfo/1.9.6 requests/2.31.0 requests-toolbelt/1.0.0 tqdm/4.66.1 CPython/3.7.13

File hashes

Hashes for resticpy-1.0.3.tar.gz
Algorithm Hash digest
SHA256 8b6fc0ae07d4dcc63c2c7c1f6d16d4b133baac46e4af22220fee4809cb1768ed
MD5 b3fd6331884dac702a8effb68273214e
BLAKE2b-256 ce8c75737c8b17008283964ae7cbb82a2cd0edc684769c118918dbdd141b9468

See more details on using hashes here.

File details

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

File metadata

  • Download URL: resticpy-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 24.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/6.7.0 pkginfo/1.9.6 requests/2.31.0 requests-toolbelt/1.0.0 tqdm/4.66.1 CPython/3.7.13

File hashes

Hashes for resticpy-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 9737e8190b7313aefaf51cb9fb4fea7c23597c3fbaa53a2544fe94c556af622b
MD5 2c893f812d29202000b1f59dbb375c69
BLAKE2b-256 3d66591db70395cd435cee90377d4f52a3b10bc14ec6ceb314d67ad2fe65f7e3

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