Anonymous

Changes

From NixNet
m
change script to case instead of if
PGPASSWORD='CHANGEMETOSOMETHINGSECURE'
# Space-separated list of databases for backing up
DBNAME="dbname1 dbname2 dbname3misskey"
if [ "case $DATABASE" = "in mysql" ]; then) touch $DUMPFILE chown 0:0 $DUMPFILE chmod 600 $DUMPFILE mysqldump -u archive -p$PGPASSWORD --all-databases > $DUMPFILEelif [ "$DATABASE" = "postgres" ] ;; then postgres) for i in $DBNAME do PGDUMP=$DUMPFILE-$i touch $PGDUMP chown 0:0 $PGDUMP chmod 600 $PGDUMP pg_dump -h 127.0.0.1 -U archive -Fp -n public -O -x -d $i > $PGDUMP doneelse echo "Please set the database variable" ;;fiesac
exit
</pre>