To create a backup of a single-tablespace local database and compress
this with <productname>bzip2</productname>:
<screen>
- <prompt>$</prompt> <userinput>pg_basebackup -D - -Ft | bzip2 > backup.tar.bz2</userinput>
+ <prompt>$</prompt> <userinput>pg_basebackup -D - -Ft | bzip2 > backup.tar.bz2</userinput>
</screen>
(this command will fail if there are multiple tablespaces in the
database)
$ vi $PGDATA/postgresql.conf
$ for DBNAME in template0 template1 postgres; do
postgres --single -F -O -c exit_on_error=true $DBNAME \
- < /usr/local/pgsql/share/contrib/sepgsql.sql > /dev/null
+ < /usr/local/pgsql/share/contrib/sepgsql.sql > /dev/null
done
</screen>