]> git.xonotic.org Git - xonotic/xonstatdb.git/blob - scripts/drop_and_load.shl
Add TKA to the full build.
[xonotic/xonstatdb.git] / scripts / drop_and_load.shl
1 #!/bin/bash
2
3 # user doing the load - must be superuser, and must have access to postgres db
4 USER=xonstat
5
6 # full path to the backup file
7 BACKUPFILE=$1
8
9 psql -U $USER -h localhost postgres <<EOF
10 drop database xonstatdb;
11 create database xonstatdb encoding='utf-8' owner=xonstat;
12 \q
13 EOF
14
15 pg_restore -c -U xonstat -h localhost -d xonstatdb $BACKUPFILE