Welcome to plsql4all.blogspot.com SQL, MYSQL, ORACLE, TERADATA, MONGODB, MARIADB, GREENPLUM, DB2, POSTGRESQL.

Saturday, 27 January 2024

How can you perform a backup and restore in PostgreSQL?

 Use the pg_dump command for backup and pg_restore for restoration. For example, pg_dump -U username -d dbname > backup.sql for backup and psql -U username -d dbname < backup.sql for restore.

No comments:

Post a Comment

Please provide your feedback in the comments section above. Please don't forget to follow.