Giter VIP home page Giter VIP logo

puppet-restic's Introduction

Overview

This module manages Restic repositories via Puppet with systemd service and timer units. See: https://restic.net/

!!! This module has only been tested on Ubuntu 20.04 !!!

Features

  • Backup
  • Forget
  • Restore

Module Description

By default $enable_backup is true. By default $enable_forget and $enable_restore are false.

For each repository you enable a systemd service will be installed. To trigger the service automatically you have to set a systemd timer value ($backup_timer, $forget_timer, $restore_timer).

By default no timer is set.

If you don't enable any feature the Restic repository will only be initialized.

Usage

Initialize Restic repository only on an S3 Bucket

---
classes:
  - restic

restic::repositories:
  some_repo1:
    enable_backup: false
    id: a3f5173hdsks934
    key: y7ahajhsd3uzasa
    password: yxcvasdf1234
    host: some.host.name
    bucket: bucket_name/backup1

Add a simple backup

Configure a repository and backup 2 directories

---
classes:
  - restic

restic::repositories:
  some_repo2:
    backup_path:
      - /full/path/1
      - /some/other/path
    backup_timer: Mon..Sun 20:00:00
    bucket: bucket_name/backup1
    host: some.host.name
    id: a3f5173hdsks934
    key: y7ahajhsd3uzasa
    password: yxcvasdf1234

Add cleanup via the forget service

restic::repositories:
  some_repo2:
    ...
    enable_forget: true
    forget_timer: Mon..Sun 23:00:00

Add two backups on the same S3 Bucket

---
classes:
  - restic

restic::id: a3f5173hdsks934
restic::key: y7ahajhsd3uzasa
restic::host: some.host.name
restic::repositories:
  some_repo3:
    backup_path:
      - /full/path/1
      - /some/other/path
    bucket: bucket_name/backup1
    password: yxcvasdf1234
  some_repo4:
    backup_path: /other/path
    bucket: bucket_name/backup2
    password: yxcvasd3456f1234

Add two backups on the different S3 Buckets with different access data on the same host

---
classes:
  - restic

restic::host: some.host.name
restic::repositories:
  some_repo1:
    backup_path:
      - /full/path/1
      - /some/other/path
    bucket: bucket_name1/backup1
    id: a3f5173hdsks934
    key: y7ahajhsd3uzasa
    password: yxcvasdf1234
  some_repo2:
    backup_path: /other/path
    bucket: bucket_name2/backup2
    id: y7ahajhsd3uzasa
    key: a3f5173hdsks934
    password: yxcvasd3456f1234

Add two restore only job from the same S3 Repository

---
classes:
  - restic

restic::enable_backup: false
restic::enable_restore: true
restic::id: a3f5173hdsks934
restic::key: y7ahajhsd3uzasa
restic::host: some.host.name
restic::repositories:
  some_repo3:
    restore_path: /full/path/restore
    bucket: bucket_name/backup1
    password: yxcvasdf1234
  some_repo4:
    backup_path: /other/path
    bucket: bucket_name/backup2
    password: yxcvasd3456f1234

Other exmaples

Can be found in EXAMPLES.

Development

If you'd like to contribute, please see CONTRIBUTING.

puppet-restic's People

Contributors

crazymind1337 avatar baurmatt avatar aro-lew avatar saschadoering avatar swantzter avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.