Skip to main content

Restic Airflow

PyPI version PyPI - Python Version PyPI - Downloads License Build Status

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 repository
  • ResticBackupOperator: Create backups with configurable tags and paths
  • ResticForgetAndPruneOperator: Manage backup retention and cleanup
  • ResticCheckOperator: Verify repository integrity
  • ResticUnlockOperator: Remove stale repository locks
  • ResticPruneOperator: Clean up unused data
  • ResticRepositoryExistsOperator: 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 password
  • AWS_ACCESS_KEY_ID: For S3 repositories
  • AWS_SECRET_ACCESS_KEY: For S3 repositories
  • ALERT_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)

Source distribution for restic-airflow 0.1.3
File Size Uploaded Provenance Actions
restic_airflow-0.1.3.tar.gz 8.7 kB With provenance Details for restic_airflow-0.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for restic-airflow 0.1.3
File Interpreter ABI Platform Actions
restic_airflow-0.1.3-py3-none-any.whl Python 3 none any Details for restic_airflow-0.1.3-py3-none-any.whl

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 log

Release 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

Security for restic-airflow 0.1.3

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for restic_airflow-0.1.3.tar.gz

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

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page