Notice
Recent Posts
Recent Comments
Link
«   2025/02   »
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28
Archives
Today
Total
관리 메뉴

내블로그

백업 및 복구 본문

DataBase/PostgreSQL

백업 및 복구

잡동사니보관 2014. 8. 13. 13:26

# 특정 DATABASE 또는 TABLE 백업 / 복구


1. 백업

pg_dump [database name] -t [table name] --username=[id] -W -h 127.0.0.1 > [dump.file.name] 


2. 복구

psql -f [dump.file.name] [database name] --username=[id] -W -h 127.0.0.1



# 전체 DATABASE 백업 / 복구

1. 백업

pg_dumpall --username=[id] -W -h 127.0.0.1 > [dump.file.name] 


2. 복구

psql -f [dump.file.name] template1 --username=[id] -W -h 127.0.0.1