![]() ![]() The archive_command is only invoked for completed WAL segments. TODIR="/var/lib/postgresql/9.4/tmp/pg_xlog/"Įcho "Directory $FROMDIR does not exist!!"Ĭp $i /var/lib/postgresql/9.4/main/pg_xlog/$iĮcho "restore_command = 'cp /etc/postgresql/9.4/archives/%f %p'" > nfĬhanges appear in archive (/etc/postgresql/9.4/archives/ in your case) when the current WAL segment (usually 16 Mb) is filled up. Tar ‑xf base.tar ‑C /var/lib/postgresql/9.4/main/ Mv /var/lib/postgresql/9.4/main/* /var/lib/postgresql/9.4/tmp/ Langkah‑langkah pemulihan: service postgresql stop Pg_basebackup ‑‑xlog ‑U postgres ‑‑format=t ‑D /etc/postgresql/9.4/backups/ Langkah pencadangan: cd /etc/postgresql/9.4/backups Langkah pengarsipan WAL: cd /etc/postgresql/9.4/Įcho 'max_wal_senders=1' > nfĮcho 'wal_level=hot_standby' > nfĮcho 'archive_mode=on' > nfĮcho "archive_command='test ! ‑f /etc/postgresql/9.4/archives/%f & cp %p /etc/postgresql/9.4/archives/%f'" > nfĮcho 'local replication postgres trust' > pg_hba.conf Sekarang ketika saya mencoba memulihkan DB, 2 catatan terakhir yang saya buat di atas tidak muncul. Setelah pencadangan, saya membuat 2 catatan di DB. Saya melakukan pencadangan database postgresql 9.4 sesuai dengan dokumen postgres pengarsipan WAL. Pemulihan Postgres 9.4 tidak berfungsi (Postgres 9.4 restore not working) ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
March 2023
Categories |