mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2024-12-26 12:05:09 +01:00
Optimized backup scripts
This commit is contained in:
parent
c309284737
commit
920d94d69c
@ -2,7 +2,8 @@
|
||||
Description=starts backups-cleanup.service
|
||||
|
||||
[Timer]
|
||||
OnCalendar=19:00
|
||||
OnBootSec=1min
|
||||
OnUnitActiveSec=12h
|
||||
RandomizedDelaySec=1h
|
||||
|
||||
[Install]
|
||||
|
@ -1,15 +1,21 @@
|
||||
- name: "create {{docker_pull_primary_backups_folder}}"
|
||||
file:
|
||||
path: "{{docker_pull_primary_backups_folder}}"
|
||||
state: directory
|
||||
mode: 0755
|
||||
|
||||
- name: create pull-remote-backup.sh
|
||||
copy:
|
||||
src: pull-remote-backup.sh
|
||||
dest: "bash {{docker_pull_primary_backups_folder}}pull-remote-backup.sh"
|
||||
dest: "{{docker_pull_primary_backups_folder}}pull-remote-backup.sh"
|
||||
|
||||
- name: create pull-remote-backups.service
|
||||
template: src=pull-remote-backups.service.j2 dest=/etc/systemd/system/pull-remote-backups.service
|
||||
notify: restart pull-remote-backups serviceß
|
||||
notify: restart pull-remote-backups service
|
||||
|
||||
- name: create pull-remote-backups.timer
|
||||
template: src=pull-remote-backups.timer.j2 dest=/etc/systemd/system/pull-remote-backups.timer
|
||||
notify: restart pull-remote-backups timer
|
||||
|
||||
- name: create pull-remote-backups.sh
|
||||
template: src=pull-remote-backups.sh.j2 dest=bash {{docker_pull_primary_backups_folder}}pull-remote-backups.sh
|
||||
template: src=pull-remote-backups.sh.j2 dest={{docker_pull_primary_backups_folder}}pull-remote-backups.sh
|
||||
|
@ -1 +1 @@
|
||||
docker_pull_primary_backups_folder: "/usr/local/bin/pull-primary-backups/"
|
||||
docker_pull_primary_backups_folder: "/home/administrator/scripts/pull-primary-backups/"
|
Loading…
Reference in New Issue
Block a user