Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
infra
ansible-shared
databases
Commits
cb48e84a
Verified
Commit
cb48e84a
authored
Mar 09, 2020
by
Robin Sonnabend
Browse files
Move postgres rsnapshot conf to /etc/rsnapshot.d
parent
a8eedf8e
Pipeline
#1916
failed with stage
in 30 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
postgres/tasks/main.yml
View file @
cb48e84a
...
...
@@ -8,25 +8,19 @@
-
python3-psycopg2
-
libpq-dev
state
:
present
tags
:
-
postgres
-
name
:
ensure postgres is started
service
:
name
:
postgresql
state
:
started
enabled
:
true
tags
:
-
postgres
-
name
:
ensure we have rsnapshot
apt
:
name
:
rsnapshot
state
:
present
tags
:
-
postgres
-
rsnapshot
-
backup
-
name
:
ensure we have our postgres backup script
copy
:
...
...
@@ -36,21 +30,27 @@
group
:
root
mode
:
'
0755'
tags
:
-
postgres
-
rsnapshot
-
backup
-
name
:
ensure we have a directory for rsnapshot configuration
file
:
path
:
/etc/rsnapshot.d
state
:
directory
owner
:
root
group
:
root
mode
:
'
0755'
tags
:
-
rsnapshot
-
name
:
ensure we have our rsnapshot config
template
:
src
:
rsnapshot.conf.j2
dest
:
/etc/rsnapshot.conf
dest
:
/etc/rsnapshot.
d/postgres.
conf
owner
:
root
group
:
root
mode
:
'
0644'
tags
:
-
postgres
-
rsnapshot
-
backup
-
name
:
ensure rsnapshot is running regularly
template
:
...
...
@@ -60,6 +60,4 @@
group
:
root
mode
:
'
0644'
tags
:
-
postgres
-
rsnapshot
-
backup
postgres/templates/crontab.j2
View file @
cb48e84a
{% if postgres_enable_frequently %}
5,20,35,50 * * * * root /usr/bin/rsnapshot frequently
5,20,35,50 * * * * root /usr/bin/rsnapshot
-c /etc/rsnapshot.d/postgres.conf
frequently
{% endif %}
3 * * * * root /usr/bin/rsnapshot hourly
51 23 * * * root /usr/bin/rsnapshot daily
41 23 * * 6 root /usr/bin/rsnapshot weekly
31 23 2 * * root /usr/bin/rsnapshot monthly
3 * * * * root /usr/bin/rsnapshot
-c /etc/rsnapshot.d/postgres.conf
hourly
51 23 * * * root /usr/bin/rsnapshot
-c /etc/rsnapshot.d/postgres.conf
daily
41 23 * * 6 root /usr/bin/rsnapshot
-c /etc/rsnapshot.d/postgres.conf
weekly
31 23 2 * * root /usr/bin/rsnapshot
-c /etc/rsnapshot.d/postgres.conf
monthly
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment