Ansible Restic

Deploy restic backup program
Alternatives To Ansible Restic
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Raigad34112 years ago3June 18, 20158apache-2.0Java
Co-Process for backup/recovery, Auto Deployments and Centralized Configuration management for ElasticSearch
Git S3 Push202
2 years ago5November 02, 20216mitGo
Deploy your git repo to an S3 bucket
Flask Live Starter114
6 years agoapache-2.0Python
Fabric tasks to provision infrastructure and deploy Flask web applications
Percona Openshift55
a year ago4apache-2.0Shell
Set of scripts to run Percona software in OpenShift / Kubernetes
Sitecore Powercore51
8 years ago1mitPowerShell
Helper cmdlets which can be used to create simple Sitecore website deployment script in something like 50 lines of code.
Akk Stack39
5 months ago4gpl-3.0Makefile
Containerized EverQuest Emulator Server Environment
Backup Container29
5 months ago24apache-2.0Shell
A simple container for a simple backup strategy.
Ansible Restic28
5 years ago4bsd-2-clausePython
Deploy restic backup program
Nextcloud Openshift24
4 years agomitShell
OpenShift Template for Nextcloud
Diaspora Openshift22
8 years ago4otherRuby
Diaspora modified for easy deployment on OpenShift
Alternatives To Ansible Restic
Select To Compare


Alternative Project Comparisons
Readme

Restic

Deploys restic binary and cron jobs to trigger restic commands

Requirements

None

Role Variables

restic_version: '0.9.2'
restic_url: ''

restic_download_path: '/opt/restic'
restic_install_path: '/usr/local/bin'

restic_jobs: []
restic_jobs_raw: []
restic_repos:
  - name: example
    url: '/backup'
    password: 'foo'
    init: True

Example configuration

# format:
# at: 'h m  dom mon dow'
# type: < 'db_mysql' | 'db_pgsql' >
restic_jobs:
  - at: '0 6  * * *'
    type: 'db_mysql'
    arg: 'blog'
  - at: '0 8  * * *'
    type: 'db_pgsql'
    arg: 'users'
    tags:
      - postgres
      - database
restic_jobs_raw:
  - command: 'restic backup /var'
    at: '0 4  * * *'
  - command: 'restic backup /home'
    at: '0 3  * * *'
    user: 'restic'
  # always keep last backup, keep daily backups for a week, weekly backups
  # for a month, as well as six monthly backups.
  - command: 'restic forget --keep-last 1 --keep-daily 7 --keep-weekly 4 --keep-monthly 6 --prune'
    at: '30 22 * * 5' # every friday 22:30
    user: 'restic'

Which produces /etc/cron.d/restic-example file with the following content:

# restic backup jobs
# vi: ft=jinja.crontab

SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
AWS_ACCESS_KEY_ID="ACCESS_KEY"
AWS_SECRET_ACCESS_KEY="SECRET_KEY"
RESTIC_REPOSITORY="/backup"
RESTIC_PASSWORD="foo"

0 6  * * *  root   mysqldump --routines --add-drop-table --default-character-set=utf8 blog | restic backup --stdin --stdin-filename db_mysql_blog.sql
0 8  * * *  root   su -c '/usr/bin/pg_dump --encoding=UTF8 "users"' postgres  | restic backup --stdin --stdin-filename db_pgsql_users.sql --tag postgres --tag database

0 4  * * *  root  restic backup /var
0 3  * * *  restic  restic backup /home
30 22 * * 5 restic  restic forget --keep-last 1 --keep-daily 7 --keep-weekly 4 --keep-monthly 6 --prune

Dependencies

None

Usage

Please, see tests/test.yml for an example

License

BSD

Popular Backup Projects
Popular Deployment Projects
Popular Data Storage Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Python
Deploy
Ansible
Role
Backup
Cron
Ansible Playbook