https://github.com/savoirfairelinux/ansible-backup-cron
https://github.com/savoirfairelinux/ansible-backup-cron
ansible ansible-role backup
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/savoirfairelinux/ansible-backup-cron
- Owner: savoirfairelinux
- License: gpl-3.0
- Created: 2016-05-05T02:02:43.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2025-04-14T18:54:38.000Z (7 months ago)
- Last Synced: 2025-05-16T06:36:06.276Z (6 months ago)
- Topics: ansible, ansible-role, backup
- Language: Shell
- Size: 31.3 KB
- Stars: 1
- Watchers: 8
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: COPYING
Awesome Lists containing this project
README
# backup-cron
Sets up a project for regular database/folder backups to a specified backup storage script (
probably [zbackup][ansible-zbackup]).
This role also sets up a restore script.
It also sets up a cron job to do call our backup script regularly. Of course, restoration is
expected to be triggered manually, so we don't set up any cron for it.
## Requirements
* Ansible 2.0+
* Debian Jessie deployment target
* A backup storage script that takes a tar file as stdin and properly backs it up
* A backup storage script spits its latest tar file to stdout
* Optionally, a script that dumps/restore a DB SQL file
## Usage
```
role: backup_cron
backup_cron_user: project_user
backup_cron_backup_script_path: /path/to/script_that_launches_the_backup
backup_cron_restore_script_path: /path/to/script_that_restores_backup_contents
backup_cron_storage_dump_script_path: /path/to/zbackup_dump_script
backup_cron_storage_restore_script_path: /path/to/zbackup_getlatest_script
backup_cron_dbdump_script: /path/to/script_that_dumps_sql
backup_cron_dbrestore_script: /path/to/script_that_restores_sql
backup_cron_folders:
- /path/to/foder_to_backup
- /and/another
backup_cron_enable_cron: yes
backup_cron_cron_args:
hour: 1
```
[ansible-zbackup]: https://github.com/savoirfairelinux/ansible-zbackup