Minimal Python wrapper around the restic backup command-line interface.
pip install resticpy
git clone https://github.com/mtlynch/resticpy.git
cd resticpy
pip install .
printf "mysecretpass" > password.txt
import restic
restic.repository = '/tmp/backup1'
restic.password_file = 'password.txt'
restic.init()
restic.backup(paths=['some-file.txt'])
import restic
restic.repository = '/tmp/backup1'
restic.password_file = 'password.txt'
restic.restore(snapshot_id='latest', target_dir='~/restored')
https://mtlynch.github.io/resticpy/
I personally use this library for my backups. I've published my backup script at mtlynch/mtlynch-backup.
resticpy is tested against restic 0.12.0.
This project is forked from jstzwj/PyRestic.