[PostgreSQL]dumpとrestore

LINEで送る
Pocket

  • dump
pg_dump -h hoge -U hoge -d hoge | gzip >  hoge_$(date +%Y%m%d).sql.gz
  • restore
gzip -cd hoge_20200818.sql.gz |  psql -h hoge -U hoge -d hoge

Was this helpful?

0 / 0

コメントを残す 0

Your email address will not be published. Required fields are marked *