{"id":297936,"date":"2020-01-30T09:00:24","date_gmt":"2020-01-30T09:00:24","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=297936"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2020-01-30T09:00:24","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=297936","title":{"rendered":"\u0417\u043d\u0430\u043a\u043e\u043c\u0441\u0442\u0432\u043e \u0441 wal-g \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u0431\u0435\u043a\u0430\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f PostgreSQL"},"content":{"rendered":"\n<div class=\"post__text post__text-html\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/486188\/\">\n<p><a href=\"https:\/\/github.com\/wal-g\/wal-g\" rel=\"nofollow\">WAL-G<\/a> \u2014 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u043e\u0433\u043e \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f PostgreSQL \u0432 \u043e\u0431\u043b\u0430\u043a\u0430. \u041f\u043e \u0441\u0432\u043e\u0435\u0439 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043e\u043d \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0430\u0441\u043b\u0435\u0434\u043d\u0438\u043a\u043e\u043c \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0433\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 <a href=\"https:\/\/github.com\/wal-e\/wal-e\" rel=\"nofollow\">WAL-E<\/a>, \u043d\u043e \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u043c \u043d\u0430 Go. \u041d\u043e \u0432 WAL-G \u0435\u0441\u0442\u044c \u043e\u0434\u043d\u0430 \u0432\u0430\u0436\u043d\u0430\u044f \u043d\u043e\u0432\u0430\u044f \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u2014 \u0434\u0435\u043b\u044c\u0442\u0430-\u043a\u043e\u043f\u0438\u0438. \u0414\u0435\u043b\u044c\u0442\u0430-\u043a\u043e\u043f\u0438\u0438 <a href=\"https:\/\/github.com\/wal-g\/wal-g\" rel=\"nofollow\">WAL-G<\/a> \u0445\u0440\u0430\u043d\u044f\u0442 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0444\u0430\u0439\u043b\u043e\u0432, \u0438\u0437\u043c\u0435\u043d\u0438\u0432\u0448\u0438\u0435\u0441\u044f \u0441 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u043e\u0439 \u043a\u043e\u043f\u0438\u0438. \u0412 WAL-G \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043c\u043d\u043e\u0433\u043e \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0439 \u043f\u043e \u0440\u0430\u0441\u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u0438\u0432\u0430\u043d\u0438\u044e \u0431\u044d\u043a\u0430\u043f\u043e\u0432. WAL-G \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0447\u0435\u043c, WAL-E.<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0431\u043e\u0442\u044b wal-g \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432 \u0441\u0442\u0430\u0442\u044c\u0435: <a href=\"https:\/\/habr.com\/ru\/company\/yandex\/blog\/415817\/\">\u0420\u0430\u0437\u0433\u043e\u043d\u044f\u0435\u043c \u0431\u044d\u043a\u0430\u043f. \u041b\u0435\u043a\u0446\u0438\u044f \u042f\u043d\u0434\u0435\u043a\u0441\u0430<\/a> <\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u043e\u0442\u043e\u043a\u043e\u043b \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f S3 \u0441\u0442\u0430\u043b \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u043c \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445. \u041e\u0434\u043d\u043e \u0438\u0437 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432 S3 \u2014 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0447\u0435\u0440\u0435\u0437 API, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0433\u0438\u0431\u043a\u043e\u0435 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435\u043c, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043d\u0430 \u0447\u0442\u0435\u043d\u0438\u0435, \u0432 \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u0430\u043a \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0432 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438 \u043b\u0438\u0446\u0430\u043c\u0438.<\/p>\n<p>  <\/p>\n<p>\u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u0430\u043a \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0445, \u0442\u0430\u043a \u0438 \u0447\u0430\u0441\u0442\u043d\u044b\u0445 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449, \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0445 \u043f\u043e \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0443 S3. \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u043c\u0430\u043b\u044b\u0445 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449 \u2014 Minio.<\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f wal-g \u043f\u043e\u0434\u043e\u0439\u0434\u0435\u0442 \u043e\u0434\u0438\u043d \u0441\u0435\u0440\u0432\u0435\u0440 PostgreSQL, \u0430 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0437\u0430\u043c\u0435\u043d\u044b S3 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f Minio.<\/p>\n<p>  <\/p>\n<h2 id=\"server-minio\">\u0421\u0435\u0440\u0432\u0435\u0440 Minio<\/h2>\n<p>  <\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Minio<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">yum -y install yum-plugin-copr yum copr enable -y lkiesow\/minio yum install -y minio<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0430\u0432\u0438\u043c AccessKey \u0438 SecretKey \u0432 \/etc\/minio\/minio.conf<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">vi \/etc\/minio\/minio.conf<\/code><\/pre>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u0431\u0443\u0434\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c nginx \u043f\u0435\u0440\u0435\u0434 Minio, \u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">--address 127.0.0.1:9000<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"plaintext\">--address 0.0.0.0:9000<\/code><\/pre>\n<p>  <\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c Minio<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">systemctl start minio<\/code><\/pre>\n<p>  <\/p>\n<p>\u0417\u0430\u0445\u043e\u0434\u0438\u043c \u0432 web-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 Minio <a href=\"http:\/\/ip-%D0%B0%D0%B4%D1%80%D0%B5%D1%81-%D1%81%D0%B5%D1%80%D0%B2%D0%B5%D1%80%D0%B0-minio:9000\" rel=\"nofollow\">http:\/\/ip-\u0430\u0434\u0440\u0435\u0441-\u0441\u0435\u0440\u0432\u0435\u0440\u0430-minio:9000<\/a> \u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0431\u0430\u043a\u0435\u0442 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, pg-backups).<\/p>\n<p>  <\/p>\n<h2 id=\"server-bd\">\u0421\u0435\u0440\u0432\u0435\u0440 \u0411\u0414<\/h2>\n<p>  <\/p>\n<p>WAL-G \u0432 rpm \u0441\u043e\u0431\u0438\u0440\u0430\u044e \u044f (\u0410\u043d\u0442\u043e\u043d \u041f\u0430\u0446\u0435\u0432). <a href=\"https:\/\/github.com\/patsevanton\/wal-g-rpm\" rel=\"nofollow\">Github<\/a>, <a href=\"https:\/\/copr.fedorainfracloud.org\/coprs\/antonpatsev\/wal-g\/\" rel=\"nofollow\">Fedora COPR<\/a>.<\/p>\n<p>  <\/p>\n<p>\u0423 \u043a\u043e\u0433\u043e \u043d\u0435 RPM-based \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u0443\u044e <a href=\"https:\/\/github.com\/wal-g\/wal-g#installation\" rel=\"nofollow\">\u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e<\/a> \u043f\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435.<\/p>\n<p>  <\/p>\n<p>\u0412\u043c\u0435\u0441\u0442\u0435 \u0441 \u0431\u0438\u043d\u0430\u0440\u043d\u0438\u043a\u043e\u043c wal-g \u0432 rpm \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0441\u043a\u0440\u0438\u043f\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u044e\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0438\u0437 \u0444\u0430\u0439\u043b\u0430 \/etc\/wal-g.d\/server-s3.conf.<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">backup-fetch.sh backup-list.sh backup-push.sh wal-fetch.sh wal-g-run.sh wal-push.sh<\/code><\/pre>\n<p>  <\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c wal-g.<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">yum -y install yum-plugin-copr yum copr enable -y antonpatsev\/wal-g yum install -y wal-g<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0432\u0435\u0440\u0441\u0438\u044e wal-g.<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">wal-g --version wal-g version v0.2.14<\/code><\/pre>\n<p>  <\/p>\n<p>\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0435\u043c \/etc\/wal-g.d\/server-s3.conf \u043f\u043e \u0441\u0432\u043e\u0438 \u043d\u0443\u0436\u0434\u044b.<\/p>\n<p>  <\/p>\n<p>\u0424\u0430\u0439\u043b\u044b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0438 \u0444\u0430\u0439\u043b\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u043c \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u043e \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432\u043c\u0435\u0441\u0442\u0435 \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0431\u044b\u0447\u043d\u043e \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442 <code>PGDATA<\/code><\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">#!\/bin\/bash  export PG_VER=&quot;9.6&quot;  export WALE_S3_PREFIX=&quot;s3:\/\/pg-backups&quot; # \u0431\u0430\u043a\u0435\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u0432 S3 export AWS_ACCESS_KEY_ID=&quot;xxxx&quot; # AccessKey \u0438\u0437 \/etc\/minio\/minio.conf  export AWS_ENDPOINT=&quot;http:\/\/ip-\u0430\u0434\u0440\u0435\u0441-\u0441\u0435\u0440\u0432\u0435\u0440\u0430-minio:9000&quot; export AWS_S3_FORCE_PATH_STYLE=&quot;true&quot; export AWS_SECRET_ACCESS_KEY=&quot;yyyy&quot; # SecretKey \u0438\u0437 \/etc\/minio\/minio.conf  export PGDATA=\/var\/lib\/pgsql\/$PG_VER\/data\/ export PGHOST=\/var\/run\/postgresql\/.s.PGSQL.5432 # \u0421\u043e\u043a\u0435\u0442 \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a PostgreSQL  export WALG_UPLOAD_CONCURRENCY=2 # \u041a\u043e\u043b-\u0432\u043e \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u0434\u043b\u044f \u0437\u0430\u043a\u0430\u0447\u043a\u0438  export WALG_DOWNLOAD_CONCURRENCY=2 # \u041a\u043e\u043b-\u0432\u043e \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u0434\u043b\u044f \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f export WALG_UPLOAD_DISK_CONCURRENCY=2 # \u041a\u043e\u043b-\u0432\u043e \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u043d\u0430 \u0434\u0438\u0441\u043a\u0435 \u0434\u043b\u044f \u0437\u0430\u043a\u0430\u0447\u043a\u0438 export WALG_DELTA_MAX_STEPS=7 export WALG_COMPRESSION_METHOD=brotli # \u041a\u0430\u043a\u043e\u0439 \u043c\u0435\u0442\u043e\u0434 \u0441\u0436\u0430\u0442\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c. <\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 WAL-G \u0432\u044b \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0435 WALG_DELTA_MAX_STEPS \u2014 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0448\u0430\u0433\u043e\u0432, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043e\u0442\u0441\u0442\u043e\u0438\u0442 \u043e\u0442 base-\u0431\u044d\u043a\u0430\u043f\u0430 \u0434\u0435\u043b\u044c\u0442\u0430-\u0431\u044d\u043a\u0430\u043f, \u0438 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0435 \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0443 \u0434\u0435\u043b\u044c\u0442\u0430-\u043a\u043e\u043f\u0438\u0438. \u041b\u0438\u0431\u043e \u0432\u044b \u0434\u0435\u043b\u0430\u0435\u0442\u0435 \u043a\u043e\u043f\u0438\u044e \u0441 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u0434\u0435\u043b\u044c\u0442\u044b, \u043b\u0438\u0431\u043e \u0434\u0435\u043b\u0430\u0435\u0442\u0435 \u0434\u0435\u043b\u044c\u0442\u0443 \u043e\u0442 \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u043d\u043e\u0433\u043e \u0431\u044d\u043a\u0430\u043f\u0430. \u042d\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u043d\u0430 \u0442\u043e\u0442 \u0441\u043b\u0443\u0447\u0430\u0439, \u043a\u043e\u0433\u0434\u0430 \u0443 \u0432\u0430\u0441 \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u0441\u0435\u0433\u0434\u0430 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043e\u0434\u043d\u0430 \u0438 \u0442\u0430 \u0436\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0430\u044f \u0411\u0414, \u043e\u0434\u043d\u0438 \u0438 \u0442\u0435 \u0436\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f.<\/p>\n<p>  <\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0411\u0414.<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">yum install -y https:\/\/download.postgresql.org\/pub\/repos\/yum\/reporpms\/EL-7-x86_64\/pgdg-redhat-repo-latest. noarch.rpm yum install -y postgresql96 postgresql96-server mc<\/code><\/pre>\n<p>  <\/p>\n<p>\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0431\u0434.<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">\/usr\/pgsql-9.6\/bin\/postgresql96-setup initdb Initializing database ... OK<\/code><\/pre>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u0442\u0435 \u043d\u0430 1 \u0441\u0435\u0440\u0432\u0435\u0440\u0435, \u0442\u043e \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 wal_level \u043d\u0430 archive \u0434\u043b\u044f PostgreSQL \u043c\u0435\u043d\u044c\u0448\u0435 10 \u0432\u0435\u0440\u0441\u0438\u0438, \u0438 replica \u0434\u043b\u044f PostgreSQL 10 \u0432\u0435\u0440\u0441\u0438\u0438 \u0438 \u0441\u0442\u0430\u0440\u0448\u0435.<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">wal_level = archive<\/code><\/pre>\n<p>  <\/p>\n<p>\u0421\u0434\u0435\u043b\u0430\u0435\u043c \u0431\u0435\u043a\u0430\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 WAL \u0430\u0440\u0445\u0438\u0432\u043e\u0432 \u043a\u0430\u0436\u0434\u044b\u0435 60 \u0441\u0435\u043a\u0443\u043d\u0434 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0430\u043c\u043e\u0433\u043e PostgreSQL. \u041d\u0430 \u043f\u0440\u043e\u0434\u0435 \u0443 \u0432\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u0434\u0440\u0443\u0433\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 archive_timeout.<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">archive_mode = on archive_command = '\/usr\/local\/bin\/wal-push.sh %p' archive_timeout = 60 # \u041a\u0430\u0436\u0434\u044b\u0435 60 \u0441\u0435\u043a\u0443\u043d\u0434 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 archive_command.<\/code><\/pre>\n<p>  <\/p>\n<p>\u0421\u0442\u0430\u0440\u0442\u0443\u0435\u043c PostgreSQL<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">systemctl start postgresql-9.6<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043b\u043e\u0433\u0438 PostgreSQL \u043d\u0430 \u043f\u0440\u0435\u0434\u043c\u0435\u0442 \u043e\u0448\u0438\u0431\u043e\u043a: (postgresql-Wed.log \u043c\u0435\u043d\u044f\u0435\u0442\u0435 \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u0439).<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">tail -fn100 \/var\/lib\/pgsql\/9.6\/data\/pg_log\/postgresql-Wed.log<\/code><\/pre>\n<p>  <\/p>\n<p>\u0417\u0430\u0445\u043e\u0434\u0438\u043c \u0432 psql.<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">su - postgres psql<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 psql \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0411\u0414.<\/p>\n<p>  <\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0432 \u0431\u0434 test1.<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">create database test1;<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u0441\u044f \u043d\u0430 \u0431\u0434 test.<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">postgres=# \\c test1;<\/code><\/pre>\n<p>  <\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0442\u0430\u0431\u043b\u0438\u0446\u0443 indexing_table.<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">test1=# CREATE TABLE indexing_table(created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW());<\/code><\/pre>\n<p>  <\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>  <\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0432\u0441\u0442\u0430\u0432\u043a\u0443 \u0434\u0430\u043d\u043d\u044b\u0445. \u0416\u0434\u0435\u043c 10-20 \u043c\u0438\u043d\u0443\u0442.<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">#!\/bin\/bash # postgres while true; do psql -U postgres -d test1 -c &quot;INSERT INTO indexing_table(created_at) VALUES (CURRENT_TIMESTAMP);&quot; sleep 60; done<\/code><\/pre>\n<p>  <\/p>\n<p>\u041e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u0435\u043b\u0430\u0435\u043c \u043f\u043e\u043b\u043d\u044b\u0439 \u0431\u0435\u043a\u0430\u043f.<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">su - postgres \/usr\/local\/bin\/backup-push.sh<\/code><\/pre>\n<p>  <\/p>\n<p>\u0421\u043c\u043e\u0442\u0440\u0438\u043c \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0432 \u0431\u0434 test1<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">select * from indexing_table; 2020-01-29 09:41:25.226198+ 2020-01-29 09:42:25.336989+ 2020-01-29 09:43:25.356069+ 2020-01-29 09:44:25.37381+ 2020-01-29 09:45:25.392944+ 2020-01-29 09:46:25.412327+ 2020-01-29 09:47:25.432564+ 2020-01-29 09:48:25.451985+ 2020-01-29 09:49:25.472653+ 2020-01-29 09:50:25.491974+ 2020-01-29 09:51:25.510178+<\/code><\/pre>\n<p>  <\/p>\n<p>\u0421\u0442\u0440\u043e\u043a\u0430 \u044d\u0442\u043e \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u0432\u0440\u0435\u043c\u044f.<\/p>\n<p>  <\/p>\n<h3 id=\"smotrim-spisok-polnyh-bekapov\">\u0421\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u043e\u043b\u043d\u044b\u0445 \u0431\u0435\u043a\u0430\u043f\u043e\u0432<\/h3>\n<p>  <\/p>\n<pre><code class=\"plaintext\">\/usr\/local\/bin\/backup-list.sh<\/code><\/pre>\n<p>  <\/p>\n<h3 id=\"testirovanie-vosstanovleniya\">\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f<\/h3>\n<p>  <\/p>\n<h4 id=\"polnoe-vosstanovlenie-s-nakatyvaem-vseh-dostupnyh-wal\">\u041f\u043e\u043b\u043d\u043e\u0435 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0441 \u043d\u0430\u043a\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u0432\u0441\u0435\u0445 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 WAL.<\/h4>\n<p>  <\/p>\n<p>\u041e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c Postgresql.<\/p>\n<p>  <\/p>\n<p>\u0423\u0434\u0430\u043b\u044f\u0435\u043c \u0432\u0441\u0435 \u0438\u0437 \u043f\u0430\u043f\u043a\u0438 \/var\/lib\/pgsql\/9.6\/data.<\/p>\n<p>  <\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0441\u043a\u0440\u0438\u043f\u0442 \/usr\/local\/bin\/backup-fetch.sh \u043e\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f postgres.<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">su - postgres \/usr\/local\/bin\/backup-fetch.sh<\/code><\/pre>\n<p>  <\/p>\n<p>Backup extraction complete.<\/p>\n<p>  <\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c recovery.conf \u0432 \u043f\u0430\u043f\u043a\u0443 \/var\/lib\/pgsql\/9.6\/data \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c.<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">restore_command = '\/usr\/local\/bin\/wal-fetch.sh &quot;%f&quot; &quot;%p&quot;'<\/code><\/pre>\n<p>  <\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c PostgreSQL. PostgreSQL \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 recovery \u0438\u0437 \u0430\u0440\u0445\u0438\u0432\u043d\u044b\u0445 WAL, \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0442\u043e\u043c \u0431\u0430\u0437\u0430 \u043e\u0442\u043a\u0440\u043e\u0435\u0442\u0441\u044f. <\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">systemctl start postgresql-9.6 tail -fn100 \/var\/lib\/pgsql\/9.6\/data\/pg_log\/postgresql-Wed.log<\/code><\/pre>\n<p>  <\/p>\n<h4 id=\"vosstanovlenie-na-opredelennoe-vremya\">\u0412\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f.<\/h4>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u043c \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0431\u0430\u0437\u0443 \u0434\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u043c\u0438\u043d\u0443\u0442\u044b, \u0442\u043e \u0432 recovery.conf \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 recovery_target_time \u2014 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043d\u0430 \u043a\u0430\u043a\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0431\u0430\u0437\u0443.<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">restore_command = '\/usr\/local\/bin\/wal-fetch.sh &quot;%f&quot; &quot;%p&quot;' recovery_target_time = '2020-01-29 09:46:25'<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 indexing_table<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\"> 2020-01-29 09:41:25.226198+00  2020-01-29 09:42:25.336989+00  2020-01-29 09:43:25.356069+00  2020-01-29 09:44:25.37381+00  2020-01-29 09:45:25.392944+00<\/code><\/pre>\n<p>  <\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c PostgreSQL. PostgreSQL \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 recovery \u0438\u0437 \u0430\u0440\u0445\u0438\u0432\u043d\u044b\u0445 WAL, \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0442\u043e\u043c \u0431\u0430\u0437\u0430 \u043e\u0442\u043a\u0440\u043e\u0435\u0442\u0441\u044f. <\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">systemctl start postgresql-9.6 tail -fn100 \/var\/lib\/pgsql\/9.6\/data\/pg_log\/postgresql-Wed.log<\/code><\/pre>\n<p>  <\/p>\n<h3 id=\"testirovanie\">\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/h3>\n<p>  <\/p>\n<p>\u0413\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c 1GB \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u043a\u0430\u043a \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u0442\u0443\u0442 <a href=\"https:\/\/gist.github.com\/ololobus\/5b25c432f208d7eb31051a5f238dffff\" rel=\"nofollow\">https:\/\/gist.github.com\/ololobus\/5b25c432f208d7eb31051a5f238dffff<\/a><\/p>\n<p>  <\/p>\n<p>\u0417\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u043c \u0440\u0430\u0437\u043c\u0435\u0440 \u0431\u0430\u043a\u0435\u0442\u0430 \u043f\u043e\u0441\u043b\u0435 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 1GB \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">postgres=# SELECT pg_size_pretty(pg_database_size('test1')); pg_size_pretty ---------------- 1003 MB<\/code><\/pre>\n<p>  <\/p>\n<p>s4cmd \u2014 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438, \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u043c\u0438 \u0432 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 Amazon S3. \u0423\u0442\u0438\u043b\u0438\u0442\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f python, \u0438 \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u044d\u0442\u043e\u043c\u0443 \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445 \u0438 Windows, \u0438 Linux.<\/p>\n<p>  <\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c s4cmd<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">pip install s4cmd<\/code><\/pre>\n<p>  <\/p>\n<h4 id=\"lz4\">LZ4<\/h4>\n<p>  <\/p>\n<pre><code class=\"plaintext\">s4cmd --endpoint-url=http:\/\/ip-\u0430\u0434\u0440\u0435\u0441-\u0441\u0435\u0440\u0432\u0435\u0440\u0430-minio:9000 --access-key=xxxx --secret-key=yyyy du -r s3:\/\/pg-backups 840540822       s3:\/\/pg-backups\/wal_005\/ 840 \u041c\u0411 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 lz4 \u0442\u043e\u043b\u044c\u043a\u043e WAL \u043b\u043e\u0433\u043e\u0432  \u041f\u043e\u043b\u043d\u044b\u0439 \u0431\u0435\u043a\u0430\u043f \u0441 lz4 - 1GB \u0434\u0430\u043d\u043d\u044b\u0445 time backup_push.sh real 0m18.582s  \u0420\u0430\u0437\u043c\u0435\u0440 S3 \u0431\u0430\u043a\u0435\u0442\u0430 \u043f\u043e\u0441\u043b\u0435 \u043f\u043e\u043b\u043d\u043e\u0433\u043e \u0431\u0435\u043a\u0430\u043f\u0430  581480085       s3:\/\/pg-backups\/basebackups_005\/ 842374424   s3:\/\/pg-backups\/wal_005 581 \u041c\u0411 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043f\u043e\u043b\u043d\u044b\u0439 \u0431\u0435\u043a\u0430\u043f<\/code><\/pre>\n<p>  <\/p>\n<h4 id=\"lzma\">LZMA<\/h4>\n<p>  <\/p>\n<pre><code class=\"plaintext\">\u041f\u043e\u0441\u043b\u0435 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 1\u0413\u0411 \u0434\u0430\u043d\u043d\u044b\u0445 338413694       s3:\/\/pg-backups\/wal_005\/ 338 \u043c\u0431 \u043b\u043e\u0433\u043e\u0432 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 lzma  \u0412\u0440\u0435\u043c\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043f\u043e\u043b\u043d\u043e\u0433\u043e \u0431\u0435\u043a\u0430\u043f\u0430 time backup_push.sh real    5m25.054s  \u0420\u0430\u0437\u043c\u0435\u0440 \u0431\u0430\u043a\u0435\u0442\u0430 \u0432 S3 270310495       s3:\/\/pg-backups\/basebackups_005\/ 433485092   s3:\/\/pg-backups\/wal_005\/  270 \u043c\u0431 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043f\u043e\u043b\u043d\u044b\u0439 \u0431\u0435\u043a\u0430\u043f \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 lzma<\/code><\/pre>\n<p>  <\/p>\n<h4 id=\"brotli\">Brotli<\/h4>\n<p>  <\/p>\n<pre><code class=\"plaintext\">\u041f\u043e\u0441\u043b\u0435 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 1\u0413\u0411 \u0434\u0430\u043d\u043d\u044b\u0445 459229886       s3:\/\/pg-backups\/wal_005\/ 459 \u043c\u0431 \u043b\u043e\u0433\u043e\u0432 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 brotli  \u0412\u0440\u0435\u043c\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043f\u043e\u043b\u043d\u043e\u0433\u043e \u0431\u0435\u043a\u0430\u043f\u0430 real    0m23.408s  \u0420\u0430\u0437\u043c\u0435\u0440 \u0431\u0430\u043a\u0435\u0442\u0430 \u0432 S3 312960942       s3:\/\/pg-backups\/basebackups_005\/ 459309262   s3:\/\/pg-backups\/wal_005\/  312 \u043c\u0431 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043f\u043e\u043b\u043d\u044b\u0439 \u0431\u0435\u043a\u0430\u043f \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 brotli <\/code><\/pre>\n<p>  <\/p>\n<p>\u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u043d\u0430 \u0433\u0440\u0430\u0444\u0438\u043a\u0435.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ry\/zd\/p6\/ryzdp6nq8jdqbextit_kzisxvd4.png\"><\/p>\n<p>  <\/p>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e Brotli \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043c \u043f\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0443 \u0441 LZMA, \u043d\u043e \u0431\u0435\u043a\u0430\u043f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0437\u0430 \u0432\u0440\u0435\u043c\u044f LZ4.<\/p>\n<p>  <\/p>\n<p>\u0427\u0430\u0442 \u0440\u0443\u0441\u0441\u043a\u043e\u044f\u0437\u044b\u0447\u043d\u043e\u0433\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430 PostgreSQL: <a href=\"https:\/\/t.me\/pgsql\" rel=\"nofollow\">https:\/\/t.me\/pgsql<\/a><\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u0442\u0430\u0432\u044c\u0442\u0435, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0437\u0432\u0435\u0437\u0434\u0443 \u043d\u0430 Github, \u0435\u0441\u043b\u0438 \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 <a href=\"https:\/\/github.com\/wal-g\/wal-g\" rel=\"nofollow\">wal-g<\/a><\/p>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/486188\/\"> https:\/\/habr.com\/ru\/post\/486188\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/486188\/\">\n<p><a href=\"https:\/\/github.com\/wal-g\/wal-g\" rel=\"nofollow\">WAL-G<\/a> \u2014 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u043e\u0433\u043e \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f PostgreSQL \u0432 \u043e\u0431\u043b\u0430\u043a\u0430. \u041f\u043e \u0441\u0432\u043e\u0435\u0439 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043e\u043d \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0430\u0441\u043b\u0435\u0434\u043d\u0438\u043a\u043e\u043c \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0433\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 <a href=\"https:\/\/github.com\/wal-e\/wal-e\" rel=\"nofollow\">WAL-E<\/a>, \u043d\u043e \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u043c \u043d\u0430 Go. \u041d\u043e \u0432 WAL-G \u0435\u0441\u0442\u044c \u043e\u0434\u043d\u0430 \u0432\u0430\u0436\u043d\u0430\u044f \u043d\u043e\u0432\u0430\u044f \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u2014 \u0434\u0435\u043b\u044c\u0442\u0430-\u043a\u043e\u043f\u0438\u0438. \u0414\u0435\u043b\u044c\u0442\u0430-\u043a\u043e\u043f\u0438\u0438 <a href=\"https:\/\/github.com\/wal-g\/wal-g\" rel=\"nofollow\">WAL-G<\/a> \u0445\u0440\u0430\u043d\u044f\u0442 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0444\u0430\u0439\u043b\u043e\u0432, \u0438\u0437\u043c\u0435\u043d\u0438\u0432\u0448\u0438\u0435\u0441\u044f \u0441 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u043e\u0439 \u043a\u043e\u043f\u0438\u0438. \u0412 WAL-G \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043c\u043d\u043e\u0433\u043e \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0439 \u043f\u043e \u0440\u0430\u0441\u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u0438\u0432\u0430\u043d\u0438\u044e \u0431\u044d\u043a\u0430\u043f\u043e\u0432. WAL-G \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0447\u0435\u043c, WAL-E.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-297936","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/297936","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=297936"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/297936\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=297936"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=297936"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=297936"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}