DEFINITIONS

Definitions More Info.
Definition ID690
TitlePOSTGRESQL
CategoryNOTES
DefinitionPostgresql recovery and point in ime recovery
Definition DescriptionSELECT pg_create_restore_point( 'important_moment' );
ile restore point oluşturuyoruz. recovery conf içine de recovery_target_name=important_moment yaptık mı, istediğimiz ana kadar dönüş yapabiliyoruz.

BURASI HAZIRLANIS VE RECOVERY ETMESI
========================================
standby_mode=on
primary_conninfo = 'host=172.16.16.2 port = 5433 user = replica password=1qaz2wsx' archive_cleanup_command = 'pg_archivecleanup -d /storage/GGwal_archive/ %r 2>>/storage/GGrepData/cleanup.log'
#-----------------------------------------------------------------------
#POINT IN TIME RECOVERY YAPMAK ISTEDIGIMIZDE ASAGIDAKI KOMUTLARI ETKIN HALE GETIREBILIRIZ
#restore_command = 'cp /storage/GGrepwal_archive/%f %p'
#--------------------------------------------------------------
# Asagidaki sorgu: POINT IN TIME RECOVERY YAPMAK ICIN kullaniriz.
#1- Oncesinde Primary tarafta point in time icin #SELECT pg_create_restore_point( 'important_moment' ); calistirmamiz gerek.
#2- Sonra asagidaki komutu Secondary tarafta calistirmamiz lazim.
#recovery_target_name=important_moment
#----------------------------------------------------------------------------
#Eger wal dosyalari arasindan bir zaman donus yapmak istiyorsak asagidaki komutu yazmaliyiz.
recovery_target_time='2014-12-01 10:19:42' restore_command='cp /archives/%f %p' pause_at_recovery_target=true
#-----------------------------------------------
#MAIN SERVER YAPMAK ICIN ASAGIDAKI TRIGGER ETKIN HALEN GETIRMEK LAZIM
#main server olarak gorev almaya hazirdir.
#trigger_file = '/tmp/pg_failover_trigger'
RecordBycunay
Record Date16-12-2015 14:47:02
Düzenle
Kopyala
Sil