Files
HaitiData/deployment/manual_backup.sh
Irwan Fathurrahman b47fa24eca Geonode architecture 2
* update fixture region

* update geoserver and geonode in one container

* clean code

* update prod setting to receive PROXY_ALLOWED_HOSTS

* update architecture to be like geonode

* update DATABASE setting

* update DATABASE setting

* update DATABASE setting

* update DATABASE setting

* update settings

* clean code

* update setting to access /geoserver without /api/geoserver

* clean code

* clean code

* Use uwsgi rather than development server.

* clean code

* update compose and docker file of geoserver

* update django_haitidata

* update django_haitidata 2

* update django_haitidata 3

* update settings
2017-10-12 16:03:58 +07:00

21 lines
518 B
Bash
Executable File

#!/bin/bash
MYDATE=`date +%d-%B-%Y`
MONTH=$(date +%B)
YEAR=$(date +%Y)
cd /home/web/mezzanine.kartoza.com/deployment
MYBASEDIR=`pwd`/backups
MYBACKUPDIR=${MYBASEDIR}/${YEAR}/${MONTH}
mkdir -p ${MYBACKUPDIR}
cd ${MYBACKUPDIR}
docker exec -ti mezzanine-db /bin/bash -c "PGPASSWORD=docker pg_dump -Fc -f /tmp/latest.dmp -h localhost -U docker gis"
docker cp mezzanine-db:/tmp/latest.dmp PG_mezzanine-${MYDATE}.dmp
cd -
rm backups/latest.dmp
cd backups
ln -s ${MYBACKUPDIR}/PG_mezzanine-${MYDATE}.dmp latest.dmp
cd ..