• lightdb lt_probackup 归档模式和流模式的区别


    ARCHIVE Mode

    ARCHIVE is the default WAL delivery mode.

    For example, to make a FULL backup in ARCHIVE mode, run:

    pg_probackup backup -B backup_dir --instance instance_name -b FULL
    

    ARCHIVE backups rely on continuous archiving to get WAL segments required to restore the cluster to a consistent state at the time the backup was taken.

    When a backup is taken, pg_probackup ensures that WAL files containing WAL records between Start LSN and Stop LSN actually exist in backup_dir/wal/instance_name directory. pg_probackup also ensures that WAL records between Start LSN and Stop LSN can be parsed. This precaution eliminates the risk of silent WAL corruption.

    STREAM Mode

    STREAM is the optional WAL delivery mode.

    For example, to make a FULL backup in the STREAM mode, add the --stream flag to the command from the previous example:

    pg_probackup backup -B backup_dir --instance instance_name -b FULL --stream --temp-slot
    

    The optional --temp-slot flag ensures that the required segments remain available if the WAL is rotated before the backup is complete.

    Unlike backups in ARCHIVE mode, STREAM backups include all the WAL segments required to restore the cluster to a consistent state at the time the backup was taken.

    During backup pg_probackup streams WAL files containing WAL records between Start LSN and Stop LSN to backup_dir/backups/instance_name/backup_id/database/pg_wal directory. To eliminate the risk of silent WAL corruption, pg_probackup also checks that WAL records between Start LSN and Stop LSN can be parsed.

    Even if you are using continuous archiving, STREAM backups can still be useful in the following cases:

    • STREAM backups can be restored on the server that has no file access to WAL archive.

    • STREAM backups enable you to restore the cluster state at the point in time for which WAL files in archive are no longer available.

    • Backup in STREAM mode can be taken from a standby of a server that generates small amount of WAL traffic, without long waiting for WAL segment to fill up.

     简单地说,效果本质上是一样。一个是自我包含,一个是基于持续归档,但是standby节点只能基于STREAM模式,primary节点都可以。
  • 相关阅读:
    CF598E Chocolate Bar 题解 动态规划
    CF864E Fire 题解 背包DP
    用 程序 解决 windows防火墙 的 弹窗 问题
    windbg 使用与技巧
    bat 下 字符串拆分 类似 split 可以使用 for /f delims
    vs2013 在按F5调试时,总是提示 “项目已经过期”的解决方案
    代理与反向代理
    关于维护用户状态的一致性
    视频的裁剪后缩放功能。
    通信协议的设计
  • 原文地址:https://www.cnblogs.com/zhjh256/p/16690837.html
Copyright © 2020-2023  润新知