From 9640590d82c9d670167bde85186624f4d11f90e2 Mon Sep 17 00:00:00 2001 From: Valentin Lab Date: Fri, 8 May 2020 19:01:33 +0200 Subject: [PATCH] new: [odoo-tecnativa,postgres] adding backup relations Signed-off-by: Valentin Lab --- odoo-tecnativa/metadata.yml | 14 ++++++++++++++ postgres/metadata.yml | 20 +++++++++++++++++++- 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/odoo-tecnativa/metadata.yml b/odoo-tecnativa/metadata.yml index 48ac89b0..3d1a4cfd 100644 --- a/odoo-tecnativa/metadata.yml +++ b/odoo-tecnativa/metadata.yml @@ -64,6 +64,20 @@ uses: echo "ProxyPass /longpolling/ http://${MASTER_BASE_SERVICE_NAME}:8072/longpolling/" echo "ProxyPassReverse /longpolling/ http://${MASTER_BASE_SERVICE_NAME}:8072/longpolling/" fi + backup: + constraint: recommended + auto: pair + solves: + backup: "Automatic regular backup" + default-options: + ## First pattern matching wins, no pattern matching includes. + ## include-patterns are checked first, then exclude-patterns + ## Patterns rules: + ## - ending / for directory + ## - '*' authorized + ## - must start with a '/', will start from $SERVICE_DATASTORE + exclude-patterns: + - "/var/lib/odoo/sessions/" # network-isolation: # whitelist: ## required external services used by this service diff --git a/postgres/metadata.yml b/postgres/metadata.yml index 88ea8ed9..ced6c328 100644 --- a/postgres/metadata.yml +++ b/postgres/metadata.yml @@ -10,6 +10,24 @@ uses: constraint: optional auto: pair solves: - backup: "Automatic regular backups" + backup: "Automatic regular dumps for backuping purpose" default-options: schedule: "31 * * * *" ## schedule backup every hour + ## This one is useful only if previous relation is used + backup: + constraint: optional + auto: pair + solves: + backup: "Automatic regular backups of dumps" + default-options: + ## First pattern matching wins, no pattern matching includes. + ## include-patterns are checked first, then exclude-patterns + ## Patterns rules: + ## - ending / for directory + ## - '*' authorized + ## - must start with a '/', will start from $SERVICE_DATASTORE + # include-patterns: + # - /var/backups/pg/ + exclude-patterns: + - "/var/lib/" ## postgres working data files + - "/var/backups/pg/*.inprogress" ## database dump in progress