This is an old revision of the document!
pg_dump -h localhost -U postgres -F c -f "~/dbbackup/" dbname
pg_restore -h localhost -U postgres -d old_db "~/dbbackup/"
echo "DROP INDEX mdl_quiz_xxx_idx" | sudo psql -U postgres moodle_19
backup
pg_dump dbname | gzip > filename.gz
restore
gunzip -c filename.gz | psql dbname
cat filename.gz | gunzip | psql dbname