Archive for backup

Postgresql backup and restore

To backup all databases on the server:

  1. su – postgres
  2. pg_dumpall > db.backup

To restore from previously created backup:

  1. su – postgres
  2. psql -f db.backup