Skip to content

Instantly share code, notes, and snippets.

@jahands
Created February 6, 2016 18:40
Show Gist options
  • Save jahands/4b819c3993e45ed9617c to your computer and use it in GitHub Desktop.
Save jahands/4b819c3993e45ed9617c to your computer and use it in GitHub Desktop.
My backup script
#!/bin/bash
PATH=$PATH:/usr/local/bin
H=/home/git
GOGS=$H/gogs
# run postgres dump
docker exec gogs-postgres pg_dump -U gogs -Fc gogs -f /var/pgbackup/gogs.dump
sleep 600
hb backup \
-c /home/git/hb \
-D1g \
-t gogit.io \
-B1m \
$GOGS/pgbackup \
$GOGS/gogs/conf \
$GOGS/gogs/data/avatars \
$GOGS/git/gogs-repositories \
$H/drone
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment