Maintenance for PostgreSQL Database
To backup the database (on Linux):
- Open a command prompt
- Type:
pg_dump -U [database-user] -Ft [database-name] > [filename]
This will create a dump file which can be restored using the pg_restore command. Please read the Postgresql administration guide for more options and details.
To backup the database (on Microsoft Windows):
- Open pgAdmin tool.
- Open the server node and navigate to your database.
- Right click on your database and choose Backup...
- Enter a file name. Leave the other defaults as is.
- Click OK
It is recommended that you set the autovacuum parameter in postgresql.conf to on. This will automatically optimize your database.