Backing up databases is a routinary task in web development.
In PostgreSQL, like MySQL has a nice way of backup databases.
pg_dump -U username database -f dumpfile
- username — this is the username used to connect to the database
- database — is the database to be dumped
- dumpfile — this is the filename going to be used for the backup file
The next task would be to enter your password:
Password for user postgres:
Your database will now be backed up with the filename you used in the