반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 29 | 30 |
Tags
- 원탭바이
- 명령어
- 시스템관리
- 토익
- 리눅스
- fish
- one tab buy
- 코라쿠엔
- 여름
- 자동차
- 라면
- 전철
- Shimajirou
- 시마지로
- paypay
- 신쥬쿠
- 칸칸
- 돼지갈비
- 스테이크
- 점심
- 일본
- 돈까스
- 사이타마
- 米沢、팽이
- 영단어
- 동경 모터쇼
- Sekai Entertainment
- TOY
- しまじろう
- youtuber
Archives
- Today
- Total
IT Japan
master측의 설정 본문
반응형
master의 설정
standby_mode = 'off'로 설정
#/usr/local/postgresql9/bin/psql -p 5432 -U interdev
postgres=# select pg_start_backup('hwang');
pg_start_backup
-----------------
0/2000020
(1 row)
pg_start_backup
-----------------
0/2000020
(1 row)
postgres=# \q
[root@tmc_db01 hwangtemp]# cd /data13
[root@tmc_db01 data13]# ls -la
[root@tmc_db01 data13]# tar cvfz data.tar.gz data
[root@tmc_db01 data13]# ls -la
data.tar.gz
[root@tmc_db01 data13]# scp data.tar.gz interdev@172.29.1.113:/tmp
interdev@172.29.1.113's password:
data.tar.gz
interdev@172.29.1.113's password:
data.tar.gz
[root@tmc_db01 data13]# /usr/local/postgresql9/bin/psql -p 5432 -U postgres -d
psql (9.0.2)
Type "help" for help.
postgres=# select pg_stop_backup();
NOTICE: pg_stop_backup cleanup done, waiting for required WAL segments to be
WARNING: pg_stop_backup still waiting for all required WAL segments to be arc
HINT: Check that your archive_command is executing properly. pg_stop_backup
ERROR: canceling statement due to statement timeout
postgres=#
postgres=#
postgres=#
postgres=# \q
psql (9.0.2)
Type "help" for help.
postgres=# select pg_stop_backup();
NOTICE: pg_stop_backup cleanup done, waiting for required WAL segments to be
WARNING: pg_stop_backup still waiting for all required WAL segments to be arc
HINT: Check that your archive_command is executing properly. pg_stop_backup
ERROR: canceling statement due to statement timeout
postgres=#
postgres=#
postgres=#
postgres=# \q
slave의 설정
[root@tmc_db02 tmp]# mv data.tar.gz /data14/
[root@tmc_db02 tmp]# cd /data14
[root@tmc_db02 data14]# ls -la
total 3388
drwxr-xr-x 2 root root 24 Apr 6 06:02 .
drwxr-xr-x 25 root root 4096 Apr 3 05:38 ..
-rw-r--r-- 1 interdev interdev 3457269 Apr 6 06:00 data.tar.gz
[root@tmc_db02 data14]# tar xvzf data.tar.gz
[root@tmc_db02 tmp]# cd /data14
[root@tmc_db02 data14]# ls -la
total 3388
drwxr-xr-x 2 root root 24 Apr 6 06:02 .
drwxr-xr-x 25 root root 4096 Apr 3 05:38 ..
-rw-r--r-- 1 interdev interdev 3457269 Apr 6 06:00 data.tar.gz
[root@tmc_db02 data14]# tar xvzf data.tar.gz
[root@tmc_db02 data]# vi postgresql.conf
archive_command의 수정
wal_level = hot_standby
standby_mode = 'on'
touch recovery.conf
ls -la
chown -R postgres.postgres recovery.conf
ls -la
vi recovery.conf
#restore_command = '/bin/cp /var/atgames/db/pg_standby/archive41 %f %p 2>>./pg_log/standby.log' # e.g. 'cp /mnt/server/archivedir/%f %p'
반응형
'IT > PostgreSQL' 카테고리의 다른 글
postgresql.conf 기본적인 튜닝 (0) | 2016.03.21 |
---|---|
PostgreSQL 8.3 이상에서 postgresql.conf를 서버 스펙에 따른 디폴트 값을 설정하여 성능 튜닝 (0) | 2016.03.21 |
PostgreSQL의 튜닝(postgresql.conf 의설정) (0) | 2016.03.21 |
pg_dump명령어의 사용방법 (0) | 2016.03.21 |
pgpool의 다운로드 (0) | 2014.10.26 |
Comments