Skip to main content

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

resticpy's scope and future

resticpy is maintained by Michael Lynch as a hobby project.

resticpy is not meant to achieve feature parity with restic. It is meant to cover a small subset of the most useful features of restic.

Due to time limitations, I keep resticpy's scope limited to only the features that fit into my workflows.

Feature requests

I don't fulfill feature requests for resticpy. You are welcome to file a feature request for a third-party contributor to take on.

Pull requests

I accept pull requests when they are:

  • Documented
  • Tested
  • Small

I don't accept pull requests for features that look like they'll be a large maintenance burden.

Acknowledgments

This project is forked from jstzwj/PyRestic.

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.3.0.tar.gz (16.8 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.3.0-py3-none-any.whl (26.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: resticpy-1.3.0.tar.gz
  • Upload date:
  • Size: 16.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.1

File hashes

Hashes for resticpy-1.3.0.tar.gz
Algorithm Hash digest
SHA256 b63eb3b45e45386b2a1d21519550cbc3ebcf36b2a0420db7fbd3055b1fb5464b
MD5 ffffc569cf5460986f91d407dc13a284
BLAKE2b-256 b369cb549be36e32ac82315d983da61d5de3b41a3c63c123f7e39448df40c4fe

See more details on using hashes here.

File details

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

File metadata

  • Download URL: resticpy-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 26.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.1

File hashes

Hashes for resticpy-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 81c114dfa1547a0285dfd7c9d4290f025d4d4762900b00286af469729d12cf57
MD5 59159bd343eed7e8157059daa09880f2
BLAKE2b-256 3d8c8e81026ca917e30439150c6508b0a8e2c4560d532aad97d0e8eab6bb4ef4

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.3.0 This release

2 files

1.2.2

2 files

1.2.1

2 files

1.2.0

2 files

1.1.1

2 files

1.1.0

2 files

1.0.6

2 files

1.0.5

2 files

1.0.4

2 files

1.0.3

2 files

1.0.2

2 files

1.0.1

2 files

0.1.8

2 files

0.1.7

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Supported by

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