Skip to content

Instantly share code, notes, and snippets.

@juansecaro
juansecaro / db_backup_commands.md
Created December 31, 2021 10:11 — forked from AtulKsol/db_backup_commands.md
Commands to backup & restore database
  1. pg_dump is a nifty utility designed to output a series of SQL statements that describes the schema and data of your database. You can control what goes into your backup by using additional flags.
    Backup: pg_dump -h localhost -p 5432 -U postgres -d mydb > backup.sql

    Restore: psql -h localhost -p 5432 -U postgres -d mydb < backup.sql

    -h is for host.
    -p is for port.
    -U is for username.
    -d is for database.

@juansecaro
juansecaro / 0-startup-overview.md
Created April 18, 2018 21:13 — forked from dideler/0-startup-overview.md
Startup Engineering notes