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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gwenaël Samain
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
Hide 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 @@
...
@@ -2,6 +2,8 @@
parts =
parts =
postgres-instance
postgres-instance
postgres-promise
postgres-promise
postgres-backup
cron-postgres-backup
# Define egg directories to be the one from Software Release
# Define egg directories to be the one from Software Release
...
@@ -100,3 +102,25 @@ url = $${slap-connection:server-url}
...
@@ -100,3 +102,25 @@ url = $${slap-connection:server-url}
key = $${slap-connection:key-file}
key = $${slap-connection:key-file}
cert = $${slap-connection:cert-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}
...
@@ -21,7 +21,7 @@ server_dir = $${directories:srv}
requirepass = $${redis-requirepass:passwd}
requirepass = $${redis-requirepass:passwd}
config_file = $${directories:etc}/redis.conf
config_file = $${directories:etc}/redis.conf
log_file = $${directories:log}/redis.log
log_file = $${directories:log}/redis.log
wrapper = $${directories:services}/redis
_
server
wrapper = $${directories:services}/redis
-
server
promise_wrapper = $${directories:promises}/redis
promise_wrapper = $${directories:promises}/redis
promise_requirepass_file = $${redis-requirepass:storage-path}
promise_requirepass_file = $${redis-requirepass:storage-path}
...
...
software/abilian/extranet_spr/instance.cfg.in
View file @
950194ca
...
@@ -24,6 +24,9 @@ parts =
...
@@ -24,6 +24,9 @@ parts =
request-web-frontend
request-web-frontend
publish-connection-parameters
publish-connection-parameters
redis
redis
cron
postgres-backup
cron-postgres-backup
...
@@ -65,20 +68,41 @@ mode = 0644
...
@@ -65,20 +68,41 @@ mode = 0644
recipe = slapos.cookbook:mkdirectory
recipe = slapos.cookbook:mkdirectory
bin = $${buildout:directory}/bin
bin = $${buildout:directory}/bin
etc = $${buildout:directory}/etc
etc = $${buildout:directory}/etc
run = $${directories:var}/run
cron-entries = $${:etc}/cron.d
scripts = $${directories:etc}/run
crontabs = $${:etc}/crontabs
cronstamps = $${:etc}/cronstamps
run = $${:var}/run
scripts = $${:etc}/run
srv = $${buildout:directory}/srv
srv = $${buildout:directory}/srv
services = $${
directories
:etc}/service
services = $${:etc}/service
promises = $${
directories
:etc}/promise
promises = $${:etc}/promise
var = $${buildout:directory}/var
var = $${buildout:directory}/var
backup = $${:var}/backup
extranet_spr-instance = $${:var}/extranet_spr-instance
extranet_spr-instance = $${:var}/extranet_spr-instance
cache = $${:extranet_spr-instance}/cache
cache = $${:extranet_spr-instance}/cache
data = $${:extranet_spr-instance}/data
data = $${:extranet_spr-instance}/data
log = $${
directories
:var}/log
log = $${:var}/log
tmp = $${
directories
:var}/tmp
tmp = $${:var}/tmp
whoosh = $${:data}/whoosh
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]
[request-web-frontend]
<= slap-connection
<= slap-connection
recipe = slapos.cookbook:requestoptional
recipe = slapos.cookbook:requestoptional
...
...
software/abilian/extranet_spr/software.cfg
View file @
950194ca
...
@@ -10,6 +10,7 @@ extends =
...
@@ -10,6 +10,7 @@ extends =
../../../component/redis/buildout.cfg
../../../component/redis/buildout.cfg
../../../component/unoconv/buildout.cfg
../../../component/unoconv/buildout.cfg
../../../component/nginx/buildout.cfg
../../../component/nginx/buildout.cfg
../../../component/dcron/buildout.cfg
../../../component/cups/buildout.cfg
../../../component/cups/buildout.cfg
../../../component/dbus/buildout.cfg
../../../component/dbus/buildout.cfg
...
@@ -36,6 +37,7 @@ parts =
...
@@ -36,6 +37,7 @@ parts =
abilian-core-repository-check
abilian-core-repository-check
slapos-cookbook-repository-check
slapos-cookbook-repository-check
dcron
postgresql91
postgresql91
freetype
freetype
cairo
cairo
...
@@ -226,21 +228,21 @@ configure-command =
...
@@ -226,21 +228,21 @@ configure-command =
recipe = slapos.recipe.template
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg.in
url = ${:_profile_base_location_}/instance.cfg.in
output = ${buildout:directory}/instance.cfg
output = ${buildout:directory}/instance.cfg
md5sum =
963b22f55ba677441603e270ea973ed3
md5sum =
1bdd81a7c22a3cd1a28b8c1b06837b96
mode = 0644
mode = 0644
[instance-postgres]
[instance-postgres]
recipe = slapos.recipe.template
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-postgres.cfg.in
url = ${:_profile_base_location_}/instance-postgres.cfg.in
output = ${buildout:directory}/instance-postgres.cfg
output = ${buildout:directory}/instance-postgres.cfg
md5sum =
e47ce979db2f12ac2b30814dd20f63f5
md5sum =
a8fee23bcada451f94ee70d89c4b94c4
mode = 0644
mode = 0644
[instance-redis]
[instance-redis]
recipe = slapos.recipe.template
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-redis.cfg.in
url = ${:_profile_base_location_}/instance-redis.cfg.in
output = ${buildout:directory}/instance-redis.cfg
output = ${buildout:directory}/instance-redis.cfg
md5sum =
cb8dfefa0776de51449ada06c16c38b9
md5sum =
e0f32e25d059ec67dfccd132cbb6095e
mode = 0644
mode = 0644
[instance-extranet]
[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