Name: geonode-backup-docker
Owner: GeoSolutions
Description: GeoNode backup image
Created: 2018-04-18 16:49:18.0
Updated: 2018-04-19 13:54:27.0
Pushed: 2018-04-19 13:54:26.0
Homepage: null
Size: 9
Language: Shell
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
This repo contains docker build config for backup container to be used along with geonode-generic
stack
This container runs cron in foreground with one script scheduled to be run once a day, at 2:02.
Script /root/backup.sh
will run
PostgreSQL backup will be run twice, before and after filesystem backup. Each backup run will resutl in timestamped file.
All backup files are stored in /mnt/volumes/backups/$rancher_stack_name/$backup_type/$date
directory, where:
/mnt/volumes/backups/
is a persistent volume in container$rancher_stack_name
is a name of stack (as you can have multiple deployments using the same backup volume)$backup_type
is a name of backup part (pg
for postgresql, fs
for filesystem)$date
is a date of backup in YYYYMMDD
format.For example,
mnt/volumes/backups/geonode-generic-sdffsdf/pg/20180419/:
r--r-- 1 root 184056 Apr 19 10:24 pg_dumpall-2018_04_19_1024_04.tar.gz
r--r-- 1 root 184056 Apr 19 10:24 pg_dumpall-2018_04_19_1024_09.tar.gz
mnt/volumes/backups/geonode-generic-sdffsdf/fs/20180419/:
r-xr-x 20 root 4096 Apr 19 10:22 data (there's data gs dir structure)
r--r-- 1 root 190057 Apr 19 10:24 data-2018_04_19_1024_09.tar.gz
Backup container requires several elemnts to work correctly:
persistent storages:
GeoServer data in /mnt/volumes/data/
GeoNode statics and uploads in /mnt/volumes/statics/
backups storage in /mnt/volumes/backups/
environment variables:
RANCHER_STACK
- name of stack in which container is run
RANCHER_ENV
- name of environment in which stack is run
PGUSER
, PGHOST
, PGPASSWORD
, PGOPTIONS
- postgresql client connection parameters (PGUSER
and PGHOST
should be enough in base scenario)
TARGET_DIR
- optional, alternative base path for backups storage