• 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节点都可以。
  • 相关阅读:
    关于 继承、扩展和协议,深度好文
    BearSkill纯代码搭建iOS界面
    漫谈程序猿系列:程序猿零门槛?
    Uva--11324--The Largest Clique【有向图强连通分量】
    iOS_UITextField 基本操作
    苹果官方xcodeprojectbuild设置指南
    <html>
    Matlab 随机数字
    基于中文人员特征的性别判定方法
    小米用户画像的演进及应用解读
  • 原文地址:https://www.cnblogs.com/zhjh256/p/16690837.html
Copyright © 2020-2023  润新知