Create staging dist branch
This commit is contained in:
parent
174ebb74c7
commit
a4ba21d174
|
@ -7,7 +7,7 @@
|
|||
BACKUP_USER=postgres
|
||||
|
||||
# Optional hostname to adhere to pg_hba policies. Will default to "localhost" if none specified.
|
||||
HOSTNAME=/var/run/postgresql
|
||||
HOSTNAME=
|
||||
|
||||
# Optional username to connect to database as. Will default to "postgres" if none specified.
|
||||
USERNAME=
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
9
|
|
@ -0,0 +1,14 @@
|
|||
Source: postgres-backup
|
||||
Section: unknown
|
||||
Priority: optional
|
||||
Maintainer: Cadoles <contact@cadoles.com>
|
||||
Build-Depends: debhelper (>= 8.0.0), dh-systemd (>= 1.5)
|
||||
Standards-Version: 3.9.4
|
||||
Homepage: http://forge.cadoles.com/Cadoles/postgres-backup
|
||||
Vcs-Git: http://forge.cadoles.com/Cadoles/postgres-backup.git
|
||||
Vcs-Browser: http://forge.cadoles.com/Cadoles/postgres-backup
|
||||
|
||||
Package: postgres-backup
|
||||
Architecture: amd64
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||
Description: PostgreSQL backup scripts
|
|
@ -0,0 +1 @@
|
|||
/var/backups/database/postgresql
|
|
@ -0,0 +1,2 @@
|
|||
/usr/share/postgres-backup/pg_backup.sh /usr/bin/pg_backup.sh
|
||||
/usr/share/postgres-backup/pg_backup_rotated.sh /usr/bin/pg_backup_rotated.sh
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/bash
|
||||
|
||||
mkdir -p /var/backups/database/postgresql
|
||||
chown -R postgres:postgres /var/backups/database/postgresql
|
|
@ -0,0 +1,10 @@
|
|||
[Unit]
|
||||
Description=Run PostgreSQL backup
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/bin/pg_backup_rotated.sh -c /etc/postgres-backup/pg_backup.conf
|
||||
User=postgres
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
|
@ -0,0 +1,9 @@
|
|||
[Unit]
|
||||
Description=Timer for periodic execution of postgres-backup service.
|
||||
|
||||
[Timer]
|
||||
OnCalendar=daily
|
||||
Persistent=true
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
|
@ -0,0 +1,24 @@
|
|||
#!/usr/bin/make -f
|
||||
# -*- makefile -*-
|
||||
|
||||
# Uncomment this to turn on verbose mode.
|
||||
export DH_VERBOSE=1
|
||||
|
||||
%:
|
||||
dh $@ --with systemd
|
||||
|
||||
override_dh_auto_install:
|
||||
mkdir -p debian/postgres-backup/usr/share/postgres-backup
|
||||
mkdir -p debian/postgres-backup/etc/postgres-backup
|
||||
mkdir -p debian/postgres-backup/usr/bin
|
||||
|
||||
cp script/pg_backup.sh debian/postgres-backup/usr/share/postgres-backup/pg_backup.sh
|
||||
cp script/pg_backup_rotated.sh debian/postgres-backup/usr/share/postgres-backup/pg_backup_rotated.sh
|
||||
cp conf/pg_backup.conf debian/postgres-backup/etc/postgres-backup/pg_backup.conf
|
||||
|
||||
chmod +x debian/postgres-backup/usr/share/postgres-backup/pg_backup_rotated.sh
|
||||
chmod +x debian/postgres-backup/usr/share/postgres-backup/pg_backup.sh
|
||||
|
||||
install -D -m 644 debian/postgres-backup.timer debian/postgres-backup/lib/systemd/system/postgres-backup.timer
|
||||
|
||||
install -d debian/postgres-backup
|
|
@ -0,0 +1 @@
|
|||
3.0 (native)
|
Loading…
Reference in New Issue