• 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节点都可以。
  • 相关阅读:
    暑假集训(2)第六弹 ----- Frosh Week(UVA11858)
    暑假集训(2)第五弹 ----- Who's in the Middle(poj2388)
    暑假集训(2)第四弹 ----- 敌兵布阵(hdu1166)
    暑假集训(2)第三弹 ----- 食物链(poj1182)
    排序算法
    设计模式
    字符串匹配之KMP实现
    栈的链表简易实现
    单链表简单实现
    EF使用Effort.EF内存数据库单元测试和集成测试
  • 原文地址:https://www.cnblogs.com/lightdb/p/16690837.html
Copyright © 2020-2023  润新知