gs_probackup增量備份ptrack.cpp : 88

問題描述:使用gs_probackup對opengauss進行增量備份失敗
[omm@testmysqldb04 ~]$ sh gs_probackup.sh incbackup pg_switch_xlog ---------------- 0/46000000 (1 row) INFO: Backup start, gs_probackup version: 2.4.2, instance: gs_bak2023_inst, backup ID: RRYCCX, backup mode: PTRACK, wal mode: STREAM, remote: false, compress-algorithm: none, compress-level: 1 LOG: Backup destination is initialized LOG: This openGauss instance was initialized with data block checksums. Data block corruption will be detected LOG: Database backup start LOG: Latest valid FULL backup: RRYCCA INFO: Parent backup: RRYCCA LOG: started streaming WAL at 0/47000000 (timeline 1) [2023-03-23 10:31:46]: check identify system success [2023-03-23 10:31:46]: send START_REPLICATION 0/47000000 success [2023-03-23 10:31:46]: keepalive message is received INFO: Cannot parse path "base" INFO: PGDATA size: 607MB LOG: Current tli: 1 LOG: Parent start_lsn: 0/45000028 LOG: start_lsn: 0/47000028 INFO: Extracting pagemap of changed blocks INFO: change bitmap start lsn location is 0/45000028 ERROR at ptrack.cpp : 88 : The destination buffer or format is a NULL pointer or the invalid parameter handle is invoked.. sending incremental file list 000000010000000000000046 sent 16,781,522 bytes received 35 bytes 11,187,704.67 bytes/sec total size is 83,886,407 speedup is 5.00

 

ERROR at ptrack.cpp : 88 : The destination buffer or format is a NULL pointer or the invalid parameter handle is invoked
[omm@testmysqldb04 ~]$ vim /data/openGauss/dn/postgresql.conf

enable_cbm_tracking = on

 重啓數據庫節點

 

官方文檔:https://docs.opengauss.org/zh/docs/3.1.1/docs/Toolreference/gs_probackup.html

背景信息

gs_probackup是一個用於管理openGauss數據庫備份和恢復的工具。它對openGauss實例進行定期備份,以便在數據庫出現故障時能夠恢復服務器。

  • 可用於備份單機數據庫,也可對主機或者主節點數據庫備機進行備份,爲物理備份。
  • 可備份外部目錄的內容,如腳本文件、配置文件、日誌文件、dump文件等。
  • 支持增量備份、定期備份和遠程備份。
  • 可設置備份的留存策略。

前提條件

  • 可以正常連接openGauss數據庫。
  • 若要使用PTRACK增量備份,需在postgresql.conf中手動添加參數“enable_cbm_tracking = on”。
  • 爲了防止xlog在傳輸結束前被清理,請適當調高postgresql.conf文件中wal_keep_segements的值。

限制說明

  • 備份必須由運行數據庫服務器的用戶執行。
  • 備份和恢復的數據庫服務器的主版本號必須相同。
  • 如果要通過ssh在遠程模式下備份數據庫,需要在本地和遠程主機安裝相同主版本的數據庫,並通過ssh-copy-id remote_user@remote_host命令設置本地主機備份用戶和遠程主機數據庫用戶的無密碼ssh連接。
  • 遠程模式下只能執行add-instance、backup、restore子命令。
  • 使用restore子命令前,應先停止gaussdb進程。
  • 當存在用戶自定義表空間時,備份的時候要加上 –external-dirs 參數,否則,該表空間不會被備份。
  • 當備份的規模比較大時,爲了防止備份過程中timeout發生,請適當調整postgresql.conf文件的參數 session_timeout、wal_sender_timeout。並且在備份的命令行參數中適當調整參數–rw-timeout的值。
  • 恢復時,使用-T選項把備份中的外部目錄重定向到新目錄時,請同時指定參數–external-mapping。
  • 當使用遠程備份時,請確保遠程機器和備份機器的時鐘同步,以防止使用–recovery-target-time恢復的場合,啓動gaussdb時有可能會失敗。
  • 當遠程備份有效時(remote-proto=ssh),請確保-h和–remote-host指定的是同一臺機器。當遠程備份無效時,如果指定了-h選項,請確保-h指定的是本機地址或本機主機名。
  • 當前僅支持備份發佈訂閱的邏輯複製槽。
  • 備份時,請確保服務器用戶對備份的目錄下所有文件有讀寫的權限,以防止在恢復時因權限不足的問題而失敗。
  • 在dss模式下當前僅支持本地主機全量備份和全量恢復。
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章