Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
107
Merge Requests
107
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos
Commits
950194ca
Commit
950194ca
authored
Jun 11, 2014
by
Marco Mariani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
abilian: postgres backup with cron
parent
35e37753
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
60 additions
and
10 deletions
+60
-10
software/abilian/extranet_spr/instance-postgres.cfg.in
software/abilian/extranet_spr/instance-postgres.cfg.in
+24
-0
software/abilian/extranet_spr/instance-redis.cfg.in
software/abilian/extranet_spr/instance-redis.cfg.in
+1
-1
software/abilian/extranet_spr/instance.cfg.in
software/abilian/extranet_spr/instance.cfg.in
+30
-6
software/abilian/extranet_spr/software.cfg
software/abilian/extranet_spr/software.cfg
+5
-3
No files found.
software/abilian/extranet_spr/instance-postgres.cfg.in
View file @
950194ca
...
...
@@ -2,6 +2,8 @@
parts =
postgres-instance
postgres-promise
postgres-backup
cron-postgres-backup
# Define egg directories to be the one from Software Release
...
...
@@ -100,3 +102,25 @@ url = $${slap-connection:server-url}
key = $${slap-connection:key-file}
cert = $${slap-connection:cert-file}
[postgres-backup]
recipe = slapos.recipe.template:jinja2
template = inline:
#!/bin/bash
. {{environment}}
{{postgres_bin}}/pg_dumpall --clean --file=$${directories:backup}/dumpall
echo "backup done"
rendered = $${directories:bin}/postgres-backup
mode = 700
context =
raw environment $${buildout:directory}/environment.sh
raw postgres_bin $${postgres-instance:bin}
[cron-postgres-backup]
<= cron
recipe = slapos.cookbook:cron.d
name = postgres-backup
frequency = 0 3 * * *
command = $${postgres-backup:rendered}
software/abilian/extranet_spr/instance-redis.cfg.in
View file @
950194ca
...
...
@@ -21,7 +21,7 @@ server_dir = $${directories:srv}
requirepass = $${redis-requirepass:passwd}
config_file = $${directories:etc}/redis.conf
log_file = $${directories:log}/redis.log
wrapper = $${directories:services}/redis
_
server
wrapper = $${directories:services}/redis
-
server
promise_wrapper = $${directories:promises}/redis
promise_requirepass_file = $${redis-requirepass:storage-path}
...
...
software/abilian/extranet_spr/instance.cfg.in
View file @
950194ca
...
...
@@ -24,6 +24,9 @@ parts =
request-web-frontend
publish-connection-parameters
redis
cron
postgres-backup
cron-postgres-backup
...
...
@@ -65,20 +68,41 @@ mode = 0644
recipe = slapos.cookbook:mkdirectory
bin = $${buildout:directory}/bin
etc = $${buildout:directory}/etc
run = $${directories:var}/run
scripts = $${directories:etc}/run
cron-entries = $${:etc}/cron.d
crontabs = $${:etc}/crontabs
cronstamps = $${:etc}/cronstamps
run = $${:var}/run
scripts = $${:etc}/run
srv = $${buildout:directory}/srv
services = $${
directories
:etc}/service
promises = $${
directories
:etc}/promise
services = $${:etc}/service
promises = $${:etc}/promise
var = $${buildout:directory}/var
backup = $${:var}/backup
extranet_spr-instance = $${:var}/extranet_spr-instance
cache = $${:extranet_spr-instance}/cache
data = $${:extranet_spr-instance}/data
log = $${
directories
:var}/log
tmp = $${
directories
:var}/tmp
log = $${:var}/log
tmp = $${:var}/tmp
whoosh = $${:data}/whoosh
[cron-simplelogger]
recipe = slapos.cookbook:simplelogger
wrapper = $${directories:bin}/cron_simplelogger
log = $${directories:log}/cron.log
[cron]
recipe = slapos.cookbook:cron
dcrond-binary = ${dcron:location}/sbin/crond
cron-entries = $${directories:cron-entries}
crontabs = $${directories:crontabs}
cronstamps = $${directories:cronstamps}
catcher = $${cron-simplelogger:wrapper}
binary = $${directories:services}/crond
[request-web-frontend]
<= slap-connection
recipe = slapos.cookbook:requestoptional
...
...
software/abilian/extranet_spr/software.cfg
View file @
950194ca
...
...
@@ -10,6 +10,7 @@ extends =
../../../component/redis/buildout.cfg
../../../component/unoconv/buildout.cfg
../../../component/nginx/buildout.cfg
../../../component/dcron/buildout.cfg
../../../component/cups/buildout.cfg
../../../component/dbus/buildout.cfg
...
...
@@ -36,6 +37,7 @@ parts =
abilian-core-repository-check
slapos-cookbook-repository-check
dcron
postgresql91
freetype
cairo
...
...
@@ -226,21 +228,21 @@ configure-command =
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg.in
output = ${buildout:directory}/instance.cfg
md5sum =
963b22f55ba677441603e270ea973ed3
md5sum =
1bdd81a7c22a3cd1a28b8c1b06837b96
mode = 0644
[instance-postgres]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-postgres.cfg.in
output = ${buildout:directory}/instance-postgres.cfg
md5sum =
e47ce979db2f12ac2b30814dd20f63f5
md5sum =
a8fee23bcada451f94ee70d89c4b94c4
mode = 0644
[instance-redis]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-redis.cfg.in
output = ${buildout:directory}/instance-redis.cfg
md5sum =
cb8dfefa0776de51449ada06c16c38b9
md5sum =
e0f32e25d059ec67dfccd132cbb6095e
mode = 0644
[instance-extranet]
...
...
Write
Preview
Markdown
is supported
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