forked from CampusIoT/loraserver-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpgbackup.yml
More file actions
44 lines (38 loc) · 1.5 KB
/
pgbackup.yml
File metadata and controls
44 lines (38 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Copyright (C) CampusIoT, - All Rights Reserved
# Written by CampusIoT Dev Team, 2016-2018
# TODO rsync of the ./backups/postgresql directory on a remote host (ie https://hub.docker.com/r/apnar/rsync-server/)
version: "2"
services:
postgres-backup-as:
image: annixa/docker-pg_dump
container_name: postgres-backup-as
#links:
# - postgresql:db # Maps postgres as "db"
environment:
- PGUSER=loraserver_as
- PGPASSWORD=loraserver_as
- CRON_SCHEDULE=0,30 * * * * # Every 30 minutes
- DELETE_OLDER_THAN=10080 # seven days : Optionally delete files older than $DELETE_OLDER_THAN minutes.
- PGDB=loraserver_as # The name of the database to dump
#- PGHOST=loraserver-docker_postgresql_1 # The hostname of the PostgreSQL database to dump
- PREFIX=as
volumes:
- ./backups/postgresql:/dump
command: dump-cron
postgres-backup-ns:
image: annixa/docker-pg_dump
container_name: postgres-backup-ns
environment:
- PGUSER=loraserver_ns
- PGPASSWORD=loraserver_ns
- CRON_SCHEDULE=1,31 * * * * # Every 15 minutes
- DELETE_OLDER_THAN=10080 # seven days : Optionally delete files older than $DELETE_OLDER_THAN minutes.
- PGDB=loraserver_ns # The name of the database to dump
# - PGHOST=loraserver-docker_postgresql_1 # The hostname of the PostgreSQL database to dump
- PREFIX=ns
volumes:
- ./backups/postgresql:/dump
command: dump-cron
#networks:
# loraserver-docker_default:
# driver: bridge