upgrade script: dump gitea db with pg_dump
the dump generated by gitea is unusable (an import of a 100Mb dump takes ~40 hours). Reuse the BINDIR variable.
This commit is contained in:
parent
b64058ff43
commit
2f6bbf644f
@ -40,7 +40,9 @@ function stop() {
|
||||
|
||||
function backup() {
|
||||
set -ex
|
||||
su - gitea -c "cd /srv/gitea/bin ; /srv/gitea/bin/gitea dump --tempdir /var/tmp/ -c /etc/gitea/gitea.ini"
|
||||
now="$(date +%s)"
|
||||
su - postgres -c "pg_dump -U postgres -O giteadb -Z 7" > "$BINDIR/gitea-${now}.sql.gzip"
|
||||
su - gitea -c "cd $BINDIR; $BINDIR/gitea dump --tempdir /var/tmp/ -f gitea-dump-${now}.zip -c /etc/gitea/gitea.ini"
|
||||
set +x
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user