![]() ![]() ![]() #Cara baca file format xlog archiveTherefore, it is unwise to use a very short archive_timeout - it will bloat your archive storage. #Cara baca file format xlog full(Increasing checkpoint_timeout will reduce unnecessary checkpoints on an idle system.) Note that archived files that are closed early due to a forced switch are still the same length as completely full files. When this parameter is greater than zero, the server will switch to a new segment file whenever this many seconds have elapsed since the last segment file switch, and there has been any database activity, including a single checkpoint. To limit how old unarchived data can be, you can set archive_timeout to force the server to switch to a new WAL segment file periodically. Hence, if your server generates little WAL traffic (or has slack periods where it does so), there could be a long delay between the completion of a transaction and its safe recording in archive storage. 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. ArchivesCategories |