Copias de seguridad de WAL-G. ¿Qué hay en 2019? Andrey Borodin

Propongo familiarizarme con la decodificación del informe de principios de 2019 de Andrei Borodin "Copias de seguridad de WAL-G. ¿Qué hay en 2019?"



¡Hola a todos! Me llamo Andrey Borodin. Soy desarrollador en Yandex. He estado interesado en PostgreSQL desde 2016, después de hablar con los desarrolladores, y me dijeron que todo es simple: tomas el código fuente y lo compilas, y todo saldrá bien. Y desde entonces no puedo parar, estoy escribiendo todo tipo de cosas diferentes.


, , WAL-G. , PostgreSQL . , . , , .


, , , , . WAL-G? , , .



PostgreSQL, , , S3 Google Cloud .



, Yandex Object Storage, S3 .



Bucket. .



.



C aws-s3-key.



WAL-G.


? . , , , . . , - , , . . , . . .



, WAL-G, «backup list», . Object Storage, , . , , . , . , .



. WAL-G «backup-push» WAL-G pgdata . , , PostgreSQL , , «archive-mode».



, «archive_mode = on» «archive_command», WAL-G. - - WAL-G. , . , WAL-G. - , GitHub. WAL-G , , archive_command.



WAL-G High Availability Database management.



. Yandex Object Storage.



– Point in time recovery. . .



. ? , . . pg_basebackup , . , , .



. -, .



  • , , pg_basebackup .
  • . , , .
  • , . - , .
  • , . , contribution WAL-G. WAL-G, : « , - ?». WAL-G.
  • , , . .
  • .
  • .


. , PostgreSQL. - , - , - .



, WAL-G. . .



, – , WAL-G .



WAL-G 4 . :


WAL-PUSH – .


WAL-FETCH – .


BACKUP-PUSH – .


BACKUP-FETCH – .



, WAL-G , . . listing , .



– -.


- , , . , WAL. WAL-, - . , , , - fail, 4 - 10 WAL. , - .



LSN-based – , , LSN LSN , , . , , -.



, .



API PostgreSQL . PostgreSQL WAL- WAL-. WAL- «WAL-FETCH», «WAL-PREFETCH», 8 , .


, archive_status WAL-. WAL . , WAL. , , , API PostgreSQL. PostgreSQL archive_status , WAL-. , , . PostgreSQL, , .



LSN-based WAL- , mode-time . , . , WAL-.


, WAL , , , . , . , delta-.


Delta- WAL-, , WAL. delta- .



, , , , WAL, , , , .



_delta_partial . , , WAL , , .


, , , , , , , LSN-based .



, WAL-G. , , , - – , . ( https://github.com/wal-g/wal-g/tree/master/internal/walparser)



. delta-. , , delta- , . , . delta-.



. . LSN-based, . , LSN-based delta- . . WAL-delta 20. . . , .



, , – PostgreSQL, «pg_prefaulter»



, , Stand-by restore command, WAL-G WAL-. , WAL . , SSD . WAL , . page-. , . WAL-G, , WAL . , . SSD-, , , , .


, .



, .



, WAL-delta . , . WAL-delta , . WAL-delta , . , . «instant WAL-delta».



, , , , . . . WAL, PostgreSQL , .


. , - , . . . WAL-delta. , , , - - , delta pg_basebackup, .


. . . - , , , .


, , .



WAL-G. , . , API MySQL . MySQL PITR WAL-, binlog. MySQL, - , binlog . - cron – - ?


MySQL restore command, , - -. , , , . , . , , - . (: MySQL )



, WAL-G .



, WAL-G . , . , WAL-G. - , High Availability , .



, WAL-G WAL-E. , WAL-G WAL-E , WAL-E. wal-push, . WAL-G , WAL-E . WAL-E archive-status, , , , WAL- , PostgreSQL .


WAL-G? PostgreSQL , , PostgreSQL , , mode-time md5 PostgreSQL – OK, , , .


WAL-E , archive command, WAL-G, WAL-E .


, , WAL-G , .


-, . , . , . , . . , WAL-G , smoke-: pg_dumpall /dev/null amcheck .



WAL-G WAL. . . . , , , . : « , ». WAL-G . ( — . — backup-mark https://github.com/wal-g/wal-g/blob/master/PostgreSQL.md)



PITR.



Google Summer of Code. , - Go «G», . , . , .



, . .


, WAL-G , . , , . pg_control . , - . , , . , .


offline-. , . . LSN, . LSN control . . . .


. . . - Go , bucket. pull request.


, , , , . . , , . , , PostgreSQL 9.4-9.5. , PostgreSQL, , . , , .



WAL-G , Database management. .


TODO. , , pull request, .




! ! , WAL-delta, , , full-page writes. , ? . , FPW ?


Full-page writes , . . . , , . , , , . FPW . , .


! . – ?


pull request. SSD NMVE . , . , . , , , . , pull request. ( 0.2.13)


. , WAL-G , . . ?


, , . , , . , . , , – Go.


! ! WAL-G GPG . , . - ? .


GitHub, .


. . ?


, WAL-G , , : « , ?». , . . . , , . GPG , . GPG, open PGP, WAL-G, . Libsodium ( 0.2.15). , , – , . - . (PGP encryption without external GPG — v0.2.9)


! ! . , pg_basebackup WAL log , . . . - ?


, .


, .


. . , issue GitHub?


, .


, Google Summer of Code, , , .


. issue GitHub. , -, . restore. , . issues. , . . , .


, - (CEPH) , . ? retry . . - , , . , , . retry — exponential backoff. , , . . . , . ? , , . , , , .


SLA? , ?


, , , . . . Amazon Google Cloud, Yandex Object Storage .


?


. - , , WAL-G. , . Object Storage, - listing . , folder. WAL-G – - , , , , . . . , , Object Storage - , .


Mail .


reproduce…



reproduce, , , retry , , . , , . , . . 16 , retry 8 , 4 , 2 . . - 7,5 , 7,5 . .


! workflow WAL-G? , , . , . , , . - delta- , . . - ?


API delta- . – max delta steps, . . , , backup-push, . , , 3, , backup-push, . , 3 .


. . , WAL-G, ?


, WAL-G, , .


, , pg_basebackup?


, , . Pg_basebackup . WAL-G , . warning, .


Pg_basebackup .


, . Pg_basebackup . , , , . pg_basebackup . , , .


, CephFS. Object Storage .


, , , . .


! . remote storage, , - -?


– . , , . . . , . 0.2. , . . . WAL-E, . delta-backup. . , , Google Cloud, S3- storage.


, . , WAL-G – - barmen? ?


, . WAL-G , , . , . , - , . , , . WAL-G . - , .


, storage. , , , , . , - . . , , . , - . . , , . - , , – , .


PD Se ha lanzado una nueva versión 0.2.15 , en la que puede utilizar el archivo de configuración .walg.json, que se encuentra por defecto en el directorio de inicio de postgres. Puede optar por no bash scripts. Un ejemplo de .walg.json está en este tema https://github.com/wal-g/wal-g/issues/545


Vídeo:



All Articles