Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
databases
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
infra
ansible-shared
databases
Commits
cb48e84a
Verified
Commit
cb48e84a
authored
5 years ago
by
Robin Sonnabend
Browse files
Options
Downloads
Patches
Plain Diff
Move postgres rsnapshot conf to /etc/rsnapshot.d
parent
a8eedf8e
Branches
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#1916
failed
5 years ago
Stage: test
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
postgres/tasks/main.yml
+11
-13
11 additions, 13 deletions
postgres/tasks/main.yml
postgres/templates/crontab.j2
+5
-5
5 additions, 5 deletions
postgres/templates/crontab.j2
with
16 additions
and
18 deletions
postgres/tasks/main.yml
+
11
−
13
View file @
cb48e84a
...
@@ -8,25 +8,19 @@
...
@@ -8,25 +8,19 @@
-
python3-psycopg2
-
python3-psycopg2
-
libpq-dev
-
libpq-dev
state
:
present
state
:
present
tags
:
-
postgres
-
name
:
ensure postgres is started
-
name
:
ensure postgres is started
service
:
service
:
name
:
postgresql
name
:
postgresql
state
:
started
state
:
started
enabled
:
true
enabled
:
true
tags
:
-
postgres
-
name
:
ensure we have rsnapshot
-
name
:
ensure we have rsnapshot
apt
:
apt
:
name
:
rsnapshot
name
:
rsnapshot
state
:
present
state
:
present
tags
:
tags
:
-
postgres
-
rsnapshot
-
rsnapshot
-
backup
-
name
:
ensure we have our postgres backup script
-
name
:
ensure we have our postgres backup script
copy
:
copy
:
...
@@ -36,21 +30,27 @@
...
@@ -36,21 +30,27 @@
group
:
root
group
:
root
mode
:
'
0755'
mode
:
'
0755'
tags
:
tags
:
-
postgres
-
rsnapshot
-
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
-
name
:
ensure we have our rsnapshot config
template
:
template
:
src
:
rsnapshot.conf.j2
src
:
rsnapshot.conf.j2
dest
:
/etc/rsnapshot.conf
dest
:
/etc/rsnapshot.
d/postgres.
conf
owner
:
root
owner
:
root
group
:
root
group
:
root
mode
:
'
0644'
mode
:
'
0644'
tags
:
tags
:
-
postgres
-
rsnapshot
-
rsnapshot
-
backup
-
name
:
ensure rsnapshot is running regularly
-
name
:
ensure rsnapshot is running regularly
template
:
template
:
...
@@ -60,6 +60,4 @@
...
@@ -60,6 +60,4 @@
group
:
root
group
:
root
mode
:
'
0644'
mode
:
'
0644'
tags
:
tags
:
-
postgres
-
rsnapshot
-
rsnapshot
-
backup
This diff is collapsed.
Click to expand it.
postgres/templates/crontab.j2
+
5
−
5
View file @
cb48e84a
{% if postgres_enable_frequently %}
{% 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 %}
{% endif %}
3 * * * * root /usr/bin/rsnapshot hourly
3 * * * * root /usr/bin/rsnapshot
-c /etc/rsnapshot.d/postgres.conf
hourly
51 23 * * * root /usr/bin/rsnapshot daily
51 23 * * * root /usr/bin/rsnapshot
-c /etc/rsnapshot.d/postgres.conf
daily
41 23 * * 6 root /usr/bin/rsnapshot weekly
41 23 * * 6 root /usr/bin/rsnapshot
-c /etc/rsnapshot.d/postgres.conf
weekly
31 23 2 * * root /usr/bin/rsnapshot monthly
31 23 2 * * root /usr/bin/rsnapshot
-c /etc/rsnapshot.d/postgres.conf
monthly
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment