Permalink
Browse files

Add online recovery script using pitr.

  • Loading branch information...
1 parent 7eb8593 commit c7b0d56e46e893c0bd54e740ed2a0c36a25da023 y-asaba committed Oct 23, 2007
Showing with 52 additions and 1 deletion.
  1. +1 −1 Makefile.am
  2. +48 −0 doc/pgpool-ja.html
  3. +3 −0 sample/pgpool_recovery_pitr
View
@@ -38,7 +38,7 @@ pgpool.8: pgpool.8.in
CLEANFILES = pgpool.8
EXTRA_DIST = pgpool.8.in sql/system_db.sql sample/pgpool.pam doc/pgpool-ja.html doc/pgpool-en.html \
doc/tutorial-ja.html doc/tutorial-en.html doc/pgpool.css \
- sample/pgpool_remote_start sample/pgpool_recovery \
+ sample/pgpool_remote_start sample/pgpool_recovery sample/pgpool_recovery_pitr \
sample/dist_def_pgbench.sql sql/pgpool-recovery/pgpool-recovery.c \
sql/pgpool-recovery/pgpool-recovery.sql.in sql/pgpool-recovery/Makefile \
test/parser/expected/cursor.out test/parser/expected/copy.out \
View
@@ -1164,6 +1164,54 @@ <h4>pgpool_remote_start </h4>
$B$*$/I,MW$,$"$j$^$9!#(B
</p>
+<h4>pgpool_recovery_pitr</h4>
+<p>
+rsync $B$K$h$k%G!<%?%3%T!<J}<0$NB>$K!"(BPostgreSQL $B$N(B PITR $B$r;H$C$?%j%+%P(B
+$B%j$r$9$k$3$H$,$G$-$^$9!#(BPITR $B$K$h$k%j%+%P%j$r$9$k>l9g$K$O$"$i$+$8$a(B
+PostgreSQL $B$N@_Dj$G%m%0$r%"!<%+%$%V$5$;$k$h$&$K$7$F$*$$$F$/$@$5$$!#(B
+</p>
+
+<p>
+PITR $B$K$h$k%j%+%P%j$r<B;\$9$k$K$O!"(Bpgpool_recovery_pitr $B%9%/%j%W%H$r(B
+$PGDATA/pgpool_recovery $B$K%3%T!<$7$^$9!#$3$N%9%/%j%W%H$G$O(B XLOG $B$r6/@)(B
+$BE*$K%9%$%C%A$5$;$k$h$&$K$7$^$9!#(B
+</p>
+
+<pre>
+ #! /bin/sh
+ psql -c 'select pg_switch_xlog()' postgres
+</pre>
+
+<p>
+$B%9%/%j%W%H$NG[CV$,40N;$7$?$i%Y!<%9%P%C%/%"%C%W$r<hF@$7!"%j%+%P%j@h$N%N!<(B
+$B%I$X%3%T!<$7$^$9!#$3$N;~E@$G$O$^$@%j%+%P%jA`:n$r$7$^$;$s!#0J2<$N$h$&$J(B
+$B%9%/%j%W%H$r;H$C$F<+F0E*$K%Y!<%9%P%C%/%"%C%W$r%j%+%P%j@h$K%3%T!<$9$k$3(B
+$B$H$,$G$-$^$9!#(B
+</p>
+
+<pre>
+ #! /bin/sh
+
+ psql -c "select pg_start_backup('pgpool-recovery')" postgres
+ tar -C /data -zcf pgsql.tar.gz pgsql
+ psql -c 'select pg_stop_backup()' postgres
+ scp pgsql.tar.gz secondary:/data
+</pre>
+
+<p>
+$B:G8e$K%Y!<%9%P%C%/%"%C%W$rE83+$7!"(Brecovery.conf $B$rJT=8$7$^$9!#(B
+$B$3$3$G$NNc$G$O!"(Brecovery.conf $B$G$O%^%9%?$K%"!<%+%$%V$5$l$F$$$k%m%0$r(B
+scp $B$G%3%T!<$7$F$$$^$9!#(B
+
+<pre>
+restore_command = 'scp master:/data/archive_log/%f %p'
+</pre>
+</p>
+
+<p>
+$B$3$l$G(B PITR $B$K$h$k%*%s%i%$%s%j%+%P%j$N=`Hw$,40N;$G$9!#(B
+</p>
+
<h3>$B%j%+%P%j$N<B9T(B</h3>
<p>
$B0J>e$G%*%s%i%$%s%j%+%P%j$N=`Hw$,@0$$$^$7$?!#(B
@@ -0,0 +1,3 @@
+#! /bin/sh
+
+psql -c 'select pg_switch_xlog()' postgres

0 comments on commit c7b0d56

Please sign in to comment.