Restic Airflow
Introduction
This repository provides Apache Airflow operators for managing Restic backups. It allows you to integrate Restic backup operations into your Airflow DAGs using Docker-based operators.
Features
- Docker-based Restic operators for Airflow
- Support for S3 and local repositories
- Built-in notification system for task/DAG success and failure
- Configurable backup retention policies
- Repository health checking capabilities
Available Operators
ResticInitOperator: Initialize a new Restic repositoryResticBackupOperator: Create backups with configurable tags and pathsResticForgetAndPruneOperator: Manage backup retention and cleanupResticCheckOperator: Verify repository integrityResticUnlockOperator: Remove stale repository locksResticPruneOperator: Clean up unused dataResticRepositoryExistsOperator: Check if a repository exists
Usage Example
from airflow import DAG
from restic_airflow.operators.restic import ResticBackupOperator
with DAG('backup_dag', ...) as dag:
backup_task = ResticBackupOperator(
task_id='backup_data',
repository='/path/to/repo',
backup_from_path='/data/to/backup',
cache_directory='/tmp/restic-cache',
tags=['daily'],
password='your-repository-password',
hostname='backup-host'
)
See sample.py for a complete DAG example including initialization, backup, health checks, and retention management.
Environment Variables
The operators support configuration through environment variables:
RESTIC_PASSWORD: Repository passwordAWS_ACCESS_KEY_ID: For S3 repositoriesAWS_SECRET_ACCESS_KEY: For S3 repositoriesALERT_EMAIL: Email address for notifications
Notifications
The package includes a notification system that can send emails on:
- DAG success/failure
- Individual task success/failure
License
This project is released into the public domain under the Unlicense.
Metadata
Release files for restic-airflow 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| restic_airflow-0.1.3.tar.gz | 8.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| restic_airflow-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.5 kB
Release files / restic_airflow-0.1.3.tar.gz
| Download URL | restic_airflow-0.1.3.tar.gz |
|---|---|
| Size | 8.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
22089079089848c1f40ad8a8c04bf91a7f944e2fa4573c3b9cbc83cd1b4ff4f7
|
|
BLAKE2b-256 checksum How to use checksums |
2179ee089611f4bfea97c9dfa9471f9cf0602cb58372d245766a866d77660a52
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 11, 2025.
Transparency logRelease files / restic_airflow-0.1.3-py3-none-any.whl
| Download URL | restic_airflow-0.1.3-py3-none-any.whl |
|---|---|
| Size | 6.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8761383d86664c9d796239f01981bd28bf2ce96f9a7dfb70046cd21fbc5c3308
|
|
BLAKE2b-256 checksum How to use checksums |
3a45cca7dbd69612854eb79ec86ba1aec45d700b053ff7451383dc4fa671de68
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 11, 2025.
Transparency log