Improve barman:
- use a separate _barman:_barman user/group - use /var/db/barman as the default datadir, setting appropriate permissions (ie _barman:_barman / 750) - make ${SYSCONFDIR}/barman.conf root:_barman & mode 640 - add README teaching how to configure _barman's crontab Join work with Jean Gerard Pailloncy, tweaks & ok ajacoutot@
This commit is contained in:
parent
7a2fa6393f
commit
b9691601fa
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.1.1.1 2013/08/10 13:42:45 landry Exp $
|
||||
# $OpenBSD: Makefile,v 1.2 2013/08/26 09:37:52 landry Exp $
|
||||
|
||||
COMMENT = backup and restoration manager for PostgreSQL
|
||||
|
||||
@ -6,6 +6,7 @@ MODPY_EGG_VERSION = 1.2.2
|
||||
DISTNAME = barman-${MODPY_EGG_VERSION}
|
||||
CATEGORIES = databases
|
||||
HOMEPAGE = http://www.pgbarman.org/
|
||||
REVISION = 0
|
||||
|
||||
# GPLv3
|
||||
PERMIT_PACKAGE_CDROM = Yes
|
||||
|
16
databases/barman/patches/patch-doc_barman_conf
Normal file
16
databases/barman/patches/patch-doc_barman_conf
Normal file
@ -0,0 +1,16 @@
|
||||
$OpenBSD: patch-doc_barman_conf,v 1.1 2013/08/26 09:37:52 landry Exp $
|
||||
--- doc/barman.conf.orig Tue Aug 20 16:34:28 2013
|
||||
+++ doc/barman.conf Tue Aug 20 16:35:30 2013
|
||||
@@ -5,10 +5,10 @@
|
||||
|
||||
[barman]
|
||||
; Main directory
|
||||
-barman_home = /var/lib/barman
|
||||
+barman_home = /var/db/barman
|
||||
|
||||
; System user
|
||||
-barman_user = barman
|
||||
+barman_user = _barman
|
||||
|
||||
; Log location
|
||||
log_file = /var/log/barman/barman.log
|
@ -1,4 +1,16 @@
|
||||
@comment $OpenBSD: PLIST,v 1.1.1.1 2013/08/10 13:42:45 landry Exp $
|
||||
@comment $OpenBSD: PLIST,v 1.2 2013/08/26 09:37:52 landry Exp $
|
||||
@newgroup _barman:723
|
||||
@newuser _barman:723:723:daemon:Barman User:/nonexistent:/sbin/nologin
|
||||
@extraunexec rm -rf /var/db/barman/*
|
||||
@extraunexec rm -rf /var/log/barman/*
|
||||
@owner _barman
|
||||
@group _barman
|
||||
@mode 0750
|
||||
@sample /var/db/barman/
|
||||
@sample /var/log/barman/
|
||||
@mode
|
||||
@owner
|
||||
@group
|
||||
bin/barman
|
||||
lib/python${MODPY_VERSION}/site-packages/barman/
|
||||
lib/python${MODPY_VERSION}/site-packages/barman-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/
|
||||
@ -40,6 +52,13 @@ lib/python${MODPY_VERSION}/site-packages/barman/xlog.pyc
|
||||
@man man/man5/barman.5
|
||||
share/doc/barman/
|
||||
share/doc/barman/README
|
||||
share/doc/pkg-readmes/${FULLPKGNAME}
|
||||
share/examples/barman/
|
||||
share/examples/barman/barman.conf
|
||||
@owner root
|
||||
@group _barman
|
||||
@mode 0640
|
||||
@sample ${SYSCONFDIR}/barman.conf
|
||||
@mode
|
||||
@owner
|
||||
@group
|
||||
|
24
databases/barman/pkg/README
Normal file
24
databases/barman/pkg/README
Normal file
@ -0,0 +1,24 @@
|
||||
$OpenBSD: README,v 1.1 2013/08/26 09:37:52 landry Exp $
|
||||
|
||||
+-----------------------------------------------------------------------
|
||||
| Running ${FULLPKGNAME} on OpenBSD
|
||||
+-----------------------------------------------------------------------
|
||||
|
||||
Config
|
||||
======
|
||||
|
||||
Configure the main section in ${SYSCONFDIR}/barman.conf for the
|
||||
database(s) you want barman to backup.
|
||||
|
||||
Cron Job
|
||||
========
|
||||
|
||||
put the following in _barman's crontab
|
||||
|
||||
#crontab -u _barman -l
|
||||
0 * * * * ${TRUEPREFIX}/bin/barman cron
|
||||
54 0 * * * ${TRUEPREFIX}/bin/barman backup all
|
||||
|
||||
The first job performs maintenance tasks, such as moving incoming WAL
|
||||
files to the appropriate directory.
|
||||
The second job performs the actual backup.
|
Loading…
Reference in New Issue
Block a user