Skip to content
Snippets Groups Projects
Commit bc8eecc0 authored by David Beniamine's avatar David Beniamine
Browse files

Backup script

parent 64b3029b
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
echo "Backing up sympa DB"
DIR=$(dirname $0)
echo $DIR
cd $DIR
out="backups/pgdump_$(date +%Y%m%d_%H%M).sql.gz"
PASS=$(awk -F = '/SYMPA_DB_PASSWD/{print $2}' .env)
echo "$PASS" | docker-compose exec -T pgsql pg_dump sympa -U sympa -W | gzip > $out
ls -lh $out
echo "Done"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment