{"id":445989,"date":"2025-01-23T15:05:56","date_gmt":"2025-01-23T15:05:56","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=445989"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=445989","title":{"rendered":"<span>\u0420\u0435\u0432\u0438\u0437\u043e\u0440 \u043f\u0440\u0438\u0435\u0445\u0430\u043b: pg_anon \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442, \u0432\u0441\u0451 \u043b\u0438 \u0441\u043a\u0440\u044b\u0442\u043e<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/po\/x9\/xa\/pox9xaumzdekuhw7euql7jsrrny.png\" data-src=\"https:\/\/habrastorage.org\/webt\/po\/x9\/xa\/pox9xaumzdekuhw7euql7jsrrny.png\"\/><\/figure>\n<p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e: \u043f\u044f\u0442\u043d\u0438\u0446\u0430, \u043a\u043e\u043d\u0435\u0446 \u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e \u0434\u043d\u044f. \u0412\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0435\u0441\u044c \u0434\u043e\u043c\u043e\u0439, \u043a\u0430\u043a \u0432\u0434\u0440\u0443\u0433 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043e\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438: &#171;\u0423 \u043d\u0430\u0441 \u0441\u0442\u0440\u0430\u043d\u043d\u044b\u0439 \u0431\u0430\u0433 \u0432 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d\u0435, \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e. \u041c\u043e\u0436\u043d\u043e \u0441\u0432\u0435\u0436\u0438\u0439 \u0434\u0430\u043c\u043f \u0431\u043e\u0435\u0432\u043e\u0439 \u0431\u0430\u0437\u044b?&#187;. \u0417\u043d\u0430\u043a\u043e\u043c\u043e, \u043f\u0440\u0430\u0432\u0434\u0430?<\/p>\n<p>\u0412 2007 \u0433\u043e\u0434\u0443, \u043a\u043e\u0433\u0434\u0430 \u044f \u043d\u0430\u0447\u0438\u043d\u0430\u043b \u043a\u0430\u0440\u044c\u0435\u0440\u0443 \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u0430, \u0432\u043e \u043c\u043d\u043e\u0433\u0438\u0445 \u0441\u0440\u0435\u0434\u043d\u0438\u0445 \u0438 \u0434\u0430\u0436\u0435 \u043a\u0440\u0443\u043f\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f\u0445 \u043d\u0435\u0431\u0440\u0435\u0436\u043d\u043e\u0435 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u043a \u0434\u0430\u043d\u043d\u044b\u043c \u0431\u044b\u043b\u043e \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u043c \u044f\u0432\u043b\u0435\u043d\u0438\u0435\u043c. \u0420\u0430\u0431\u043e\u0442\u0430\u044f \u0432 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0437\u0430\u0440\u0443\u0431\u0435\u0436\u043d\u043e\u0439 \u0418\u0422-\u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438, \u044f \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u043b, \u043a\u0430\u043a \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0443\u0440\u043e\u0432\u043d\u044f middle \u0438 senior \u0441\u043f\u043e\u043a\u043e\u0439\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u043a\u043e\u043f\u0438\u0438 \u043f\u0440\u043e\u0434\u043e\u0432\u044b\u0445 \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043d\u0435 \u0437\u0430\u0434\u0443\u043c\u044b\u0432\u0430\u044f\u0441\u044c \u043e \u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u044f\u0445.<\/p>\n<p>\u0422\u0430\u043a\u0430\u044f \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0430 \u0432\u0441\u043a\u043e\u0440\u0435 \u043f\u0440\u0438\u0432\u0435\u043b\u0430 \u043a \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u043d\u044b\u043c \u0443\u0442\u0435\u0447\u043a\u0430\u043c \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0434\u0440\u0443\u0433\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0434\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0439. \u0420\u0435\u0433\u0443\u043b\u044f\u0442\u043e\u0440\u044b \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u0442\u0440\u0430\u043d\u0430\u0445 \u043e\u0442\u0440\u0435\u0430\u0433\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0443\u0436\u0435\u0441\u0442\u043e\u0447\u0435\u043d\u0438\u0435\u043c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f, \u0447\u0442\u043e \u043f\u043e\u0432\u043b\u0435\u043a\u043b\u043e \u0437\u0430 \u0441\u043e\u0431\u043e\u0439 \u043c\u043d\u043e\u0433\u043e\u043c\u0438\u043b\u043b\u0438\u043e\u043d\u043d\u044b\u0435 \u0448\u0442\u0440\u0430\u0444\u044b, \u0441\u0443\u0434\u0435\u0431\u043d\u044b\u0435 \u0438\u0441\u043a\u0438 \u043e\u0442 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u0438 \u0441\u0435\u0440\u044c\u0435\u0437\u043d\u044b\u0435 \u0440\u0435\u043f\u0443\u0442\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u043f\u043e\u0442\u0435\u0440\u0438 \u0434\u043b\u044f \u0431\u0438\u0437\u043d\u0435\u0441\u0430. \u0412\u0441\u0435\u0445 \u044d\u0442\u0438\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c, \u0435\u0441\u043b\u0438 \u0431\u044b \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0443\u0434\u0435\u043b\u044f\u043b\u0438 \u0434\u043e\u043b\u0436\u043d\u043e\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0432\u043d\u0435\u0434\u0440\u044f\u043b\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b \u0438\u0445 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/fm\/_x\/hw\/fm_xhwxp1no4gt_y5ftrtfydks8.png\" data-src=\"https:\/\/habrastorage.org\/webt\/fm\/_x\/hw\/fm_xhwxp1no4gt_y5ftrtfydks8.png\"\/><\/figure>\n<p>\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u044d\u0442\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u0430 \u043a\u0430\u043a \u043d\u0438\u043a\u043e\u0433\u0434\u0430. \u041f\u043e\u0447\u0435\u043c\u0443? \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0442\u0440\u0435\u043d\u0434\u044b:<\/p>\n<p><strong>\u0420\u043e\u0441\u0442 \u043e\u0431\u044a\u0451\u043c\u0430 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445<\/strong><\/p>\n<ul>\n<li>\n<p>\u0412 2023 \u0433\u043e\u0434\u0443 \u0441\u0440\u0435\u0434\u043d\u0438\u0439 \u043e\u043d\u043b\u0430\u0439\u043d-\u0441\u0435\u0440\u0432\u0438\u0441 \u0445\u0440\u0430\u043d\u0438\u0442 \u0432 3-4 \u0440\u0430\u0437\u0430 \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e \u043a\u0430\u0436\u0434\u043e\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435, \u0447\u0435\u043c \u043f\u044f\u0442\u044c \u043b\u0435\u0442 \u043d\u0430\u0437\u0430\u0434<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043d\u043e\u0432\u044b\u0435 \u0442\u0438\u043f\u044b \u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438: \u0431\u0438\u043e\u043c\u0435\u0442\u0440\u0438\u044f, \u0438\u0441\u0442\u043e\u0440\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u0439, \u043c\u0435\u0434\u0438\u0446\u0438\u043d\u0441\u043a\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u0423\u0436\u0435\u0441\u0442\u043e\u0447\u0435\u043d\u0438\u0435 \u0437\u0430\u043a\u043e\u043d\u043e\u0434\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430<\/strong><\/p>\n<ul>\n<li>\n<p>GDPR \u0432 \u0415\u0432\u0440\u043e\u043f\u0435: \u0448\u0442\u0440\u0430\u0444\u044b \u0434\u043e 20 \u043c\u043b\u043d \u0435\u0432\u0440\u043e \u0438\u043b\u0438 4% \u0433\u043e\u0434\u043e\u0432\u043e\u0433\u043e \u043e\u0431\u043e\u0440\u043e\u0442\u0430<\/p>\n<\/li>\n<li>\n<p>152-\u0424\u0417 \u0432 \u0420\u043e\u0441\u0441\u0438\u0438: \u0441 \u043a\u0430\u0436\u0434\u044b\u043c \u0433\u043e\u0434\u043e\u043c \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a \u0437\u0430\u0449\u0438\u0442\u0435 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0442\u0441\u044f \u0441\u0442\u0440\u043e\u0436\u0435<\/p>\n<\/li>\n<li>\n<p>CCPA \u0432 \u041a\u0430\u043b\u0438\u0444\u043e\u0440\u043d\u0438\u0438: \u043d\u043e\u0432\u044b\u0439 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442 \u0437\u0430\u0449\u0438\u0442\u044b \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u0430\u043c\u0435\u0440\u0438\u043a\u0430\u043d\u0441\u043a\u043e\u0433\u043e \u0440\u044b\u043d\u043a\u0430<\/p>\n<\/li>\n<\/ul>\n<p>\u041c\u043e\u044f \u043f\u0435\u0434\u0430\u0433\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0434\u0435\u044f\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043c\u043d\u0435 \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043b\u044b\u0448\u0430\u0442\u044c \u0437\u0430\u0431\u0430\u0432\u043d\u044b\u0435 \u0436\u0438\u0442\u0435\u0439\u0441\u043a\u0438\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b \u043e\u0442 \u043c\u043e\u0438\u0445 \u0441\u0442\u0443\u0434\u0435\u043d\u0442\u043e\u0432. \u041f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435 \u0441\u044e\u0436\u0435\u0442\u044b \u043c\u043e\u0436\u043d\u043e \u0443\u043b\u043e\u0436\u0438\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0430\u043d\u0435\u043a\u0434\u043e\u0442:  \u201c\u041d\u0430\u0448\u0438 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0438\/\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0438\/\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e \u0432\u044b\u0433\u0440\u0443\u0436\u0430\u044e\u0442 &#171;\u0431\u043e\u0435\u0432\u044b\u0435&#187; \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0435\u0439\/\u043d\u0430\u0433\u0440\u0443\u0437\u043e\u0447\u043d\u044b\u0445 \u0442\u0435\u0441\u0442\u043e\u0432\/\u043e\u0442\u043b\u0430\u0434\u043a\u0438\u201d. \u0421 \u0432\u0440\u0435\u043c\u0435\u043d \u043c\u043e\u0435\u0439 \u044e\u043d\u043e\u0441\u0442\u0438, \u0432\u0438\u0434\u0438\u043c\u043e, \u043f\u043e\u043c\u0435\u043d\u044f\u043b\u043e\u0441\u044c \u043d\u0435 \u0442\u0430\u043a \u043c\u043d\u043e\u0433\u043e.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0441\u043e\u0432\u0441\u0435\u043c \u0443\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u043e\u0431\u044b\u0447\u043d\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441\u043d\u044f\u0442\u0438\u044f \u0434\u0430\u043c\u043f\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f PostgreSQL \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"bash\"># \u0422\u0438\u043f\u0438\u0447\u043d\u044b\u0439 \"\u043e\u043f\u0430\u0441\u043d\u044b\u0439\" \u043f\u0440\u043e\u0446\u0435\u0441\u0441 pg_dump -h prod-db -U analyst marketplace &gt; dump.sql psql -h localhost -U analyst marketplace_local &lt; dump.sql  <\/code><\/pre>\n<p>\u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c\u0442\u0435: \u0432 \u0431\u0430\u0437\u0435 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0430\u0434\u0440\u0435\u0441\u0430 \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0438, \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u044b \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432, \u0438\u0441\u0442\u043e\u0440\u0438\u044f \u043f\u043e\u043a\u0443\u043f\u043e\u043a. \u0412\u0441\u0451 \u044d\u0442\u043e \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d\u0430\u0445 \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u043e\u0432 \u0431\u0435\u0437 \u043a\u0430\u043a\u043e\u0439-\u043b\u0438\u0431\u043e \u043c\u0430\u0441\u043a\u0438\u0440\u043e\u0432\u043a\u0438. \u041e\u0434\u043d\u0430 \u0443\u0442\u0435\u0447\u043a\u0430 \u2014 \u0438 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f \u0440\u0438\u0441\u043a\u0443\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0448\u0442\u0440\u0430\u0444 \u0432 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u044b \u0440\u0443\u0431\u043b\u0435\u0439.<\/p>\n<p>\u0425\u043e\u0440\u043e\u0448\u0430\u044f \u043d\u043e\u0432\u043e\u0441\u0442\u044c \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0432\u043d\u0435\u0434\u0440\u0438\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043d\u0435 \u0442\u0430\u043a \u0443\u0436 \u0438 \u0441\u043b\u043e\u0436\u043d\u043e, \u0438 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a:<\/p>\n<pre><code class=\"bash\"># \u0411\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441 pg_anon pg_dump -h prod-db -U analyst marketplace &gt; dump.sql pg_anon -c config.yml -i dump.sql -o safe_dump.sql psql -h localhost -U analyst marketplace_local &lt; safe_dump.sql  <\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u00a0<code>config.yml<\/code>\u00a0\u043c\u044b \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043c\u0430\u0441\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445:<\/p>\n<pre><code class=\"yaml\">tables:   users:     phone:       function: 'random_phone'       format: '+7##########'     address:       function: 'regex_replace'       pattern: '^.*$'       replace: '\u0443\u043b. \u0422\u0435\u0441\u0442\u043e\u0432\u0430\u044f, \u0434. #{random(1,100)}'     email:       function: 'regex_replace'       pattern: '(.+)@(.+)'       replace: 'user_#{random_string(8)}@example.com'  <\/code><\/pre>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0442\u0430\u043a\u0438\u0445 \u043d\u0435\u0445\u0438\u0442\u0440\u044b\u0445 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0439 \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442 \u0432\u0441\u0435 \u0432\u0430\u0436\u043d\u044b\u0435 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438 \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430, \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438.<\/p>\n<p>\u042d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u2014 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043c\u043e\u0435\u0433\u043e 15-\u043b\u0435\u0442\u043d\u0435\u0433\u043e \u043e\u043f\u044b\u0442\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0432 \u043a\u0440\u0443\u043f\u043d\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445. \u042f \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u044e\u0441\u044c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043e\u0431\u0449\u0438\u0439 \u0441\u044e\u0436\u0435\u0442, \u043a\u0430\u043a \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u043d-\u0434\u0430\u043d\u043d\u044b\u043c\u0438, \u043d\u0435 \u043c\u0435\u0448\u0430\u044f \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e. \u041c\u044b \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b, \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e \u0442\u0438\u043f\u0438\u0447\u043d\u044b\u0445 \u0433\u0440\u0430\u0431\u043b\u044f\u0445 \u0438 \u044f \u043f\u043e\u0434\u0435\u043b\u044e\u0441\u044c \u0433\u043e\u0442\u043e\u0432\u044b\u043c\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u044f\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u043d\u0435\u0434\u0440\u0438\u0442\u044c \u0443 \u0441\u0435\u0431\u044f \u0443\u0436\u0435 \u0437\u0430\u0432\u0442\u0440\u0430.<\/p>\n<p>\u0411\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c \u2014 \u044d\u0442\u043e \u043d\u0435 \u0442\u043e, \u0447\u0442\u043e \u043c\u0435\u0448\u0430\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c. \u042d\u0442\u043e \u0442\u043e, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043f\u0430\u0442\u044c \u0441\u043f\u043e\u043a\u043e\u0439\u043d\u043e.<\/p>\n<h2>\u0417\u0430\u0447\u0435\u043c \u0442\u0430\u043a \u043c\u043d\u043e\u0433\u043e \u0431\u0443\u043a\u043e\u0432? \u0417\u0430\u0447\u0435\u043c \u0444\u0441\u0435 \u044d\u0442\u043e?<\/h2>\n<h3>\u0417\u0430\u0447\u0435\u043c \u043d\u0443\u0436\u043d\u0430 \u0430\u043d\u043e\u043d\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0432 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435<\/h3>\n<p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442\u0435 \u043d\u0430\u0434 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u043c \u0434\u043b\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u0444\u0438\u043b\u044c\u043c\u0430, \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043d\u0430 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u0445. \u041f\u0440\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0441\u0443\u0442\u044c \u0438\u0441\u0442\u043e\u0440\u0438\u0438 \u0438 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u044b \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436\u0435\u0439, \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0438\u0445 \u0438\u043c\u0435\u043d\u0430, \u0430\u0434\u0440\u0435\u0441\u0430 \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u043b\u0438\u0447\u043d\u044b\u0435 \u0434\u0435\u0442\u0430\u043b\u0438, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u0449\u0438\u0442\u0438\u0442\u044c \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u043e\u0441\u0442\u044c \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u043b\u044e\u0434\u0435\u0439. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0437\u0440\u0438\u0442\u0435\u043b\u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442 authentic \u0438\u0441\u0442\u043e\u0440\u0438\u044e \u0441 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435\u043c \u0432\u0441\u0435\u0445 \u0432\u0430\u0436\u043d\u044b\u0445 \u0432\u0437\u0430\u0438\u043c\u043e\u0441\u0432\u044f\u0437\u0435\u0439 \u0438 \u0437\u0430\u043a\u043e\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0435\u0439, \u043d\u043e \u0431\u0435\u0437 \u0440\u0438\u0441\u043a\u0430 \u0440\u0430\u0441\u043a\u0440\u044b\u0442\u0438\u044f \u0447\u044c\u0435\u0439-\u043b\u0438\u0431\u043e \u043b\u0438\u0447\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438.<\/p>\n<p>\u0422\u043e\u0447\u043d\u043e \u0442\u0430\u043a \u0436\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0430\u043d\u043e\u043d\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435: \u043c\u044b \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0434\u0430\u043d\u043d\u044b\u0445, \u0438\u0445 \u0432\u0437\u0430\u0438\u043c\u043e\u0441\u0432\u044f\u0437\u0438 \u0438 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438, \u043d\u043e \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u043c \u0432\u0441\u0435 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u044b \u043d\u0430 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0435 \u0430\u043d\u0430\u043b\u043e\u0433\u0438. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0440\u0435\u0430\u043b\u0438\u0441\u0442\u0438\u0447\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438, \u043d\u0435 \u043f\u043e\u0434\u0432\u0435\u0440\u0433\u0430\u044f \u0440\u0438\u0441\u043a\u0443 \u043a\u043e\u043d\u0444\u0438\u0434\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.<\/p>\n<p>\u0417\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u043f\u044f\u0442\u044c \u043b\u0435\u0442 \u044f \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u044e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u0442\u0440\u0435\u043d\u0434: \u043e\u0431\u044a\u0435\u043c \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0442\u0438\u043f\u0438\u0447\u043d\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0440\u0430\u0441\u0442\u0435\u0442 \u044d\u043a\u0441\u043f\u043e\u043d\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e. \u0415\u0441\u043b\u0438 \u0440\u0430\u043d\u044c\u0448\u0435 \u043c\u044b \u0445\u0440\u0430\u043d\u0438\u043b\u0438 \u0442\u043e\u043b\u044c\u043a\u043e email \u0438 \u0442\u0435\u043b\u0435\u0444\u043e\u043d, \u0442\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u044d\u0442\u043e \u0431\u0438\u043e\u043c\u0435\u0442\u0440\u0438\u044f, \u0431\u0430\u043d\u043a\u043e\u0432\u0441\u043a\u0438\u0435 \u043a\u0430\u0440\u0442\u044b, \u043c\u0435\u0434\u0438\u0446\u0438\u043d\u0441\u043a\u0430\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u044f, \u0433\u0435\u043e\u043b\u043e\u043a\u0430\u0446\u0438\u044f. \u041a\u0430\u0436\u0434\u043e\u0435 \u0442\u0430\u043a\u043e\u0435 \u043f\u043e\u043b\u0435 \u2014 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u043c\u0438\u043d\u0430 \u0437\u0430\u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/ys\/mh\/lv\/ysmhlva4nvzoonqssqyblpam4e4.png\" data-src=\"https:\/\/habrastorage.org\/webt\/ys\/mh\/lv\/ysmhlva4nvzoonqssqyblpam4e4.png\"\/><\/figure>\n<h3>\u0422\u0438\u043f\u0438\u0447\u043d\u044b\u0435 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445<\/h3>\n<p>\u0420\u0430\u0437\u0431\u0435\u0440\u0451\u043c \u0442\u0440\u0438 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043a\u0435\u0439\u0441\u0430:<\/p>\n<h4>1. \u041e\u0442\u043b\u0430\u0434\u043a\u0430 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u0431\u0430\u0433\u043e\u0432<\/h4>\n<pre><code class=\"python\"># \u0422\u0438\u043f\u0438\u0447\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u043e\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \"\u041d\u0443\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u0431\u0430\u0433 \u0441 \u043f\u043b\u0430\u0442\u0435\u0436\u043e\u043c #12345.  \u041c\u043e\u0436\u043d\u043e \u0434\u0430\u043c\u043f \u0431\u0430\u0437\u044b \u0441 \u044d\u0442\u043e\u0439 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0435\u0439?\"  <\/code><\/pre>\n<p>\u041d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434 \u0431\u0435\u0437\u043e\u0431\u0438\u0434\u043d\u043e, \u0432\u0435\u0440\u043d\u043e? \u041d\u043e \u0432 \u044d\u0442\u043e\u0439 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c:<\/p>\n<ul>\n<li>\n<p>\u041d\u043e\u043c\u0435\u0440 \u043a\u0430\u0440\u0442\u044b \u043a\u043b\u0438\u0435\u043d\u0442\u0430<\/p>\n<\/li>\n<li>\n<p>\u0418\u0441\u0442\u043e\u0440\u0438\u044f \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u043e\u043a\u0443\u043f\u043e\u043a<\/p>\n<\/li>\n<li>\n<p>\u0410\u0434\u0440\u0435\u0441 \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0438<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0438\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u044b \u0440\u043e\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u0438\u043a\u043e\u0432<\/p>\n<\/li>\n<\/ul>\n<h4>2. \u041d\u0430\u0433\u0440\u0443\u0437\u043e\u0447\u043d\u043e\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/h4>\n<pre><code class=\"bash\"># \u0420\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043a \u043d\u0430\u0433\u0440\u0443\u0437\u043e\u0447\u043d\u043e\u043c\u0443 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e pg_dump -h prod-db -t users -t orders &gt; load_test.sql  <\/code><\/pre>\n<p>\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430\u043c \u043d\u0443\u0436\u0435\u043d \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043c \u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445. \u041d\u043e \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u044d\u0442\u0438\u043c \u043e\u043d\u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442:<\/p>\n<ul>\n<li>\n<p>\u0420\u0435\u0430\u043b\u044c\u043d\u044b\u0435 email&#8217;\u044b \u0434\u043b\u044f \u0441\u043f\u0430\u043c-\u0440\u0430\u0441\u0441\u044b\u043b\u043e\u043a<\/p>\n<\/li>\n<li>\n<p>\u0422\u0435\u043b\u0435\u0444\u043e\u043d\u044b \u0434\u043b\u044f \u0431\u0430\u0437\u044b \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u043e\u0432<\/p>\n<\/li>\n<li>\n<p>\u0421\u0432\u044f\u0437\u0438 \u043c\u0435\u0436\u0434\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c\u0438 \u0434\u043b\u044f \u0441\u043e\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0433\u0440\u0430\u0444\u0430<\/p>\n<\/li>\n<\/ul>\n<h4>3. \u041e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 ML-\u043c\u043e\u0434\u0435\u043b\u0435\u0439<\/h4>\n<pre><code class=\"python\"># \u0422\u0438\u043f\u0438\u0447\u043d\u044b\u0439 \u043a\u043e\u0434 \u0434\u0430\u0442\u0430-\u0441\u0430\u0439\u0435\u043d\u0442\u0438\u0441\u0442\u0430 df = pd.read_sql(\"SELECT * FROM user_behavior\", prod_connection)  <\/code><\/pre>\n<p>\u0422\u0430\u043a\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u043d \u043f\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c. \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043e\u043d \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a\u043e \u0432\u0441\u0435\u043c \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u043c \u0434\u0430\u043d\u043d\u044b\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u0445\u043e\u0442\u044f \u0434\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0432\u0430\u0436\u043d\u044b \u0438\u043c\u0435\u043d\u043d\u043e \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u044b \u0438 \u0430\u0433\u0440\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438. \u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u044d\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u043e \u0432\u044b\u0433\u0440\u0443\u0436\u0430\u044e\u0442\u0441\u044f \u043d\u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u0430\u0448\u0438\u043d\u044b \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u043e\u0432, \u0447\u0442\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u043f\u043b\u043e\u0449\u0430\u0434\u044c \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0430\u0442\u0430\u043a\u0438.<\/p>\n<h3>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0440\u0438\u0441\u043a\u0438 \u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u044f \u0443\u0442\u0435\u0447\u0435\u043a<\/h3>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0441\u043b\u0443\u0447\u0430\u0439 \u0443\u0442\u0435\u0447\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 Uber \u0432 2016 \u0433\u043e\u0434\u0443. \u0412 \u043e\u043a\u0442\u044f\u0431\u0440\u0435 2016 \u0433\u043e\u0434\u0430 \u0445\u0430\u043a\u0435\u0440\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0434\u0430\u043d\u043d\u044b\u043c 57 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u043e\u0432 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0438 \u0432\u043e\u0434\u0438\u0442\u0435\u043b\u0435\u0439 Uber. \u041f\u0440\u0438\u0447\u0438\u043d\u0430? \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e \u043e\u0441\u0442\u0430\u0432\u0438\u043b\u0438 \u0443\u0447\u0435\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a AWS S3 \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u043d\u0430 GitHub.<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u043d\u0446\u0438\u0434\u0435\u043d\u0442\u0430 \u0431\u044b\u043b\u0438 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u043d\u044b\u043c\u0438:<\/p>\n<ol>\n<li>\n<p><strong>\u0424\u0438\u043d\u0430\u043d\u0441\u043e\u0432\u044b\u0435 \u043f\u043e\u0442\u0435\u0440\u0438<\/strong> <\/p>\n<ul>\n<li>\n<p>\u0428\u0442\u0440\u0430\u0444 \u043e\u0442 \u0440\u0435\u0433\u0443\u043b\u044f\u0442\u043e\u0440\u043e\u0432: $148 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u043e\u0432<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u0442\u0440\u0430\u0442\u044b \u043d\u0430 \u0443\u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u043b\u043b\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u0438\u0441\u043a\u043e\u0432: \u0431\u043e\u043b\u0435\u0435 $100 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u043e\u0432<\/p>\n<\/li>\n<li>\n<p>\u0420\u0430\u0441\u0445\u043e\u0434\u044b \u043d\u0430 \u043a\u0438\u0431\u0435\u0440\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c \u0438 \u0430\u0443\u0434\u0438\u0442: \u0434\u0435\u0441\u044f\u0442\u043a\u0438 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u043e\u0432 \u0434\u043e\u043b\u043b\u0430\u0440\u043e\u0432<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u0420\u0435\u043f\u0443\u0442\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0440\u0438\u0441\u043a\u0438<\/strong> <\/p>\n<ul>\n<li>\n<p>\u0421\u0435\u0440\u044c\u0435\u0437\u043d\u044b\u0439 \u0443\u0434\u0430\u0440 \u043f\u043e \u0434\u043e\u0432\u0435\u0440\u0438\u044e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0438 \u043f\u0430\u0440\u0442\u043d\u0435\u0440\u043e\u0432<\/p>\n<\/li>\n<li>\n<p>\u0411\u043e\u043b\u0435\u0435 900 \u043d\u0435\u0433\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0439 \u0432 \u043a\u0440\u0443\u043f\u043d\u044b\u0445 \u0421\u041c\u0418<\/p>\n<\/li>\n<li>\n<p>\u0421\u043d\u0438\u0436\u0435\u043d\u0438\u0435 \u043e\u0446\u0435\u043d\u043a\u0438 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u0438 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u043f\u0435\u0440\u0435\u0434 IPO<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u0422\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u044f<\/strong> <\/p>\n<ul>\n<li>\n<p>\u041f\u043e\u043b\u043d\u0430\u044f \u043f\u0435\u0440\u0435\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430\u043c\u0438<\/p>\n<\/li>\n<li>\n<p>\u0412\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0443\u0440\u043e\u0432\u043d\u0435\u0439 \u0437\u0430\u0449\u0438\u0442\u044b \u0434\u0430\u043d\u043d\u044b\u0445<\/p>\n<\/li>\n<li>\n<p>\u041c\u0430\u0441\u0448\u0442\u0430\u0431\u043d\u044b\u0439 \u0430\u0443\u0434\u0438\u0442 \u0432\u0441\u0435\u0439 IT-\u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b<\/p>\n<\/li>\n<li>\n<p>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0441\u0442\u0440\u043e\u0433\u0438\u0445 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u0432 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p>\u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0442\u043e, \u0447\u0442\u043e \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f \u043f\u044b\u0442\u0430\u043b\u0430\u0441\u044c \u0441\u043a\u0440\u044b\u0442\u044c \u0444\u0430\u043a\u0442 \u0443\u0442\u0435\u0447\u043a\u0438 \u0438 \u0434\u0430\u0436\u0435 \u0437\u0430\u043f\u043b\u0430\u0442\u0438\u043b\u0430 \u0445\u0430\u043a\u0435\u0440\u0430\u043c $100,000 \u0437\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u0445\u0438\u0449\u0435\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u042d\u0442\u043e \u043f\u0440\u0438\u0432\u0435\u043b\u043e \u043a \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0448\u0442\u0440\u0430\u0444\u0430\u043c \u0438 \u0435\u0449\u0435 \u0431\u043e\u043b\u044c\u0448\u0435\u043c\u0443 \u0440\u0435\u043f\u0443\u0442\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u043c\u0443 \u0443\u0449\u0435\u0440\u0431\u0443, \u043a\u043e\u0433\u0434\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0432\u0441\u0451 \u0436\u0435 \u0441\u0442\u0430\u043b\u0430 \u0434\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435\u043c \u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0432 2017 \u0433\u043e\u0434\u0443.<\/p>\n<p>\u042d\u0442\u043e\u0442 \u0441\u043b\u0443\u0447\u0430\u0439 \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0430\u0436\u043d\u043e \u0438\u043c\u0435\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0432\u044b\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0438 \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u043e\u0440\u043e\u0433\u043e \u043c\u043e\u0436\u0435\u0442 \u043e\u0431\u043e\u0439\u0442\u0438\u0441\u044c \u0438\u0445 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u0434\u0430\u0436\u0435 \u043a\u0440\u0443\u043f\u043d\u044b\u043c \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f\u043c.<\/p>\n<h3>\u0417\u0430\u043a\u043e\u043d\u043e\u0434\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f<\/h3>\n<p>\u0421\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0435 \u0437\u0430\u043a\u043e\u043d\u043e\u0434\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u043e \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0437\u0430\u0449\u0438\u0442\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u043e\u0436\u043d\u043e \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u0441 \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c\u0438 \u0434\u043e\u0440\u043e\u0436\u043d\u043e\u0433\u043e \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f: \u043d\u0435\u0437\u043d\u0430\u043d\u0438\u0435 \u043d\u0435 \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0430\u0435\u0442 \u043e\u0442 \u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0441\u0442\u0438.<\/p>\n<h4>GDPR (General Data Protection Regulation)<\/h4>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/tf\/d-\/pg\/tfd-pgoltrxhvuyotepwx7lo04s.png\" data-src=\"https:\/\/habrastorage.org\/webt\/tf\/d-\/pg\/tfd-pgoltrxhvuyotepwx7lo04s.png\"\/><\/figure>\n<p>\u041a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f:<\/p>\n<ul>\n<li>\n<p>\u0414\u0430\u043d\u043d\u044b\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0437\u0430\u0449\u0438\u0449\u0435\u043d\u044b &#171;\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e&#187;<\/p>\n<\/li>\n<li>\n<p>\u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u0449\u0438\u0442\u0443<\/p>\n<\/li>\n<li>\n<p>\u0428\u0442\u0440\u0430\u0444\u044b: \u0434\u043e 20 \u043c\u043b\u043d \u0435\u0432\u0440\u043e \u0438\u043b\u0438 4% \u043e\u0431\u043e\u0440\u043e\u0442\u0430<\/p>\n<\/li>\n<\/ul>\n<h4>152-\u0424\u0417 (\u0420\u043e\u0441\u0441\u0438\u044f)<\/h4>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/ou\/tb\/u5\/outbu5eitpf5xlpeh9rbjvucv-g.png\" data-src=\"https:\/\/habrastorage.org\/webt\/ou\/tb\/u5\/outbu5eitpf5xlpeh9rbjvucv-g.png\"\/><\/figure>\n<p>\u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438:<\/p>\n<ul>\n<li>\n<p>\u0422\u0440\u0435\u0431\u0443\u0435\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 \u0442\u0435\u0440\u0440\u0438\u0442\u043e\u0440\u0438\u0438 \u0420\u0424<\/p>\n<\/li>\n<li>\n<p>\u041e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0441\u043e\u0433\u043b\u0430\u0441\u0438\u0435 \u043d\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0430\u0432\u043e \u043d\u0430 \u0437\u0430\u0431\u0432\u0435\u043d\u0438\u0435<\/p>\n<\/li>\n<li>\n<p>\u0428\u0442\u0440\u0430\u0444\u044b \u0434\u043e 18 \u043c\u043b\u043d \u0440\u0443\u0431\u043b\u0435\u0439<\/p>\n<\/li>\n<\/ul>\n<h4>\u041f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0432\u044b\u0432\u043e\u0434\u044b<\/h4>\n<p>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043a\u0430\u0440\u0442\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0432\u0430\u0448\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435:<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/wb\/xd\/kx\/wbxdkx16s4hu78iqwypzk_a57gs.png\" data-src=\"https:\/\/habrastorage.org\/webt\/wb\/xd\/kx\/wbxdkx16s4hu78iqwypzk_a57gs.png\"\/><\/figure>\n<p>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u0435 \u0443\u0440\u043e\u0432\u043d\u0438 \u0437\u0430\u0449\u0438\u0442\u044b:<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/9-\/fp\/ul\/9-fpulojyvwmtk722x4rdnkzco8.png\" data-src=\"https:\/\/habrastorage.org\/webt\/9-\/fp\/ul\/9-fpulojyvwmtk722x4rdnkzco8.png\"\/><\/figure>\n<p>\u0412\u043d\u0435\u0434\u0440\u0438\u0442\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b \u0430\u043d\u043e\u043d\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u044d\u0442\u0430\u043f\u0435:<\/p>\n<ul>\n<li>\n<p>\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430<\/p>\n<\/li>\n<li>\n<p>\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/p>\n<\/li>\n<li>\n<p>\u0410\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0430<\/p>\n<\/li>\n<li>\n<p>\u0411\u044d\u043a\u0430\u043f\u044b<\/p>\n<\/li>\n<\/ul>\n<p>\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a pg_anon \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0440\u0435\u0448\u0438\u0442\u044c \u044d\u0442\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435. \u041d\u043e \u043f\u043e\u043c\u043d\u0438\u0442\u0435 \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e: \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c \u2014 \u044d\u0442\u043e \u043d\u0435 \u043a\u043e\u043d\u0435\u0447\u043d\u0430\u044f \u0446\u0435\u043b\u044c, \u0430 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441. \u041f\u043e\u043b\u0430\u0433\u0430\u044e, \u043b\u0443\u0447\u0448\u0435 \u043f\u043e\u0442\u0440\u0430\u0442\u0438\u0442\u044c \u0434\u0435\u043d\u044c \u043d\u0430 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 \u0430\u043d\u043e\u043d\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438, \u0447\u0435\u043c \u0433\u043e\u0434 \u043d\u0430 \u0440\u0430\u0437\u0431\u043e\u0440 \u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0439 \u0443\u0442\u0435\u0447\u043a\u0438.<\/p>\n<h2>pg_anon \u043a\u0430\u043a \u0440\u0435\u0448\u0435\u043d\u0438\u0435<\/h2>\n<h3>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 pg_anon \u0438 \u043f\u043e\u0447\u0435\u043c\u0443 \u043e\u043d \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f<\/h3>\n<p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0435\u0442\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u0439 \u0444\u0438\u043b\u044c\u043c \u043e \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043b\u0438\u0447\u043d\u043e\u0441\u0442\u0438. \u0423 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0432\u0438\u0434\u0435\u043e\u0437\u0430\u043f\u0438\u0441\u0438, \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b \u0438 \u0438\u043d\u0442\u0435\u0440\u0432\u044c\u044e \u0441 \u043e\u0447\u0435\u0432\u0438\u0434\u0446\u0430\u043c\u0438. \u041e\u0434\u043d\u0430\u043a\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u043a\u043e\u043d\u0444\u0438\u0434\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e &#8212; \u043d\u043e\u043c\u0435\u0440\u0430 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u043e\u0432, \u0430\u0434\u0440\u0435\u0441\u0430, \u043b\u0438\u0447\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u0440\u0443\u0433\u0438\u0445 \u043b\u044e\u0434\u0435\u0439. \u041f\u0440\u0438 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0435 \u0444\u0438\u043b\u044c\u043c\u0430 \u043a \u043f\u043e\u043a\u0430\u0437\u0443 \u0432\u044b \u0440\u0430\u0437\u043c\u044b\u0432\u0430\u0435\u0442\u0435 \u044d\u0442\u0438 \u0434\u0435\u0442\u0430\u043b\u0438 \u043d\u0430 \u0432\u0438\u0434\u0435\u043e, \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u0442\u0435 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u0438\u043c\u0435\u043d\u0430 \u0438 \u0430\u0434\u0440\u0435\u0441\u0430, \u043d\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442\u0435 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432\u0441\u044e \u0432\u0430\u0436\u043d\u0443\u044e \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0438 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0437\u0440\u0438\u0442\u0435\u043b\u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442 \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u0439 \u0444\u0438\u043b\u044c\u043c, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0437\u0430\u0449\u0438\u0449\u0435\u043d\u0430 \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u043e\u0441\u0442\u044c \u0432\u0441\u0435\u0445 \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u043e\u0432.<\/p>\n<p>\u0418\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 pg_anon \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 PostgreSQL. \u041f\u043e\u043c\u043d\u044e, \u043a\u0430\u043a \u043c\u043d\u0435 \u0441\u0430\u043c\u043e\u043c\u0443 \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u0432\u0440\u0443\u0447\u043d\u0443\u044e &#171;\u0440\u0430\u0437\u043c\u044b\u0432\u0430\u0442\u044c&#187; \u043a\u043e\u043d\u0444\u0438\u0434\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u0441\u0440\u0435\u0434. \u042d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a:<\/p>\n<pre><code class=\"bash\"># \u0421\u0442\u0430\u0440\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 - \u0440\u0443\u0447\u043d\u044b\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u044b pg_dump production_db &gt; dump.sql sed -i 's\/[0-9]\\\\\\\\{10\\\\\\\\}\/XXXXXXXXXX\/g' dump.sql  # \u041c\u0430\u0441\u043a\u0438\u0440\u0443\u0435\u043c \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u044b sed -i 's\/[^@]\\\\\\\\+@\/******@\/g' dump.sql         # \u041c\u0430\u0441\u043a\u0438\u0440\u0443\u0435\u043c email # \u0418 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435... \u0434\u0435\u0441\u044f\u0442\u043a\u0438 \u0441\u0442\u0440\u043e\u043a \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439  <\/code><\/pre>\n<p>\u042d\u0442\u043e\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0431\u044b\u043b \u043d\u0435\u043d\u0430\u0434\u0435\u0436\u043d\u044b\u043c \u0438 \u0442\u0440\u0443\u0434\u043e\u0437\u0430\u0442\u0440\u0430\u0442\u043d\u044b\u043c, \u043a\u0430\u043a \u0435\u0441\u043b\u0438 \u0431\u044b \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0443 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0438\u0441\u043a\u0430\u0442\u044c \u0438 \u0440\u0430\u0437\u043c\u044b\u0432\u0430\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u043a\u043e\u043d\u0444\u0438\u0434\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u0432 \u043c\u043d\u043e\u0433\u043e\u0447\u0430\u0441\u043e\u0432\u043e\u043c \u0444\u0438\u043b\u044c\u043c\u0435. pg_anon \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u043b \u044d\u043b\u0435\u0433\u0430\u043d\u0442\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435: \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043f\u0440\u0430\u0432\u0438\u043b \u043c\u0430\u0441\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432 YAML-\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 &#8212; \u0441\u0432\u043e\u0435\u0433\u043e \u0440\u043e\u0434\u0430 &#171;\u0443\u043c\u043d\u044b\u0439 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440&#187;, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0442\u043e\u0447\u043d\u043e \u0437\u043d\u0430\u0435\u0442, \u0447\u0442\u043e \u0438 \u043a\u0430\u043a \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u043c\u0430\u0441\u043a\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044f \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0446\u0435\u043b\u043e\u0441\u0442\u043d\u043e\u0441\u0442\u044c \u0438 \u0441\u043c\u044b\u0441\u043b \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438.<\/p>\n<h3>\u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u043f\u043e\u0434\u0445\u043e\u0434\u0430\u043c\u0438<\/h3>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u044b \u0430\u043d\u043e\u043d\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445:<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/jj\/_3\/ce\/jj_3ceyremce-t-2cq0nbbcnayw.png\" data-src=\"https:\/\/habrastorage.org\/webt\/jj\/_3\/ce\/jj_3ceyremce-t-2cq0nbbcnayw.png\"\/><\/figure>\n<p>\u0420\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u043a\u0430\u0436\u0434\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043c\u0430\u0441\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f email-\u0430\u0434\u0440\u0435\u0441\u043e\u0432:<\/p>\n<p><strong>\u0420\u0443\u0447\u043d\u044b\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u044b<\/strong><\/p>\n<pre><code class=\"bash\">sed -i 's\/\\\\([^@]*\\\\)@\\\\([^.]*\\\\)\\\\.\/masked@example.\/g' dump.sql  <\/code><\/pre>\n<p>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430: \u0441\u043b\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c, \u043b\u0435\u0433\u043a\u043e \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435<\/p>\n<p><strong>PostgreSQL Anonymizer<\/strong><\/p>\n<pre><code class=\"sql\">CREATE EXTENSION anon; SELECT anon.anonymize_column('users', 'email');  <\/code><\/pre>\n<p>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430: \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0439 \u043d\u0430 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u043d<\/p>\n<p><strong>\u0421\u0430\u043c\u043e\u043f\u0438\u0441\u043d\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f<\/strong><\/p>\n<pre><code class=\"python\">def mask_email(email):     return f\"user_{hash(email)}@example.com\"  <\/code><\/pre>\n<p>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430: \u0434\u043e\u0440\u043e\u0433\u043e \u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0435<\/p>\n<p><strong>pg_anon<\/strong><\/p>\n<pre><code class=\"yaml\">tables:   users:     email:       function: 'regex_replace'       pattern: '(.+)@(.+)'       replace: 'user_#{random_string(8)}@example.com'  <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u043e: \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438<\/p>\n<h3>\u041a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 \u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f<\/h3>\n<h4>\u041f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430:<\/h4>\n<p><strong>\u041d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043e\u0442 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u043d-\u0441\u0440\u0435\u0434\u044b<\/strong><\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/dq\/9w\/ae\/dq9wae259ux4xztlfagh87okbu8.png\" data-src=\"https:\/\/habrastorage.org\/webt\/dq\/9w\/ae\/dq9wae259ux4xztlfagh87okbu8.png\"\/><\/figure>\n<p><strong>\u0414\u0435\u043a\u043b\u0430\u0440\u0430\u0442\u0438\u0432\u043d\u0430\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f<\/strong><\/p>\n<pre><code class=\"yaml\"># \u041f\u0440\u0438\u043c\u0435\u0440 \u043f\u0440\u043e\u0441\u0442\u043e\u0439, \u043d\u043e \u043c\u043e\u0449\u043d\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 tables:   customers:     phone:       function: 'random_phone'     email:       function: 'regex_replace'       pattern: '(.+)@(.+)'       replace: 'anon_#{random_string(8)}@example.com'     address:       function: 'faker'       type: 'address'  <\/code><\/pre>\n<p><strong>\u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0441 CI\/CD<\/strong><\/p>\n<pre><code class=\"yaml\"># GitLab CI \u043f\u0440\u0438\u043c\u0435\u0440 anonymize_data:   script:     - pg_anon -c config.yml -i dump.sql -o anonymized.sql  <\/code><\/pre>\n<h4>\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u044b \u0438\u0445 \u043f\u0440\u0435\u043e\u0434\u043e\u043b\u0435\u043d\u0438\u044f<\/h4>\n<p>\u041f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 pg_anon \u0432\u0430\u0436\u043d\u043e \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439:<\/p>\n<p><strong>\u041f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043e\u0431\u044a\u0435\u043c\u0430\u0445 \u0434\u0430\u043d\u043d\u044b\u0445<\/strong><\/p>\n<p>\u0412\u0440\u0435\u043c\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u043e\u0431\u044a\u0435\u043c\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0430\u0432\u0438\u043b \u0430\u043d\u043e\u043d\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438. \u041d\u0430\u0448\u0438 \u0442\u0435\u0441\u0442\u044b \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438:<\/p>\n<pre><code class=\"bash\"># \u0422\u0435\u0441\u0442\u043e\u0432\u044b\u0435 \u0437\u0430\u043c\u0435\u0440\u044b \u043d\u0430 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435 (16 CPU, 64GB RAM) # \u0411\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u043c\u0438 users, orders, products  # 10GB \u0434\u0430\u043d\u043d\u044b\u0445 time pg_anon -c config.yml -i medium_dump.sql -o anon_medium.sql # real    12m24.156s  # 50GB \u0434\u0430\u043d\u043d\u044b\u0445 time pg_anon -c config.yml -i large_dump.sql -o anon_large.sql # real    68m15.873s  <\/code><\/pre>\n<p>\u0414\u043b\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f:<\/p>\n<pre><code class=\"python\"># \u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 parallel_config = {     'chunk_size': '1GB',  # \u0420\u0430\u0437\u043c\u0435\u0440 \u043f\u043e\u0440\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430     'max_workers': 8,     # \u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432     'batch_size': 10000   # \u0417\u0430\u043f\u0438\u0441\u0435\u0439 \u0432 \u043e\u0434\u043d\u043e\u043c \u0431\u0430\u0442\u0447\u0435 }  # \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430 def process_incrementally(db_connection, last_processed_id):     \"\"\"     \u041e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u043e\u0432\u044b\u0435 \u0438\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u043d\u044b\u0435 \u0437\u0430\u043f\u0438\u0441\u0438     \"\"\"     query = \"\"\"         SELECT * FROM users         WHERE id &gt; %s         AND updated_at &gt; current_date - interval '1 day'         ORDER BY id         LIMIT 10000     \"\"\"     # ... \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438  <\/code><\/pre>\n<p><strong>\u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043c\u0430\u0441\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445<\/strong><\/p>\n<p>pg_anon \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u043c\u0430\u0441\u043a\u0438\u0440\u043e\u0432\u043a\u0443 &#171;\u043d\u0430 \u043b\u0435\u0442\u0443&#187;, \u0447\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"yaml\"># \u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0442\u0430\u0431\u043b\u0438\u0446 tables:   orders:     user_id:       function: 'consistent_hash'       # \u0413\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u043c \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0441\u0432\u044f\u0437\u0435\u0439 \u043c\u0435\u0436\u0434\u0443 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u043c\u0438       preserve_relations: true       referenced_tables: ['users', 'payments']    order_items:     order_id:       function: 'reference'       # \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0442\u043e \u0436\u0435 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0438 \u0434\u043b\u044f id \u0432 orders       refers_to: 'orders.id'  <\/code><\/pre>\n<p><strong>\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u043f\u043e \u043f\u0430\u043c\u044f\u0442\u0438<\/strong><\/p>\n<p>\u041f\u0440\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043d\u0430\u0431\u043e\u0440\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u0430\u0436\u043d\u043e \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438. \u041f\u0440\u0438\u043c\u0435\u0440\u043d\u0430\u044f \u0444\u043e\u0440\u043c\u0443\u043b\u0430 \u0440\u0430\u0441\u0447\u0435\u0442\u0430:<\/p>\n<pre><code class=\"python\">required_memory = {     'base': '2GB',  # \u0411\u0430\u0437\u043e\u0432\u043e\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u0435     'per_million_rows': '1GB',  # \u041d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u043c\u0438\u043b\u043b\u0438\u043e\u043d \u0441\u0442\u0440\u043e\u043a     'per_worker': '512MB'  # \u041d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 }  <\/code><\/pre>\n<p>\u0414\u043b\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f:<\/p>\n<ul>\n<li>\n<p>\u041e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u0440\u0446\u0438\u044f\u043c\u0438 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430<\/p>\n<\/li>\n<li>\n<p>\u041a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432<\/p>\n<\/li>\n<li>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0431\u0430\u0437<\/p>\n<\/li>\n<\/ul>\n<p>\u042d\u0442\u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u043d\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043a\u0440\u0438\u0442\u0438\u0447\u043d\u044b\u043c\u0438, \u043d\u043e \u0438\u0445 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u043f\u0440\u0438 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f pg_anon \u0432 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u0443\u044e \u0441\u0440\u0435\u0434\u0443. \u041f\u0440\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0430\u043d\u043e\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043b\u044e\u0431\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430.<\/p>\n<h3>\u041f\u0440\u0438\u043d\u0446\u0438\u043f \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435<\/h3>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u043f\u043e\u043b\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0434\u043b\u044f \u0442\u0438\u043f\u0438\u0447\u043d\u043e\u0433\u043e \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f:<\/p>\n<p><strong>\u0418\u0441\u0445\u043e\u0434\u043d\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0431\u0430\u0437\u044b<\/strong>:<\/p>\n<pre><code class=\"sql\">CREATE TABLE users (     id SERIAL PRIMARY KEY,     email VARCHAR(255),     phone VARCHAR(20),     password_hash VARCHAR(64),     address TEXT );  INSERT INTO users VALUES (1, 'john.doe@company.com', '+79261234567',  'hash123', 'Moscow, Lenin St, 12-45');  <\/code><\/pre>\n<p><strong>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f pg_anon<\/strong>:<\/p>\n<pre><code class=\"yaml\">tables:   users:     email:       function: 'regex_replace'       pattern: '(.+)@(.+)'       replace: 'user_#{random_string(8)}@example.com'     phone:       function: 'random_phone'       format: '+7##########'     address:       function: 'faker'       type: 'address'     password_hash:       function: 'static'       value: 'dummy_hash'  <\/code><\/pre>\n<p><strong>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0430\u043d\u043e\u043d\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438<\/strong>:<\/p>\n<pre><code class=\"sql\">-- \u041f\u043e\u0441\u043b\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 pg_anon INSERT INTO users VALUES (1, 'user_a8b7c6d5@example.com', '+79998887766',  'dummy_hash', 'Saint Petersburg, Oak St, 45-67');  <\/code><\/pre>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u0438\u0442\u0435, \u0434\u0430\u043d\u043d\u044b\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u043b\u0438 \u0441\u0432\u043e\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0438 \u043f\u0440\u0430\u0432\u0434\u043e\u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0441\u0442\u044c, \u043d\u043e \u0441\u0442\u0430\u043b\u0438 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043e\u0431\u0435\u0437\u043b\u0438\u0447\u0435\u043d\u043d\u044b\u043c\u0438.<\/p>\n<h4>\u0411\u043e\u043d\u0443\u0441: \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432<\/h4>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043f\u043e\u0441\u043b\u0435 \u0430\u043d\u043e\u043d\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438:<\/p>\n<pre><code class=\"bash\">#!\/bin\/bash # check_anonymization.sh  # \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u043d\u0435 \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u043b\u0438 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 email-\u0430\u0434\u0440\u0435\u0441\u043e\u0432 if grep -E '[A-Za-z0-9._%+-]+@company\\\\.com' anonymized.sql; then     echo \"WARNING: Found potential real emails!\"     exit 1 fi  # \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0444\u043e\u0440\u043c\u0430\u0442 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u043e\u0432 if grep -E '\\\\+7[0-9]{10}' anonymized.sql | grep -vE '\\\\+79[0-9]{9}'; then     echo \"WARNING: Found invalid phone format!\"     exit 1 fi  <\/code><\/pre>\n<p>\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u0432\u043d\u0435\u0434\u0440\u0438\u0442\u044c pg_anon \u0432 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438 CI\/CD \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u044b. \u0410 \u043f\u043e\u043a\u0430 \u0437\u0430\u043f\u043e\u043c\u043d\u0438\u0442\u0435 \u0433\u043b\u0430\u0432\u043d\u043e\u0435: \u0430\u043d\u043e\u043d\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u2013 \u044d\u0442\u043e \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0435 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438, \u044d\u0442\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u0435\u043b\u0430\u0435\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0431\u043e\u043b\u0435\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0439 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e.<\/p>\n<h2>\u041f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435<\/h2>\n<h3>\u041f\u043e\u0448\u0430\u0433\u043e\u0432\u043e\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u043f\u043e \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044e<\/h3>\n<p>\u0412\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u0435 \u0430\u043d\u043e\u043d\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u0445\u043e\u0436\u0435 \u043d\u0430 \u0441\u0442\u0440\u043e\u0438\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0438 \u0432\u043e\u0434\u044b: \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043c\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c, \u0447\u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u043d\u0443\u0436\u043d\u043e \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u0442\u044c, \u0437\u0430\u0442\u0435\u043c \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0435 \u0444\u0438\u043b\u044c\u0442\u0440\u044b \u0438 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043e\u0447\u0438\u0441\u0442\u043a\u0438. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0439\u0434\u0435\u043c \u0447\u0435\u0440\u0435\u0437 \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0448\u0430\u0433 \u0437\u0430 \u0448\u0430\u0433\u043e\u043c.<\/p>\n<h4>\u0428\u0430\u0433 1: \u0410\u0443\u0434\u0438\u0442 \u0434\u0430\u043d\u043d\u044b\u0445<\/h4>\n<p>\u041f\u0440\u0435\u0436\u0434\u0435 \u0432\u0441\u0435\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0438 \u0447\u0442\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043c\u0430\u0441\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u0434\u043b\u044f \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430:<\/p>\n<pre><code class=\"python\">import psycopg2 import re from typing import Dict, List, Set  def analyze_sensitive_data(     connection_string: str ) -&gt; Dict[str, Set[str]]:     \"\"\"     \u0410\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u043f\u0440\u0435\u0434\u043c\u0435\u0442 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445.      Returns:         Dict[str, Set[str]]: \u0421\u043b\u043e\u0432\u0430\u0440\u044c \u0442\u0430\u0431\u043b\u0438\u0446 \u0438 \u0438\u0445 \u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043a\u043e\u043b\u043e\u043d\u043e\u043a     \"\"\"     patterns = {         'email': r'email|mail|e-mail',         'phone': r'phone|mobile|tel',         'passport': r'passport|document|license',         'address': r'address|location|geo',         'card': r'card|credit|payment'     }      conn = psycopg2.connect(connection_string)     cur = conn.cursor()      # \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u0442\u0430\u0431\u043b\u0438\u0446     cur.execute(\"\"\"         SELECT table_name, column_name, data_type         FROM information_schema.columns         WHERE table_schema = 'public'     \"\"\")      sensitive_columns = {}     for table, column, dtype in cur.fetchall():         for category, pattern in patterns.items():             if re.search(pattern, column.lower()):                 if table not in sensitive_columns:                     sensitive_columns[table] = set()                 sensitive_columns[table].add(f\"{column} ({category})\")      return sensitive_columns  # \u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f results = analyze_sensitive_data(\"postgresql:\/\/user:pass@localhost\/db\") for table, columns in results.items():     print(f\"\\\\n\u0422\u0430\u0431\u043b\u0438\u0446\u0430: {table}\")     for col in columns:         print(f\"  - {col}\")  <\/code><\/pre>\n<h4>\u0428\u0430\u0433 2: \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438<\/h4>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b:<\/p>\n<pre><code class=\"yaml\"># config\/pg_anon.yml tables:   users:     email:       function: 'regex_replace'       pattern: '(.+)@(.+)'       replace: 'user_#{random_string(8)}@example.com'       description: '\u041c\u0430\u0441\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 email \u0430\u0434\u0440\u0435\u0441\u043e\u0432'      phone:       function: 'random_phone'       format: '+7##########'       description: '\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u043d\u044b\u0445 \u043d\u043e\u043c\u0435\u0440\u043e\u0432'      address:       function: 'faker'       locale: 'ru_RU'       type: 'address'       description: '\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0430\u0434\u0440\u0435\u0441\u043e\u0432'    payments:     card_number:       function: 'regex_replace'       pattern: '\\\\d{16}'       replace: '4100#{random_number(12)}'       description: '\u0417\u0430\u043c\u0435\u043d\u0430 \u043d\u043e\u043c\u0435\u0440\u043e\u0432 \u043a\u0430\u0440\u0442 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u043c\u0438'  <\/code><\/pre>\n<h3>\u0422\u0438\u043f\u043e\u0432\u044b\u0435 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f<\/h3>\n<h4>\u0421\u0446\u0435\u043d\u0430\u0440\u0438\u0439 1: \u0415\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u043e\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0439 \u0441\u0440\u0435\u0434\u044b<\/h4>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/oe\/ih\/qv\/oeihqvkffygm4n63meslxr7hzus.png\" data-src=\"https:\/\/habrastorage.org\/webt\/oe\/ih\/qv\/oeihqvkffygm4n63meslxr7hzus.png\"\/><\/figure>\n<pre><code class=\"bash\">#!\/bin\/bash # scripts\/daily_refresh.sh  set -e  # \u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f PROD_DB=\"postgresql:\/\/prod_user:pass@prod-host\/db\" TEST_DB=\"postgresql:\/\/test_user:pass@test-host\/db\" DUMP_DIR=\"\/tmp\/dumps\" DATE=$(date +%Y%m%d)  # \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0434\u0430\u043c\u043f echo \"Creating dump...\" mkdir -p $DUMP_DIR pg_dump $PROD_DB &gt; $DUMP_DIR\/dump_$DATE.sql  # \u0410\u043d\u043e\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u0435\u043c echo \"Anonymizing data...\" pg_anon -c config\/pg_anon.yml \\\\         -i $DUMP_DIR\/dump_$DATE.sql \\\\         -o $DUMP_DIR\/anon_$DATE.sql  # \u0420\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u043c echo \"Restoring to test...\" psql $TEST_DB &lt; $DUMP_DIR\/anon_$DATE.sql  # \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c echo \"Validating...\" .\/scripts\/validate_anonymization.sh $TEST_DB  <\/code><\/pre>\n<h4>\u0421\u0446\u0435\u043d\u0430\u0440\u0438\u0439 2: \u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0438<\/h4>\n<p>\u0418\u043d\u043e\u0433\u0434\u0430 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0430\u043c \u043d\u0443\u0436\u043d\u044b \u0434\u0430\u043d\u043d\u044b\u0435, \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0449\u0438\u0435 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430:<\/p>\n<pre><code class=\"yaml\"># config\/analytics_anon.yml tables:   transactions:     amount:       function: 'noise_addition'       percentage: 5  # \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0439 \u0448\u0443\u043c \u00b15%       preserve_sum: true  # \u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u043e\u0431\u0449\u0443\u044e \u0441\u0443\u043c\u043c\u0443      date:       function: 'time_shift'       days: 30  # \u0421\u0434\u0432\u0438\u0433\u0430\u0435\u043c \u0432\u0441\u0435 \u0434\u0430\u0442\u044b \u043d\u0430 \u043c\u0435\u0441\u044f\u0446       preserve_weekday: true  # \u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0434\u043d\u0438 \u043d\u0435\u0434\u0435\u043b\u0438  <\/code><\/pre>\n<h3>\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u0447\u0430\u0441\u0442\u044b\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c<\/h3>\n<h4>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 1: \u0421\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0441\u0432\u044f\u0437\u043d\u043e\u0441\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0445<\/h4>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/rb\/m8\/ri\/rbm8ri4w9t-gyskrjfyq76dutbq.png\" data-src=\"https:\/\/habrastorage.org\/webt\/rb\/m8\/ri\/rbm8ri4w9t-gyskrjfyq76dutbq.png\"\/><\/figure>\n<p>\u0420\u0435\u0448\u0435\u043d\u0438\u0435: \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u043d\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u043d\u043e\u0433\u043e \u043c\u0430\u0441\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f:<\/p>\n<pre><code class=\"yaml\">tables:   users:     id:       function: 'hash'       salt: 'user_id_salt'       preserve_relations: true    orders:     user_id:       function: 'reference'       refers_to: 'users.id'  <\/code><\/pre>\n<h4>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 2: \u0411\u043e\u043b\u044c\u0448\u0438\u0435 \u043e\u0431\u044a\u0435\u043c\u044b \u0434\u0430\u043d\u043d\u044b\u0445<\/h4>\n<p>\u0414\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u0443\u044e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443:<\/p>\n<pre><code class=\"python\">from multiprocessing import Pool from typing import List, Dict  def process_chunk(chunk: Dict) -&gt; Dict:     \"\"\"\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043e\u0434\u043d\u043e\u0433\u043e \u0447\u0430\u043d\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445\"\"\"     return pg_anon.process_data(chunk)  def parallel_anonymization(     data: List[Dict],     chunks: int = 8 ) -&gt; List[Dict]:     \"\"\"     \u041f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u0430\u044f \u0430\u043d\u043e\u043d\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445      Args:         data: \u0421\u043f\u0438\u0441\u043e\u043a \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438         chunks: \u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432     \"\"\"     chunk_size = len(data) \/\/ chunks     data_chunks = [         data[i:i + chunk_size]         for i in range(0, len(data), chunk_size)     ]      with Pool(chunks) as p:         return p.map(process_chunk, data_chunks)  <\/code><\/pre>\n<h3>\u0421\u043e\u0432\u0435\u0442\u044b \u043f\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438<\/h3>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u0443\u044e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443:<\/p>\n<pre><code class=\"python\">def get_changes_since_last_run(     connection: str,     last_run: datetime ) -&gt; List[Dict]:     \"\"\"\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u043d\u044b\u0435 \u0437\u0430\u043f\u0438\u0441\u0438\"\"\"     query = \"\"\"         SELECT * FROM table_name         WHERE updated_at &gt; %s         ORDER BY updated_at     \"\"\"     # ... implementation  <\/code><\/pre>\n<p>\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u0439\u0442\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043c\u0430\u0441\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f:<\/p>\n<pre><code class=\"yaml\"># \u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f tables:   users:     # \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0431\u044b\u0441\u0442\u0440\u044b\u0435 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f     email:       function: 'regex_replace'       pattern: '[^@]+@[^.]+\\\\..+'  # \u0423\u043f\u0440\u043e\u0449\u0435\u043d\u043d\u044b\u0439 \u043f\u0430\u0442\u0442\u0435\u0440\u043d       replace: 'user#{row_number}@example.com'      # \u041f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u043f\u0443\u043b \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439     phone:       function: 'random_pool'       pool_size: 1000       format: '+7##########'  <\/code><\/pre>\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u0442\u0435 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438:<\/p>\n<pre><code class=\"python\">import time from contextlib import contextmanager  @contextmanager def measure_time(name: str):     \"\"\"\u0418\u0437\u043c\u0435\u0440\u044f\u0435\u0442 \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0431\u043b\u043e\u043a\u0430 \u043a\u043e\u0434\u0430\"\"\"     start = time.time()     yield     elapsed = time.time() - start     print(f\"{name}: {elapsed:.2f} seconds\")  # \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 with measure_time(\"Anonymization\"):     anonymize_data()  <\/code><\/pre>\n<p>\u041f\u043e\u043c\u043d\u0438\u0442\u0435: \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u2013 \u044d\u0442\u043e \u0438\u0442\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441. \u041d\u0430\u0447\u043d\u0438\u0442\u0435 \u0441 \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f, \u0438\u0437\u043c\u0435\u0440\u044c\u0442\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u043d\u0430\u0439\u0434\u0438\u0442\u0435 \u0443\u0437\u043a\u0438\u0435 \u043c\u0435\u0441\u0442\u0430 \u0438 \u043f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e \u0443\u043b\u0443\u0447\u0448\u0430\u0439\u0442\u0435 \u0438\u0445.<\/p>\n<p>\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0432 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 CI\/CD \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d \u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0440\u0443\u0442\u0438\u043d\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438.<\/p>\n<h2>\u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b<\/h2>\n<h3>\u0412\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043d\u0438\u0435 \u0432 CI\/CD<\/h3>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0430\u043d\u043e\u043d\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u0430\u043a \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440 \u043d\u0430 \u0430\u0432\u0442\u043e\u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u043c \u0437\u0430\u0432\u043e\u0434\u0435. \u041a\u0430\u043a \u043d\u0430 \u0437\u0430\u0432\u043e\u0434\u0435 \u043a\u0430\u0436\u0434\u0430\u044f \u043c\u0430\u0448\u0438\u043d\u0430 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u0447\u0435\u0440\u0435\u0437 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0435 \u0441\u0442\u0430\u043d\u0446\u0438\u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f, \u0442\u0430\u043a \u0438 \u043d\u0430\u0448\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0430\u043d\u043e\u043d\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0438 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c\u043e.<\/p>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0442\u0438\u043f\u0438\u0447\u043d\u044b\u0439 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d \u0432 GitLab CI:<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/bn\/jo\/ob\/bnjoobb82edmrsos_swkolfhh8w.png\" data-src=\"https:\/\/habrastorage.org\/webt\/bn\/jo\/ob\/bnjoobb82edmrsos_swkolfhh8w.png\"\/><\/figure>\n<p>\u0412\u043e\u0442 \u043a\u0430\u043a \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0432 \u0432\u0438\u0434\u0435 <code>.gitlab-ci.yml<\/code>:<\/p>\n<pre><code class=\"yaml\">variables:   DUMP_PATH: \"dumps\"   PG_ANON_CONFIG: \"config\/pg_anon.yml\"  stages:   - dump   - anonymize   - validate   - deploy  create_dump:   stage: dump   script:     - mkdir -p $DUMP_PATH     - PGPASSWORD=$PROD_DB_PASS pg_dump -h $PROD_DB_HOST -U $PROD_DB_USER $PROD_DB_NAME &gt; $DUMP_PATH\/prod.sql   artifacts:     paths:       - $DUMP_PATH\/prod.sql     expire_in: 1 day  anonymize_data:   stage: anonymize   script:     - pg_anon -c $PG_ANON_CONFIG -i $DUMP_PATH\/prod.sql -o $DUMP_PATH\/anonymized.sql   artifacts:     paths:       - $DUMP_PATH\/anonymized.sql     expire_in: 1 day  validate_anonymization:   stage: validate   script: |     # \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 email-\u043e\u0432     if grep -E '[A-Za-z0-9._%+-]+@real-domain\\\\.com' $DUMP_PATH\/anonymized.sql; then       echo \"Found real emails in anonymized dump!\"       exit 1     fi     # \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0444\u043e\u0440\u043c\u0430\u0442 \u0437\u0430\u043c\u0430\u0441\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445     .\/scripts\/validate_masked_data.sh $DUMP_PATH\/anonymized.sql  deploy_to_staging:   stage: deploy   script:     - PGPASSWORD=$STAGING_DB_PASS psql -h $STAGING_DB_HOST -U $STAGING_DB_USER $STAGING_DB_NAME &lt; $DUMP_PATH\/anonymized.sql   only:     - schedules  # \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u043d\u0438\u044e  <\/code><\/pre>\n<h3>\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432<\/h3>\n<p>\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u0430 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e CI\/CD. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0441\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434:<\/p>\n<h4>\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438<\/h4>\n<pre><code class=\"python\"># scripts\/update_pg_anon_config.py import yaml from sqlalchemy import create_engine, inspect  def generate_config():     engine = create_engine('postgresql:\/\/user:pass@host\/db')     inspector = inspect(engine)      config = {'tables': {}}     sensitive_columns = ['email', 'phone', 'address', 'passport']      for table in inspector.get_table_names():         columns = inspector.get_columns(table)         table_config = {}          for column in columns:             if any(sens in column['name'].lower() for sens in sensitive_columns):                 table_config[column['name']] = get_masking_rule(column)          if table_config:             config['tables'][table] = table_config      return config  def get_masking_rule(column):     if 'email' in column['name'].lower():         return {             'function': 'regex_replace',             'pattern': '(.+)@(.+)',             'replace': 'user_#{random_string(8)}@example.com'         }     # \u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430...  <\/code><\/pre>\n<h4>Makefile \u0434\u043b\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438<\/h4>\n<pre><code>.PHONY: anonymize validate deploy  DUMP_PATH ?= dumps CONFIG_PATH ?= config\/pg_anon.yml  anonymize: $(DUMP_PATH)\/prod.sql @echo \"Anonymizing database dump...\" pg_anon -c $(CONFIG_PATH) -i $&lt; -o $(DUMP_PATH)\/anonymized.sql  validate: $(DUMP_PATH)\/anonymized.sql @echo \"Validating anonymized data...\" .\/scripts\/validate_masked_data.sh $  deploy: validate @echo \"Deploying to development environment...\" PGPASSWORD=$(DEV_DB_PASS) psql -h $(DEV_DB_HOST) \\\\ -U $(DEV_DB_USER) $(DEV_DB_NAME) &lt; $(DUMP_PATH)\/anonymized.sql  <\/code><\/pre>\n<h3>\u041c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433 \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c<\/h3>\n<p>\u041c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0430\u043d\u043e\u043d\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0442\u0430\u043a \u0436\u0435 \u0432\u0430\u0436\u0435\u043d, \u043a\u0430\u043a \u0438 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u043d-\u0441\u0438\u0441\u0442\u0435\u043c. \u0412\u043e\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u043c\u0435\u0442\u0440\u0438\u043a:<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/qo\/vj\/r5\/qovjr5lbpysu6h0zz06zkqvfib4.png\" data-src=\"https:\/\/habrastorage.org\/webt\/qo\/vj\/r5\/qovjr5lbpysu6h0zz06zkqvfib4.png\"\/><\/figure>\n<h4>Prometheus \u043c\u0435\u0442\u0440\u0438\u043a\u0438:<\/h4>\n<pre><code class=\"python\"># metrics_collector.py from prometheus_client import Counter, Gauge, Histogram  ANONYMIZATION_DURATION = Histogram(     'pg_anon_duration_seconds',     'Time spent anonymizing data' )  RECORDS_PROCESSED = Counter(     'pg_anon_records_processed',     'Number of records processed',     ['table'] )  ANONYMIZATION_ERRORS = Counter(     'pg_anon_errors',     'Number of anonymization errors',     ['type'] )  <\/code><\/pre>\n<h4>Alerting \u043f\u0440\u0430\u0432\u0438\u043b\u0430:<\/h4>\n<pre><code class=\"yaml\"># prometheus\/rules\/pg_anon.yml groups:   - name: pg_anon     rules:       - alert: AnonymizationTakingTooLong         expr: pg_anon_duration_seconds &gt; 3600  # 1 \u0447\u0430\u0441         labels:           severity: warning         annotations:           description: \"Anonymization process taking too long\"        - alert: HighErrorRate         expr: rate(pg_anon_errors[5m]) &gt; 0.1         labels:           severity: critical  <\/code><\/pre>\n<h3>\u041e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b: \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u0443\u043b\u044c\u0442\u0443\u0440\u044b \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438<\/h3>\n<p>\u0412\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u0435 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u0430\u043d\u043e\u043d\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u2013 \u044d\u0442\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0430 \u0443\u0441\u043f\u0435\u0445\u0430. \u0411\u0435\u0437 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0434\u0430\u0436\u0435 \u0441\u0430\u043c\u044b\u0435 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u043c\u043e\u0433\u0443\u0442 \u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u0431\u0435\u0441\u043f\u043e\u043b\u0435\u0437\u043d\u044b\u043c\u0438. \u041f\u043e \u0434\u0430\u043d\u043d\u044b\u043c \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0439, \u043e\u043a\u043e\u043b\u043e 80% \u0438\u043d\u0446\u0438\u0434\u0435\u043d\u0442\u043e\u0432 \u0441 \u0443\u0442\u0435\u0447\u043a\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u044f\u0442 \u0438\u0437-\u0437\u0430 \u0447\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0444\u0430\u043a\u0442\u043e\u0440\u0430, \u0430 \u043d\u0435 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0435\u0439.<\/p>\n<p>\u041e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u2013 \u044d\u0442\u043e \u043d\u0435 \u0440\u0430\u0437\u043e\u0432\u043e\u0435 \u043c\u0435\u0440\u043e\u043f\u0440\u0438\u044f\u0442\u0438\u0435, \u0430 \u043d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u0442\u0430\u0442\u044c \u0447\u0430\u0441\u0442\u044c\u044e \u043a\u0443\u043b\u044c\u0442\u0443\u0440\u044b \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0441\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043a \u0435\u0433\u043e \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438:<\/p>\n<h4>\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438<\/h4>\n<p>\u0412\u0430\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0436\u0438\u0432\u0443\u044e, \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c\u0443\u044e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0440\u0430\u0441\u0442\u0451\u0442 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c:<\/p>\n<pre><code class=\"markdown\"># docs\/anonymization.md  ## \u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u0430\u043d\u043e\u043d\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445  ### \u0411\u044b\u0441\u0442\u0440\u044b\u0439 \u0441\u0442\u0430\u0440\u0442 ```bash make anonymize  # \u0421\u043e\u0437\u0434\u0430\u0435\u0442 \u0430\u043d\u043e\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0434\u0430\u043c\u043f make validate   # \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u0430\u043d\u043e\u043d\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 make deploy     # \u0420\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u0442 \u0432 dev-\u0441\u0440\u0435\u0434\u0435  <\/code><\/pre>\n<h4>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u043e\u0432\u044b\u0445 \u043f\u0440\u0430\u0432\u0438\u043b<\/h4>\n<ol>\n<li>\n<p>\u041e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 <code>config\/pg_anon.yml<\/code><\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u043d\u043e\u0432\u043e\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e:<\/p>\n<pre><code class=\"yaml\">tables:   your_table:     sensitive_column:       function: 'your_masking_function'       # \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b...  <\/code><\/pre>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/p>\n<pre><code class=\"bash\">make validate  <\/code><\/pre>\n<\/li>\n<\/ol>\n<p>\u0412\u0430\u0436\u043d\u043e: \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0439\u0442\u0435 \u043d\u043e\u0432\u044b\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043d\u0430 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u043c \u043d\u0430\u0431\u043e\u0440\u0435 \u0434\u0430\u043d\u043d\u044b\u0445<\/p>\n<h4>\u0427\u0435\u043a-\u043b\u0438\u0441\u0442 \u0434\u043b\u044f \u043a\u043e\u0434 \u0440\u0435\u0432\u044c\u044e<\/h4>\n<p>\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043a\u043e\u0434\u0430 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0447\u0435\u043a-\u043b\u0438\u0441\u0442 \u043f\u043e \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0445:<\/p>\n<pre><code class=\"yaml\"> # .github\/pull_request_template.md ## \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0430\u043d\u043e\u043d\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445  - [ ] \u0412\u0441\u0435 \u043d\u043e\u0432\u044b\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438\u043c\u0435\u044e\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043c\u0430\u0441\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f - [ ] \u041f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u044b \u0432\u0441\u0435 \u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u043e\u043b\u044f - [ ] \u0417\u0430\u043f\u0443\u0449\u0435\u043d\u044b \u0442\u0435\u0441\u0442\u044b \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438 - [ ] \u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f  <\/code><\/pre>\n<h4>\u0420\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u0432\u043e\u0440\u043a\u0448\u043e\u043f\u044b \u0438 \u043e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u044f<\/h4>\n<p>\u041e\u0440\u0433\u0430\u043d\u0438\u0437\u0443\u0439\u0442\u0435 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u0432\u0441\u0442\u0440\u0435\u0447\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0434\u043b\u044f:<\/p>\n<ul>\n<li>\n<p>\u0420\u0430\u0437\u0431\u043e\u0440\u0430 \u043d\u043e\u0432\u044b\u0445 \u043a\u0435\u0439\u0441\u043e\u0432 \u0438 \u043b\u0443\u0447\u0448\u0438\u0445 \u043f\u0440\u0430\u043a\u0442\u0438\u043a<\/p>\n<\/li>\n<li>\n<p>\u041e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u044f \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0449\u0438\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c<\/p>\n<\/li>\n<li>\n<p>\u041e\u0431\u043c\u0435\u043d\u0430 \u043e\u043f\u044b\u0442\u043e\u043c \u043c\u0435\u0436\u0434\u0443 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u043c\u0438<\/p>\n<\/li>\n<li>\n<p>\u0417\u043d\u0430\u043a\u043e\u043c\u0441\u0442\u0432\u0430 \u0441 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f\u043c\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432<\/p>\n<\/li>\n<\/ul>\n<h4>\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438<\/h4>\n<p>\u0412\u043d\u0435\u0434\u0440\u0438\u0442\u0435 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u0435 \u0441\u043e\u0431\u043b\u044e\u0434\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u0430:<\/p>\n<pre><code class=\"python\"># scripts\/check_sensitive_data.py def check_new_tables():     \"\"\"     \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442, \u0447\u0442\u043e \u0432\u0441\u0435 \u043d\u043e\u0432\u044b\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438\u043c\u0435\u044e\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0430\u043d\u043e\u043d\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438     \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c PR     \"\"\"     db_tables = get_database_tables()     config_tables = get_config_tables()      missing_tables = db_tables - config_tables     if missing_tables:         print(f\"Warning: Tables without anonymization rules: {missing_tables}\")         print(\"Please add rules to config\/pg_anon.yml\")         return False     return True  <\/code><\/pre>\n<h4>\u041c\u0435\u0442\u0440\u0438\u043a\u0438 \u0438 \u043e\u0442\u0447\u0435\u0442\u043d\u043e\u0441\u0442\u044c<\/h4>\n<p>\u0412\u043d\u0435\u0434\u0440\u0438\u0442\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043c\u0435\u0442\u0440\u0438\u043a \u0434\u043b\u044f \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430:<\/p>\n<ul>\n<li>\n<p>\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u044b\u044f\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u0439<\/p>\n<\/li>\n<li>\n<p>\u0412\u0440\u0435\u043c\u044f \u0440\u0435\u0430\u043a\u0446\u0438\u0438 \u043d\u0430 \u0438\u043d\u0446\u0438\u0434\u0435\u043d\u0442\u044b<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0446\u0435\u043d\u0442 \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c\u0438 \u0430\u043d\u043e\u043d\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438<\/p>\n<\/li>\n<li>\n<p>\u0410\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0432 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0438 \u043f\u0440\u0430\u0432\u0438\u043b<\/p>\n<\/li>\n<\/ul>\n<p>\u0420\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e \u0434\u0435\u043b\u0438\u0442\u0435\u0441\u044c \u044d\u0442\u0438\u043c\u0438 \u043c\u0435\u0442\u0440\u0438\u043a\u0430\u043c\u0438 \u0441 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439, \u043f\u0440\u0430\u0437\u0434\u043d\u0443\u0439\u0442\u0435 \u0443\u0441\u043f\u0435\u0445\u0438 \u0438 \u043e\u0442\u043a\u0440\u044b\u0442\u043e \u043e\u0431\u0441\u0443\u0436\u0434\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b.<\/p>\n<h4>\u0421\u0438\u0441\u0442\u0435\u043c\u0430 \u043d\u0430\u0441\u0442\u0430\u0432\u043d\u0438\u0447\u0435\u0441\u0442\u0432\u0430<\/h4>\n<p>\u041d\u0430\u0437\u043d\u0430\u0447\u044c\u0442\u0435 \u043e\u043f\u044b\u0442\u043d\u044b\u0445 \u0447\u043b\u0435\u043d\u043e\u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043d\u0430\u0441\u0442\u0430\u0432\u043d\u0438\u043a\u0430\u043c\u0438 \u0434\u043b\u044f \u043d\u043e\u0432\u044b\u0445 \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u043e\u0432. \u042d\u0442\u043e \u043f\u043e\u043c\u043e\u0436\u0435\u0442:<\/p>\n<ul>\n<li>\n<p>\u0411\u044b\u0441\u0442\u0440\u0435\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0437\u043d\u0430\u043d\u0438\u044f \u0438 \u043e\u043f\u044b\u0442<\/p>\n<\/li>\n<li>\n<p>\u0421\u043d\u0438\u0437\u0438\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0448\u0438\u0431\u043e\u043a<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u0443\u043b\u044c\u0442\u0443\u0440\u0443 \u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f \u043a \u0434\u0430\u043d\u043d\u044b\u043c<\/p>\n<\/li>\n<li>\n<p>\u041e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u043f\u0440\u0435\u0435\u043c\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0437\u043d\u0430\u043d\u0438\u0439<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u043e\u043c\u043d\u0438\u0442\u0435, \u0447\u0442\u043e \u0433\u043b\u0430\u0432\u043d\u0430\u044f \u0446\u0435\u043b\u044c \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u2013 \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0430\u0443\u0447\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b, \u0430 \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0443\u043b\u044c\u0442\u0443\u0440\u0443, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u044c\u044e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438. \u041a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0430, \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u0433\u0434\u0435 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u0442\u0430\u043b\u0430 \u0447\u0430\u0441\u0442\u044c\u044e \u043a\u0443\u043b\u044c\u0442\u0443\u0440\u044b, \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u0435\u0435 \u0438 \u0434\u043e\u043f\u0443\u0441\u043a\u0430\u044e\u0442 \u043c\u0435\u043d\u044c\u0448\u0435 \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043e\u0448\u0438\u0431\u043e\u043a.<\/p>\n<h2>\u041a\u0435\u0439\u0441-\u0441\u0442\u0430\u0434\u0438 \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f pg_anon<\/h2>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u044f \u0445\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u043c \u043e\u043f\u044b\u0442\u043e\u043c \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f pg_anon \u0432 \u043a\u0440\u0443\u043f\u043d\u043e\u043c \u043c\u0435\u0434\u0442\u0435\u0445-\u043f\u0440\u043e\u0435\u043a\u0442\u0435. \u042d\u0442\u0430 \u0438\u0441\u0442\u043e\u0440\u0438\u044f \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u0430, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043c\u0435\u0434\u0438\u0446\u0438\u043d\u0441\u043a\u0438\u0439 \u0441\u0435\u043a\u0442\u043e\u0440 \u043f\u0440\u0435\u0434\u044a\u044f\u0432\u043b\u044f\u0435\u0442 \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u043d\u044b\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<h3>\u0418\u0441\u0442\u043e\u0440\u0438\u044f \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f<\/h3>\n<p>\u0412 2016 \u0433\u043e\u0434\u0443 \u044f \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u043e\u043c \u0432 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438, \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0449\u0435\u0439 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u043f\u0430\u0446\u0438\u0435\u043d\u0442\u043e\u0432. \u0421\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u0431\u044b\u043b\u0430 \u0442\u0438\u043f\u0438\u0447\u043d\u043e\u0439: \u0431\u043e\u043b\u0435\u0435 50 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432, \u043e\u043a\u043e\u043b\u043e 20 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u043e\u0432, \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u043e\u0432 \u0438 data science \u043e\u0442\u0434\u0435\u043b. \u0412\u0441\u0435 \u043e\u043d\u0438 \u043d\u0443\u0436\u0434\u0430\u043b\u0438\u0441\u044c \u0432 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b. \u0412 \u0442\u0435 \u0443\u0436\u0435 \u0434\u0430\u043b\u0435\u043a\u0438\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0430, \u0432\u0441\u0435 \u044d\u0442\u0430\u043f\u044b, \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u043d\u0438\u0436\u0435, \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0432\u043e\u0438\u043c\u0438 \u043b\u0430\u043f\u043a\u0430\u043c\u0438. \u041d\u043e \u0435\u0441\u043b\u0438 \u0432\u0441\u0435, \u0447\u0442\u043e \u0431\u044b\u043b\u043e \u043d\u0430\u043c\u0438 \u0441\u0434\u0435\u043b\u0430\u043d\u043e, \u043f\u0435\u0440\u0435\u043b\u043e\u0436\u0438\u0442\u044c \u043d\u0430 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u0442\u0443\u043b\u0438\u043d\u0433, \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a, \u043a\u0430\u043a \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u043d\u0438\u0436\u0435.<\/p>\n<p>\u0418\u0441\u0445\u043e\u0434\u043d\u0430\u044f \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b\u0430 \u0442\u0430\u043a:<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/2t\/dp\/rr\/2tdprrjczzouwzznuen7wbbandq.png\" data-src=\"https:\/\/habrastorage.org\/webt\/2t\/dp\/rr\/2tdprrjczzouwzznuen7wbbandq.png\"\/><\/figure>\n<p>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0431\u044b\u043b\u0438 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b:<\/p>\n<ol>\n<li>\n<p>Data Science \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0441 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u043d-\u0434\u0430\u043d\u043d\u044b\u043c\u0438<\/p>\n<\/li>\n<li>\n<p>\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0438\u043c\u0435\u043b\u0438 \u043a\u043e\u043f\u0438\u0438 \u0441 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u043f\u0430\u0441\u043f\u043e\u0440\u0442\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438<\/p>\n<\/li>\n<li>\n<p>\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u043d\u0435\u043c\u0430\u0441\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0438\u0441\u0442\u043e\u0440\u0438\u0438 \u0431\u043e\u043b\u0435\u0437\u043d\u0435\u0439 \u043f\u0430\u0446\u0438\u0435\u043d\u0442\u043e\u0432<\/p>\n<\/li>\n<\/ol>\n<p>\u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f \u043c\u044b \u0440\u0430\u0437\u0431\u0438\u043b\u0438 \u043d\u0430 \u044d\u0442\u0430\u043f\u044b:<\/p>\n<h4>\u042d\u0442\u0430\u043f 1: \u0410\u0443\u0434\u0438\u0442 \u0434\u0430\u043d\u043d\u044b\u0445<\/h4>\n<pre><code class=\"python\"># \u0421\u043a\u0440\u0438\u043f\u0442 \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 def audit_sensitive_data():     sensitive_patterns = {         'passport': r'\\\\d{4}\\\\s?\\\\d{6}',         'phone': r'\\\\+7\\\\d{10}',         'credit_card': r'\\\\d{4}[-\\\\s]?\\\\d{4}[-\\\\s]?\\\\d{4}[-\\\\s]?\\\\d{4}'     }      results = {}     for table in get_all_tables():         for column in get_columns(table):             for pattern_name, pattern in sensitive_patterns.items():                 if has_matching_data(column, pattern):                     results[f\"{table}.{column}\"] = pattern_name     return results  <\/code><\/pre>\n<h4>\u042d\u0442\u0430\u043f 2: \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438<\/h4>\n<pre><code class=\"yaml\"># Initial pg_anon.yml tables:   clients:     passport_number:       function: 'regex_replace'       pattern: '\\\\d{4}\\\\s?\\\\d{6}'       replace: '0000 000000'     med_score:       function: 'random_int'       min: 300       max: 850   prescriptions:     amount:       function: 'multiply'       factor: 1.1     approval_status:       function: 'static'       value: 'APPROVED'  <\/code><\/pre>\n<h4>\u042d\u0442\u0430\u043f 3: \u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0441 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430\u043c\u0438<\/h4>\n<pre><code class=\"bash\">#!\/bin\/bash # daily_anonymization.sh  # \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0434\u0430\u043c\u043f \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d\u0430 pg_dump $PROD_DB &gt; \/tmp\/prod_dump.sql  # \u0410\u043d\u043e\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u0435\u043c pg_anon -c pg_anon.yml -i \/tmp\/prod_dump.sql -o \/tmp\/anon_dump.sql  # \u0420\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434 psql $DEV_DB &lt; \/tmp\/anon_dump.sql psql $QA_DB &lt; \/tmp\/anon_dump.sql psql $ANALYTICS_DB &lt; \/tmp\/anon_dump.sql  <\/code><\/pre>\n<h3>\u0412\u043e\u0437\u043d\u0438\u043a\u0448\u0438\u0435 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0438 \u0438\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0435<\/h3>\n<h4>1. \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430: \u041f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c<\/h4>\n<p>\u041f\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0430\u043d\u043e\u043d\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f 500GB \u0431\u0430\u0437\u044b \u0437\u0430\u043d\u044f\u043b\u0430 8 \u0447\u0430\u0441\u043e\u0432.<\/p>\n<p>\u0420\u0435\u0448\u0435\u043d\u0438\u0435:<\/p>\n<pre><code class=\"python\"># parallel_anonymization.py from multiprocessing import Pool  def process_chunk(chunk):     return pg_anon.process_data(chunk)  def parallel_anonymize(data, chunks=8):     with Pool(chunks) as p:         return p.map(process_chunk, split_data(data, chunks))  <\/code><\/pre>\n<h4>2. \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430: \u0421\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0441\u0432\u044f\u0437\u043d\u043e\u0441\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0445<\/h4>\n<p>\u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438\u043c\u0435\u043b\u0438 foreign key \u0441\u0432\u044f\u0437\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043b\u043e\u043c\u0430\u043b\u0438\u0441\u044c \u043f\u0440\u0438 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0439 \u0430\u043d\u043e\u043d\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<p>\u0420\u0435\u0448\u0435\u043d\u0438\u0435:<\/p>\n<pre><code class=\"yaml\"># pg_anon.yml \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 \u0441\u0432\u044f\u0437\u0435\u0439 tables:   users:     id:       function: 'maintain_refs'       referenced_by: ['orders.user_id', 'profiles.user_id']     email:       function: 'consistent_replace'       salt: 'user_email_salt'  # \u041e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u0443\u044e \u0437\u0430\u043c\u0435\u043d\u0443  <\/code><\/pre>\n<h4>3. \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430: \u0421\u043e\u043f\u0440\u043e\u0442\u0438\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b<\/h4>\n<p>\u0410\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0438 \u0436\u0430\u043b\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u043d\u0430 \u0438\u0441\u043a\u0430\u0436\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u043e\u0442\u0447\u0435\u0442\u043e\u0432.<\/p>\n<p>\u0420\u0435\u0448\u0435\u043d\u0438\u0435: \u0421\u043e\u0437\u0434\u0430\u043b\u0438 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0432\u044b\u0433\u0440\u0443\u0437\u043e\u043a:<\/p>\n<pre><code class=\"yaml\"># analytics_rules.yml tables:   prescriptions:     amount:       function: 'noise_addition'       percentage: 5  # \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0448\u0443\u043c \u00b15%     date:       function: 'time_shift'       days: 30  # \u0421\u0434\u0432\u0438\u0433\u0430\u0435\u043c \u0432\u0441\u0435 \u0434\u0430\u0442\u044b \u043d\u0430 \u043c\u0435\u0441\u044f\u0446  <\/code><\/pre>\n<h3>\u0418\u0437\u043c\u0435\u0440\u0438\u043c\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b<\/h3>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0448\u0435\u0441\u0442\u0438 \u043c\u0435\u0441\u044f\u0446\u0435\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f pg_anon \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0432\u043f\u0435\u0447\u0430\u0442\u043b\u044f\u044e\u0449\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b:<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/bb\/rb\/or\/bbrbor2ev8vfeih-hj8qmsu5dyq.png\" data-src=\"https:\/\/habrastorage.org\/webt\/bb\/rb\/or\/bbrbor2ev8vfeih-hj8qmsu5dyq.png\"\/><\/figure>\n<p>\u041a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438:<\/p>\n<ol>\n<li>\n<p>\u0412\u0440\u0435\u043c\u044f \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0438 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0439 \u0441\u0440\u0435\u0434\u044b: <\/p>\n<ul>\n<li>\n<p>\u0414\u043e: 2-3 \u0434\u043d\u044f \u0440\u0443\u0447\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0441\u043b\u0435: 2 \u0447\u0430\u0441\u0430 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u0411\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c: <\/p>\n<ul>\n<li>\n<p>\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0438\u043d\u0446\u0438\u0434\u0435\u043d\u0442\u043e\u0432 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438: \u0441 5-6 \u0432 \u043c\u0435\u0441\u044f\u0446 \u0434\u043e 0<\/p>\n<\/li>\n<li>\n<p>\u0423\u0441\u043f\u0435\u0448\u043d\u043e\u0435 \u043f\u0440\u043e\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0435 \u0430\u0443\u0434\u0438\u0442\u0430 PCI DSS<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430: <\/p>\n<ul>\n<li>\n<p>\u0423\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u0435 \u0446\u0438\u043a\u043b\u0430 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430 40%<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u043d\u043e\u0432\u044b\u0445 \u0444\u0438\u0447<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h3>\u0412\u044b\u0432\u043e\u0434\u044b \u0438 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438<\/h3>\n<p><strong>\u041d\u0430\u0447\u0438\u043d\u0430\u0439\u0442\u0435 \u0441 \u043c\u0430\u043b\u043e\u0433\u043e<\/strong><\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/gs\/cb\/na\/gscbnahy5bewqfhaztwb3owq6zq.png\" data-src=\"https:\/\/habrastorage.org\/webt\/gs\/cb\/na\/gscbnahy5bewqfhaztwb3owq6zq.png\"\/><\/figure>\n<p><strong>\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u0443\u0439\u0442\u0435 \u0432\u0441\u0451<\/strong><\/p>\n<pre><code class=\"yaml\"># ansible\/roles\/pg_anon\/tasks\/main.yml - name: Install pg_anon   apt:     name: pg_anon     state: present  - name: Setup daily anonymization   cron:     name: \"Anonymize production data\"     hour: \"1\"     minute: \"0\"     job: \"\/usr\/local\/bin\/anonymize_data.sh\"  <\/code><\/pre>\n<p><strong>\u041c\u043e\u043d\u0438\u0442\u043e\u0440\u044c\u0442\u0435 \u0438 \u0443\u043b\u0443\u0447\u0448\u0430\u0439\u0442\u0435<\/strong><\/p>\n<pre><code class=\"python\"># monitoring.py def collect_metrics():     return {         'processing_time': measure_processing_time(),         'data_reduction': calculate_data_reduction(),         'validation_errors': count_validation_errors()     }  <\/code><\/pre>\n<p>\u0413\u043b\u0430\u0432\u043d\u044b\u0439 \u0443\u0440\u043e\u043a: \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u0435 \u0430\u043d\u043e\u043d\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u2013 \u044d\u0442\u043e \u043d\u0435 \u043f\u0440\u043e\u0435\u043a\u0442, \u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441. \u0411\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c \u2013 \u044d\u0442\u043e \u043c\u0430\u0440\u0430\u0444\u043e\u043d, \u0430 \u043d\u0435 \u0441\u043f\u0440\u0438\u043d\u0442. \u041d\u0430\u0447\u043d\u0438\u0442\u0435 \u0441 \u043c\u0430\u043b\u043e\u0433\u043e, \u043f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0439\u0442\u0435 \u043e\u0445\u0432\u0430\u0442 \u0438 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0443\u043b\u0443\u0447\u0448\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0441\u0432\u044f\u0437\u0438 \u043e\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u044b.<\/p>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435: \u041f\u0443\u0442\u044c \u043a \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438<\/h2>\n<p>\u0412 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043c\u044b \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u0435\u043c\u0441\u044f \u0441 \u043f\u0430\u0440\u0430\u0434\u043e\u043a\u0441\u043e\u043c: \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u044b \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438, \u043d\u043e \u043c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u0440\u0438\u0441\u043a\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c\u044e. \u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u044d\u0442\u043e\u0433\u043e \u043f\u0430\u0440\u0430\u0434\u043e\u043a\u0441\u0430 \u043b\u0435\u0436\u0438\u0442 \u0432 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0430\u043d\u043e\u043d\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438. \u0412\u043e\u0442 \u043a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0432\u044b\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441:<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/rr\/fp\/ud\/rrfpududgnjqt5nwy5kcpyi-rja.png\" data-src=\"https:\/\/habrastorage.org\/webt\/rr\/fp\/ud\/rrfpududgnjqt5nwy5kcpyi-rja.png\"\/><\/figure>\n<p>\u041a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0438\u0437\u0443\u0447\u0438\u043b\u0438:<\/p>\n<ol>\n<li>\n<p>\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u2013 \u043e\u0441\u043d\u043e\u0432\u0430 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438<\/p>\n<\/li>\n<li>\n<p>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u043a\u0430\u043a \u043a\u043e\u0434 (Infrastructure as Code)<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u0439 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433 \u0438 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435<\/p>\n<\/li>\n<li>\n<p>\u041e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u2013 \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0444\u0430\u043a\u0442\u043e\u0440 \u0443\u0441\u043f\u0435\u0445\u0430<\/p>\n<\/li>\n<\/ol>\n<h3>\u0427\u0435\u043a-\u043b\u0438\u0441\u0442 \u0434\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0440\u0430\u0431\u043e\u0442\u044b<\/h3>\n<p>\u042f \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u043b\u0441\u044f \u043d\u0430\u0431\u0440\u043e\u0441\u0430\u0442\u044c \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0447\u0435\u043a-\u043b\u0438\u0441\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0432\u0430\u043c \u043d\u0430\u0447\u0430\u0442\u044c \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u0435 pg_anon:<\/p>\n<pre><code class=\"python\"># checklist.py class AnonymizationChecklist:     def initial_audit(self):         \"\"\"         1. \u0410\u0443\u0434\u0438\u0442 \u0434\u0430\u043d\u043d\u044b\u0445         - \u041d\u0430\u0439\u0442\u0438 \u0432\u0441\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0441 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438         - \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0442\u0438\u043f\u044b \u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438         - \u0421\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043a\u0430\u0440\u0442\u0443 \u0441\u0432\u044f\u0437\u0435\u0439 \u043c\u0435\u0436\u0434\u0443 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u043c\u0438         \"\"\"         pass      def setup_infrastructure(self):         \"\"\"         2. \u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b         - \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c pg_anon         - \u041d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u044b \u0438 \u043f\u0440\u0430\u0432\u0430         - \u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u0442\u0435\u0441\u0442\u043e\u0432\u0443\u044e \u0441\u0440\u0435\u0434\u0443         \"\"\"         pass      def create_configuration(self):         \"\"\"         3. \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438         - \u041d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043c\u0430\u0441\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f         - \u041f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u043c\u0430\u043b\u043e\u043c \u043d\u0430\u0431\u043e\u0440\u0435 \u0434\u0430\u043d\u043d\u044b\u0445         - \u0412\u0430\u043b\u0438\u0434\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b         \"\"\"         pass      def integrate_cicd(self):         \"\"\"         4. \u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0441 CI\/CD         - \u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u044d\u0442\u0430\u043f \u0430\u043d\u043e\u043d\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0432 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d         - \u041d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044e         - \u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433         \"\"\"         pass      def team_preparation(self):         \"\"\"         5. \u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u044b         - \u041f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435         - \u041d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e         - \u0421\u043e\u0431\u0440\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0442\u043d\u0443\u044e \u0441\u0432\u044f\u0437\u044c         \"\"\"         pass  <\/code><\/pre>\n<p>\u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u044d\u0442\u0430\u043f\u0430 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b:<\/p>\n<pre><code class=\"yaml\"># config\/anonymization\/ \u251c\u2500\u2500 audit.yml        # \u041f\u0440\u0430\u0432\u0438\u043b\u0430 \u0430\u0443\u0434\u0438\u0442\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u251c\u2500\u2500 masking.yml      # \u041f\u0440\u0430\u0432\u0438\u043b\u0430 \u043c\u0430\u0441\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u251c\u2500\u2500 validation.yml   # \u041f\u0440\u0430\u0432\u0438\u043b\u0430 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438 \u2514\u2500\u2500 monitoring.yml   # \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430  <\/code><\/pre>\n<h3>\u041f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0438 \u0441\u0441\u044b\u043b\u043a\u0438<\/h3>\n<h4>1. \u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0438 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0430<\/h4>\n<pre><code class=\"python\"># documentation_structure.py resources = {     'official_docs': '&lt;https:\/\/github.com\/TantorLabs\/pg_anon\/wiki&gt;',     'tutorials': {         'quick_start': '&lt;https:\/\/pg-anon.readthedocs.io\/quick_start.html&gt;',         'best_practices': '&lt;https:\/\/pg-anon.readthedocs.io\/best_practices.html&gt;'     },     'community': '&lt;https:\/\/github.com\/TantorLabs\/pg_anon\/discussions&gt;' }  <\/code><\/pre>\n<h4>2. \u0413\u043e\u0442\u043e\u0432\u044b\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u0442\u0438\u043f\u043e\u0432\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u0435\u0432<\/h4>\n<pre><code class=\"yaml\"># templates\/common_cases.yml financial_data:   credit_cards:     pattern: '\\\\d{4}-\\\\d{4}-\\\\d{4}-\\\\d{4}'     replacement: 'XXXX-XXXX-XXXX-{last4}'  healthcare_data:   patient_records:     identifiers: 'random_consistent'     medical_codes: 'preserve'  <\/code><\/pre>\n<h4>3. \u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0430<\/h4>\n<pre><code class=\"bash\"># tools\/monitoring\/setup.sh #!\/bin\/bash  # \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Prometheus \u0438 Grafana helm install prometheus prometheus-community\/prometheus helm install grafana grafana\/grafana  # \u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u0448\u0431\u043e\u0440\u0434\u043e\u0432 \u0434\u043b\u044f pg_anon kubectl apply -f monitoring\/dashboards\/pg_anon.json  <\/code><\/pre>\n<p>\u0412 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435 \u0445\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0438\u0441\u0442\u0438\u043d\u043e\u0439: \u043b\u0443\u0447\u0448\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u2013 \u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u0435\u043b\u0430\u0439\u0442\u0435 \u0432\u0430\u0448\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u043f\u0440\u043e\u0441\u0442\u044b\u043c\u0438, \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u043c\u0438 \u0438 \u0443\u0434\u043e\u0431\u043d\u044b\u043c\u0438 \u0434\u043b\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u044b. \u0418 \u0442\u043e\u0433\u0434\u0430 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c \u0441\u0442\u0430\u043d\u0435\u0442 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u044c\u044e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438, \u0430 \u043d\u0435 \u043e\u0431\u0443\u0437\u043e\u0439.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/c7\/xd\/gp\/c7xdgpbbqmaherrql3juyogkstg.png\" data-src=\"https:\/\/habrastorage.org\/webt\/c7\/xd\/gp\/c7xdgpbbqmaherrql3juyogkstg.png\"\/><\/figure>\n<p>\u0423\u0441\u043f\u0435\u0445\u043e\u0432 \u0432 \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u0438 \u0438 \u043f\u043e\u043c\u043d\u0438\u0442\u0435: \u0432\u0430\u0448\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u2013 \u044d\u0442\u043e \u0432\u0430\u0448\u0430 \u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0441\u0442\u044c. \u0411\u0435\u0440\u0435\u0433\u0438\u0442\u0435 \u0438\u0445!<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \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\/articles\/876124\/\"> https:\/\/habr.com\/ru\/articles\/876124\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"\"><\/figure>\n<p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e: \u043f\u044f\u0442\u043d\u0438\u0446\u0430, \u043a\u043e\u043d\u0435\u0446 \u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e \u0434\u043d\u044f. \u0412\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0435\u0441\u044c \u0434\u043e\u043c\u043e\u0439, \u043a\u0430\u043a \u0432\u0434\u0440\u0443\u0433 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043e\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438: &#171;\u0423 \u043d\u0430\u0441 \u0441\u0442\u0440\u0430\u043d\u043d\u044b\u0439 \u0431\u0430\u0433 \u0432 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d\u0435, \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e. \u041c\u043e\u0436\u043d\u043e \u0441\u0432\u0435\u0436\u0438\u0439 \u0434\u0430\u043c\u043f \u0431\u043e\u0435\u0432\u043e\u0439 \u0431\u0430\u0437\u044b?&#187;. \u0417\u043d\u0430\u043a\u043e\u043c\u043e, \u043f\u0440\u0430\u0432\u0434\u0430?<\/p>\n<p>\u0412 2007 \u0433\u043e\u0434\u0443, \u043a\u043e\u0433\u0434\u0430 \u044f \u043d\u0430\u0447\u0438\u043d\u0430\u043b \u043a\u0430\u0440\u044c\u0435\u0440\u0443 \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u0430, \u0432\u043e \u043c\u043d\u043e\u0433\u0438\u0445 \u0441\u0440\u0435\u0434\u043d\u0438\u0445 \u0438 \u0434\u0430\u0436\u0435 \u043a\u0440\u0443\u043f\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f\u0445 \u043d\u0435\u0431\u0440\u0435\u0436\u043d\u043e\u0435 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u043a \u0434\u0430\u043d\u043d\u044b\u043c \u0431\u044b\u043b\u043e \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u043c \u044f\u0432\u043b\u0435\u043d\u0438\u0435\u043c. \u0420\u0430\u0431\u043e\u0442\u0430\u044f \u0432 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0437\u0430\u0440\u0443\u0431\u0435\u0436\u043d\u043e\u0439 \u0418\u0422-\u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438, \u044f \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u043b, \u043a\u0430\u043a \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0443\u0440\u043e\u0432\u043d\u044f middle \u0438 senior \u0441\u043f\u043e\u043a\u043e\u0439\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u043a\u043e\u043f\u0438\u0438 \u043f\u0440\u043e\u0434\u043e\u0432\u044b\u0445 \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043d\u0435 \u0437\u0430\u0434\u0443\u043c\u044b\u0432\u0430\u044f\u0441\u044c \u043e \u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u044f\u0445.<\/p>\n<p>\u0422\u0430\u043a\u0430\u044f \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0430 \u0432\u0441\u043a\u043e\u0440\u0435 \u043f\u0440\u0438\u0432\u0435\u043b\u0430 \u043a \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u043d\u044b\u043c \u0443\u0442\u0435\u0447\u043a\u0430\u043c \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0434\u0440\u0443\u0433\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0434\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0439. \u0420\u0435\u0433\u0443\u043b\u044f\u0442\u043e\u0440\u044b \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u0442\u0440\u0430\u043d\u0430\u0445 \u043e\u0442\u0440\u0435\u0430\u0433\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0443\u0436\u0435\u0441\u0442\u043e\u0447\u0435\u043d\u0438\u0435\u043c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f, \u0447\u0442\u043e \u043f\u043e\u0432\u043b\u0435\u043a\u043b\u043e \u0437\u0430 \u0441\u043e\u0431\u043e\u0439 \u043c\u043d\u043e\u0433\u043e\u043c\u0438\u043b\u043b\u0438\u043e\u043d\u043d\u044b\u0435 \u0448\u0442\u0440\u0430\u0444\u044b, \u0441\u0443\u0434\u0435\u0431\u043d\u044b\u0435 \u0438\u0441\u043a\u0438 \u043e\u0442 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u0438 \u0441\u0435\u0440\u044c\u0435\u0437\u043d\u044b\u0435 \u0440\u0435\u043f\u0443\u0442\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u043f\u043e\u0442\u0435\u0440\u0438 \u0434\u043b\u044f \u0431\u0438\u0437\u043d\u0435\u0441\u0430. \u0412\u0441\u0435\u0445 \u044d\u0442\u0438\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c, \u0435\u0441\u043b\u0438 \u0431\u044b \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0443\u0434\u0435\u043b\u044f\u043b\u0438 \u0434\u043e\u043b\u0436\u043d\u043e\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0432\u043d\u0435\u0434\u0440\u044f\u043b\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b \u0438\u0445 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438.<\/p>\n<figure class=\"\"><\/figure>\n<p>\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u044d\u0442\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u0430 \u043a\u0430\u043a \u043d\u0438\u043a\u043e\u0433\u0434\u0430. \u041f\u043e\u0447\u0435\u043c\u0443? \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0442\u0440\u0435\u043d\u0434\u044b:<\/p>\n<p><strong>\u0420\u043e\u0441\u0442 \u043e\u0431\u044a\u0451\u043c\u0430 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445<\/strong><\/p>\n<ul>\n<li>\n<p>\u0412 2023 \u0433\u043e\u0434\u0443 \u0441\u0440\u0435\u0434\u043d\u0438\u0439 \u043e\u043d\u043b\u0430\u0439\u043d-\u0441\u0435\u0440\u0432\u0438\u0441 \u0445\u0440\u0430\u043d\u0438\u0442 \u0432 3-4 \u0440\u0430\u0437\u0430 \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e \u043a\u0430\u0436\u0434\u043e\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435, \u0447\u0435\u043c \u043f\u044f\u0442\u044c \u043b\u0435\u0442 \u043d\u0430\u0437\u0430\u0434<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043d\u043e\u0432\u044b\u0435 \u0442\u0438\u043f\u044b \u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438: \u0431\u0438\u043e\u043c\u0435\u0442\u0440\u0438\u044f, \u0438\u0441\u0442\u043e\u0440\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u0439, \u043c\u0435\u0434\u0438\u0446\u0438\u043d\u0441\u043a\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u0423\u0436\u0435\u0441\u0442\u043e\u0447\u0435\u043d\u0438\u0435 \u0437\u0430\u043a\u043e\u043d\u043e\u0434\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430<\/strong><\/p>\n<ul>\n<li>\n<p>GDPR \u0432 \u0415\u0432\u0440\u043e\u043f\u0435: \u0448\u0442\u0440\u0430\u0444\u044b \u0434\u043e 20 \u043c\u043b\u043d \u0435\u0432\u0440\u043e \u0438\u043b\u0438 4% \u0433\u043e\u0434\u043e\u0432\u043e\u0433\u043e \u043e\u0431\u043e\u0440\u043e\u0442\u0430<\/p>\n<\/li>\n<li>\n<p>152-\u0424\u0417 \u0432 \u0420\u043e\u0441\u0441\u0438\u0438: \u0441 \u043a\u0430\u0436\u0434\u044b\u043c \u0433\u043e\u0434\u043e\u043c \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a \u0437\u0430\u0449\u0438\u0442\u0435 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0442\u0441\u044f \u0441\u0442\u0440\u043e\u0436\u0435<\/p>\n<\/li>\n<li>\n<p>CCPA \u0432 \u041a\u0430\u043b\u0438\u0444\u043e\u0440\u043d\u0438\u0438: \u043d\u043e\u0432\u044b\u0439 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442 \u0437\u0430\u0449\u0438\u0442\u044b \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u0430\u043c\u0435\u0440\u0438\u043a\u0430\u043d\u0441\u043a\u043e\u0433\u043e \u0440\u044b\u043d\u043a\u0430<\/p>\n<\/li>\n<\/ul>\n<p>\u041c\u043e\u044f \u043f\u0435\u0434\u0430\u0433\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0434\u0435\u044f\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043c\u043d\u0435 \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043b\u044b\u0448\u0430\u0442\u044c \u0437\u0430\u0431\u0430\u0432\u043d\u044b\u0435 \u0436\u0438\u0442\u0435\u0439\u0441\u043a\u0438\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b \u043e\u0442 \u043c\u043e\u0438\u0445 \u0441\u0442\u0443\u0434\u0435\u043d\u0442\u043e\u0432. \u041f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435 \u0441\u044e\u0436\u0435\u0442\u044b \u043c\u043e\u0436\u043d\u043e \u0443\u043b\u043e\u0436\u0438\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0430\u043d\u0435\u043a\u0434\u043e\u0442:  \u201c\u041d\u0430\u0448\u0438 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0438\/\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0438\/\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e \u0432\u044b\u0433\u0440\u0443\u0436\u0430\u044e\u0442 &#171;\u0431\u043e\u0435\u0432\u044b\u0435&#187; \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0435\u0439\/\u043d\u0430\u0433\u0440\u0443\u0437\u043e\u0447\u043d\u044b\u0445 \u0442\u0435\u0441\u0442\u043e\u0432\/\u043e\u0442\u043b\u0430\u0434\u043a\u0438\u201d. \u0421 \u0432\u0440\u0435\u043c\u0435\u043d \u043c\u043e\u0435\u0439 \u044e\u043d\u043e\u0441\u0442\u0438, \u0432\u0438\u0434\u0438\u043c\u043e, \u043f\u043e\u043c\u0435\u043d\u044f\u043b\u043e\u0441\u044c \u043d\u0435 \u0442\u0430\u043a \u043c\u043d\u043e\u0433\u043e.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0441\u043e\u0432\u0441\u0435\u043c \u0443\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u043e\u0431\u044b\u0447\u043d\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441\u043d\u044f\u0442\u0438\u044f \u0434\u0430\u043c\u043f\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f PostgreSQL \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"bash\"># \u0422\u0438\u043f\u0438\u0447\u043d\u044b\u0439 \"\u043e\u043f\u0430\u0441\u043d\u044b\u0439\" \u043f\u0440\u043e\u0446\u0435\u0441\u0441 pg_dump -h prod-db -U analyst marketplace &gt; dump.sql psql -h localhost -U analyst marketplace_local &lt; dump.sql  <\/code><\/pre>\n<p>\u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c\u0442\u0435: \u0432 \u0431\u0430\u0437\u0435 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0430\u0434\u0440\u0435\u0441\u0430 \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0438, \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u044b \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432, \u0438\u0441\u0442\u043e\u0440\u0438\u044f \u043f\u043e\u043a\u0443\u043f\u043e\u043a. \u0412\u0441\u0451 \u044d\u0442\u043e \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d\u0430\u0445 \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u043e\u0432 \u0431\u0435\u0437 \u043a\u0430\u043a\u043e\u0439-\u043b\u0438\u0431\u043e \u043c\u0430\u0441\u043a\u0438\u0440\u043e\u0432\u043a\u0438. \u041e\u0434\u043d\u0430 \u0443\u0442\u0435\u0447\u043a\u0430 \u2014 \u0438 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f \u0440\u0438\u0441\u043a\u0443\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0448\u0442\u0440\u0430\u0444 \u0432 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u044b \u0440\u0443\u0431\u043b\u0435\u0439.<\/p>\n<p>\u0425\u043e\u0440\u043e\u0448\u0430\u044f \u043d\u043e\u0432\u043e\u0441\u0442\u044c \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0432\u043d\u0435\u0434\u0440\u0438\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043d\u0435 \u0442\u0430\u043a \u0443\u0436 \u0438 \u0441\u043b\u043e\u0436\u043d\u043e, \u0438 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a:<\/p>\n<pre><code class=\"bash\"># \u0411\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441 pg_anon pg_dump -h prod-db -U analyst marketplace &gt; dump.sql pg_anon -c config.yml -i dump.sql -o safe_dump.sql psql -h localhost -U analyst marketplace_local &lt; safe_dump.sql  <\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u00a0<code>config.yml<\/code>\u00a0\u043c\u044b \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043c\u0430\u0441\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445:<\/p>\n<pre><code class=\"yaml\">tables:   users:     phone:       function: 'random_phone'       format: '+7##########'     address:       function: 'regex_replace'       pattern: '^.*$'       replace: '\u0443\u043b. \u0422\u0435\u0441\u0442\u043e\u0432\u0430\u044f, \u0434. #{random(1,100)}'     email:       function: 'regex_replace'       pattern: '(.+)@(.+)'       replace: 'user_#{random_string(8)}@example.com'  <\/code><\/pre>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0442\u0430\u043a\u0438\u0445 \u043d\u0435\u0445\u0438\u0442\u0440\u044b\u0445 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0439 \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442 \u0432\u0441\u0435 \u0432\u0430\u0436\u043d\u044b\u0435 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438 \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430, \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438.<\/p>\n<p>\u042d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u2014 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043c\u043e\u0435\u0433\u043e 15-\u043b\u0435\u0442\u043d\u0435\u0433\u043e \u043e\u043f\u044b\u0442\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0432 \u043a\u0440\u0443\u043f\u043d\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445. \u042f \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u044e\u0441\u044c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043e\u0431\u0449\u0438\u0439 \u0441\u044e\u0436\u0435\u0442, \u043a\u0430\u043a \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u043d-\u0434\u0430\u043d\u043d\u044b\u043c\u0438, \u043d\u0435 \u043c\u0435\u0448\u0430\u044f \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e. \u041c\u044b \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b, \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e \u0442\u0438\u043f\u0438\u0447\u043d\u044b\u0445 \u0433\u0440\u0430\u0431\u043b\u044f\u0445 \u0438 \u044f \u043f\u043e\u0434\u0435\u043b\u044e\u0441\u044c \u0433\u043e\u0442\u043e\u0432\u044b\u043c\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u044f\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u043d\u0435\u0434\u0440\u0438\u0442\u044c \u0443 \u0441\u0435\u0431\u044f \u0443\u0436\u0435 \u0437\u0430\u0432\u0442\u0440\u0430.<\/p>\n<p>\u0411\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c \u2014 \u044d\u0442\u043e \u043d\u0435 \u0442\u043e, \u0447\u0442\u043e \u043c\u0435\u0448\u0430\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c. \u042d\u0442\u043e \u0442\u043e, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043f\u0430\u0442\u044c \u0441\u043f\u043e\u043a\u043e\u0439\u043d\u043e.<\/p>\n<h2>\u0417\u0430\u0447\u0435\u043c \u0442\u0430\u043a \u043c\u043d\u043e\u0433\u043e \u0431\u0443\u043a\u043e\u0432? \u0417\u0430\u0447\u0435\u043c \u0444\u0441\u0435 \u044d\u0442\u043e?<\/h2>\n<h3>\u0417\u0430\u0447\u0435\u043c \u043d\u0443\u0436\u043d\u0430 \u0430\u043d\u043e\u043d\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0432 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435<\/h3>\n<p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442\u0435 \u043d\u0430\u0434 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u043c \u0434\u043b\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u0444\u0438\u043b\u044c\u043c\u0430, \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043d\u0430 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u0445. \u041f\u0440\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0441\u0443\u0442\u044c \u0438\u0441\u0442\u043e\u0440\u0438\u0438 \u0438 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u044b \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436\u0435\u0439, \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0438\u0445 \u0438\u043c\u0435\u043d\u0430, \u0430\u0434\u0440\u0435\u0441\u0430 \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u043b\u0438\u0447\u043d\u044b\u0435 \u0434\u0435\u0442\u0430\u043b\u0438, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u0449\u0438\u0442\u0438\u0442\u044c \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u043e\u0441\u0442\u044c \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u043b\u044e\u0434\u0435\u0439. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0437\u0440\u0438\u0442\u0435\u043b\u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442 authentic \u0438\u0441\u0442\u043e\u0440\u0438\u044e \u0441 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435\u043c \u0432\u0441\u0435\u0445 \u0432\u0430\u0436\u043d\u044b\u0445 \u0432\u0437\u0430\u0438\u043c\u043e\u0441\u0432\u044f\u0437\u0435\u0439 \u0438 \u0437\u0430\u043a\u043e\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0435\u0439, \u043d\u043e \u0431\u0435\u0437 \u0440\u0438\u0441\u043a\u0430 \u0440\u0430\u0441\u043a\u0440\u044b\u0442\u0438\u044f \u0447\u044c\u0435\u0439-\u043b\u0438\u0431\u043e \u043b\u0438\u0447\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438.<\/p>\n<p>\u0422\u043e\u0447\u043d\u043e \u0442\u0430\u043a \u0436\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0430\u043d\u043e\u043d\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435: \u043c\u044b \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0434\u0430\u043d\u043d\u044b\u0445, \u0438\u0445 \u0432\u0437\u0430\u0438\u043c\u043e\u0441\u0432\u044f\u0437\u0438 \u0438 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438, \u043d\u043e \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u043c \u0432\u0441\u0435 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u044b \u043d\u0430 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0435 \u0430\u043d\u0430\u043b\u043e\u0433\u0438. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0440\u0435\u0430\u043b\u0438\u0441\u0442\u0438\u0447\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438, \u043d\u0435 \u043f\u043e\u0434\u0432\u0435\u0440\u0433\u0430\u044f \u0440\u0438\u0441\u043a\u0443 \u043a\u043e\u043d\u0444\u0438\u0434\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.<\/p>\n<p>\u0417\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u043f\u044f\u0442\u044c \u043b\u0435\u0442 \u044f \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u044e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u0442\u0440\u0435\u043d\u0434: \u043e\u0431\u044a\u0435\u043c \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0442\u0438\u043f\u0438\u0447\u043d\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0440\u0430\u0441\u0442\u0435\u0442 \u044d\u043a\u0441\u043f\u043e\u043d\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e. \u0415\u0441\u043b\u0438 \u0440\u0430\u043d\u044c\u0448\u0435 \u043c\u044b \u0445\u0440\u0430\u043d\u0438\u043b\u0438 \u0442\u043e\u043b\u044c\u043a\u043e email \u0438 \u0442\u0435\u043b\u0435\u0444\u043e\u043d, \u0442\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u044d\u0442\u043e \u0431\u0438\u043e\u043c\u0435\u0442\u0440\u0438\u044f, \u0431\u0430\u043d\u043a\u043e\u0432\u0441\u043a\u0438\u0435 \u043a\u0430\u0440\u0442\u044b, \u043c\u0435\u0434\u0438\u0446\u0438\u043d\u0441\u043a\u0430\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u044f, \u0433\u0435\u043e\u043b\u043e\u043a\u0430\u0446\u0438\u044f. \u041a\u0430\u0436\u0434\u043e\u0435 \u0442\u0430\u043a\u043e\u0435 \u043f\u043e\u043b\u0435 \u2014 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u043c\u0438\u043d\u0430 \u0437\u0430\u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f.<\/p>\n<figure class=\"\"><\/figure>\n<h3>\u0422\u0438\u043f\u0438\u0447\u043d\u044b\u0435 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445<\/h3>\n<p>\u0420\u0430\u0437\u0431\u0435\u0440\u0451\u043c \u0442\u0440\u0438 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043a\u0435\u0439\u0441\u0430:<\/p>\n<h4>1. \u041e\u0442\u043b\u0430\u0434\u043a\u0430 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u0431\u0430\u0433\u043e\u0432<\/h4>\n<pre><code class=\"python\"># \u0422\u0438\u043f\u0438\u0447\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u043e\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \"\u041d\u0443\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u0431\u0430\u0433 \u0441 \u043f\u043b\u0430\u0442\u0435\u0436\u043e\u043c #12345.  \u041c\u043e\u0436\u043d\u043e \u0434\u0430\u043c\u043f \u0431\u0430\u0437\u044b \u0441 \u044d\u0442\u043e\u0439 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0435\u0439?\"  <\/code><\/pre>\n<p>\u041d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434 \u0431\u0435\u0437\u043e\u0431\u0438\u0434\u043d\u043e, \u0432\u0435\u0440\u043d\u043e? \u041d\u043e \u0432 \u044d\u0442\u043e\u0439 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c:<\/p>\n<ul>\n<li>\n<p>\u041d\u043e\u043c\u0435\u0440 \u043a\u0430\u0440\u0442\u044b \u043a\u043b\u0438\u0435\u043d\u0442\u0430<\/p>\n<\/li>\n<li>\n<p>\u0418\u0441\u0442\u043e\u0440\u0438\u044f \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u043e\u043a\u0443\u043f\u043e\u043a<\/p>\n<\/li>\n<li>\n<p>\u0410\u0434\u0440\u0435\u0441 \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0438<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0438\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u044b \u0440\u043e\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u0438\u043a\u043e\u0432<\/p>\n<\/li>\n<\/ul>\n<h4>2. \u041d\u0430\u0433\u0440\u0443\u0437\u043e\u0447\u043d\u043e\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/h4>\n<pre><code class=\"bash\"># \u0420\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043a \u043d\u0430\u0433\u0440\u0443\u0437\u043e\u0447\u043d\u043e\u043c\u0443 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e pg_dump -h prod-db -t users -t orders &gt; load_test.sql  <\/code><\/pre>\n<p>\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430\u043c \u043d\u0443\u0436\u0435\u043d \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043c \u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445. \u041d\u043e \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u044d\u0442\u0438\u043c \u043e\u043d\u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442:<\/p>\n<ul>\n<li>\n<p>\u0420\u0435\u0430\u043b\u044c\u043d\u044b\u0435 email&#8217;\u044b \u0434\u043b\u044f \u0441\u043f\u0430\u043c-\u0440\u0430\u0441\u0441\u044b\u043b\u043e\u043a<\/p>\n<\/li>\n<li>\n<p>\u0422\u0435\u043b\u0435\u0444\u043e\u043d\u044b \u0434\u043b\u044f \u0431\u0430\u0437\u044b \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u043e\u0432<\/p>\n<\/li>\n<li>\n<p>\u0421\u0432\u044f\u0437\u0438 \u043c\u0435\u0436\u0434\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c\u0438 \u0434\u043b\u044f \u0441\u043e\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0433\u0440\u0430\u0444\u0430<\/p>\n<\/li>\n<\/ul>\n<h4>3. \u041e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 ML-\u043c\u043e\u0434\u0435\u043b\u0435\u0439<\/h4>\n<pre><code class=\"python\"># \u0422\u0438\u043f\u0438\u0447\u043d\u044b\u0439 \u043a\u043e\u0434 \u0434\u0430\u0442\u0430-\u0441\u0430\u0439\u0435\u043d\u0442\u0438\u0441\u0442\u0430 df = pd.read_sql(\"SELECT * FROM user_behavior\", prod_connection)  <\/code><\/pre>\n<p>\u0422\u0430\u043a\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u043d \u043f\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c. \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043e\u043d \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a\u043e \u0432\u0441\u0435\u043c \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u043c \u0434\u0430\u043d\u043d\u044b\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u0445\u043e\u0442\u044f \u0434\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0432\u0430\u0436\u043d\u044b \u0438\u043c\u0435\u043d\u043d\u043e \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u044b \u0438 \u0430\u0433\u0440\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438. \u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u044d\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u043e \u0432\u044b\u0433\u0440\u0443\u0436\u0430\u044e\u0442\u0441\u044f \u043d\u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u0430\u0448\u0438\u043d\u044b \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u043e\u0432, \u0447\u0442\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u043f\u043b\u043e\u0449\u0430\u0434\u044c \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0430\u0442\u0430\u043a\u0438.<\/p>\n<h3>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0440\u0438\u0441\u043a\u0438 \u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u044f \u0443\u0442\u0435\u0447\u0435\u043a<\/h3>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0441\u043b\u0443\u0447\u0430\u0439 \u0443\u0442\u0435\u0447\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 Uber \u0432 2016 \u0433\u043e\u0434\u0443. \u0412 \u043e\u043a\u0442\u044f\u0431\u0440\u0435 2016 \u0433\u043e\u0434\u0430 \u0445\u0430\u043a\u0435\u0440\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0434\u0430\u043d\u043d\u044b\u043c 57 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u043e\u0432 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0438 \u0432\u043e\u0434\u0438\u0442\u0435\u043b\u0435\u0439 Uber. \u041f\u0440\u0438\u0447\u0438\u043d\u0430? \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e \u043e\u0441\u0442\u0430\u0432\u0438\u043b\u0438 \u0443\u0447\u0435\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a AWS S3 \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u043d\u0430 GitHub.<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u043d\u0446\u0438\u0434\u0435\u043d\u0442\u0430 \u0431\u044b\u043b\u0438 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u043d\u044b\u043c\u0438:<\/p>\n<ol>\n<li>\n<p><strong>\u0424\u0438\u043d\u0430\u043d\u0441\u043e\u0432\u044b\u0435 \u043f\u043e\u0442\u0435\u0440\u0438<\/strong> <\/p>\n<ul>\n<li>\n<p>\u0428\u0442\u0440\u0430\u0444 \u043e\u0442 \u0440\u0435\u0433\u0443\u043b\u044f\u0442\u043e\u0440\u043e\u0432: $148 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u043e\u0432<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u0442\u0440\u0430\u0442\u044b \u043d\u0430 \u0443\u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u043b\u043b\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u0438\u0441\u043a\u043e\u0432: \u0431\u043e\u043b\u0435\u0435 $100 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u043e\u0432<\/p>\n<\/li>\n<li>\n<p>\u0420\u0430\u0441\u0445\u043e\u0434\u044b \u043d\u0430 \u043a\u0438\u0431\u0435\u0440\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c \u0438 \u0430\u0443\u0434\u0438\u0442: \u0434\u0435\u0441\u044f\u0442\u043a\u0438 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u043e\u0432 \u0434\u043e\u043b\u043b\u0430\u0440\u043e\u0432<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u0420\u0435\u043f\u0443\u0442\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0440\u0438\u0441\u043a\u0438<\/strong> <\/p>\n<ul>\n<li>\n<p>\u0421\u0435\u0440\u044c\u0435\u0437\u043d\u044b\u0439 \u0443\u0434\u0430\u0440 \u043f\u043e \u0434\u043e\u0432\u0435\u0440\u0438\u044e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0438 \u043f\u0430\u0440\u0442\u043d\u0435\u0440\u043e\u0432<\/p>\n<\/li>\n<li>\n<p>\u0411\u043e\u043b\u0435\u0435 900 \u043d\u0435\u0433\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0439 \u0432 \u043a\u0440\u0443\u043f\u043d\u044b\u0445 \u0421\u041c\u0418<\/p>\n<\/li>\n<li>\n<p>\u0421\u043d\u0438\u0436\u0435\u043d\u0438\u0435 \u043e\u0446\u0435\u043d\u043a\u0438 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u0438 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u043f\u0435\u0440\u0435\u0434 IPO<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u0422\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u044f<\/strong> <\/p>\n<ul>\n<li>\n<p>\u041f\u043e\u043b\u043d\u0430\u044f \u043f\u0435\u0440\u0435\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430\u043c\u0438<\/p>\n<\/li>\n<li>\n<p>\u0412\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0443\u0440\u043e\u0432\u043d\u0435\u0439 \u0437\u0430\u0449\u0438\u0442\u044b \u0434\u0430\u043d\u043d\u044b\u0445<\/p>\n<\/li>\n<li>\n<p>\u041c\u0430\u0441\u0448\u0442\u0430\u0431\u043d\u044b\u0439 \u0430\u0443\u0434\u0438\u0442 \u0432\u0441\u0435\u0439 IT-\u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b<\/p>\n<\/li>\n<li>\n<p>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0441\u0442\u0440\u043e\u0433\u0438\u0445 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u0432 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p>\u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0442\u043e, \u0447\u0442\u043e \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f \u043f\u044b\u0442\u0430\u043b\u0430\u0441\u044c \u0441\u043a\u0440\u044b\u0442\u044c \u0444\u0430\u043a\u0442 \u0443\u0442\u0435\u0447\u043a\u0438 \u0438 \u0434\u0430\u0436\u0435 \u0437\u0430\u043f\u043b\u0430\u0442\u0438\u043b\u0430 \u0445\u0430\u043a\u0435\u0440\u0430\u043c $100,000 \u0437\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u0445\u0438\u0449\u0435\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u042d\u0442\u043e \u043f\u0440\u0438\u0432\u0435\u043b\u043e \u043a \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0448\u0442\u0440\u0430\u0444\u0430\u043c \u0438 \u0435\u0449\u0435 \u0431\u043e\u043b\u044c\u0448\u0435\u043c\u0443 \u0440\u0435\u043f\u0443\u0442\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u043c\u0443 \u0443\u0449\u0435\u0440\u0431\u0443, \u043a\u043e\u0433\u0434\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0432\u0441\u0451 \u0436\u0435 \u0441\u0442\u0430\u043b\u0430 \u0434\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435\u043c \u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0432 2017 \u0433\u043e\u0434\u0443.<\/p>\n<p>\u042d\u0442\u043e\u0442 \u0441\u043b\u0443\u0447\u0430\u0439 \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0430\u0436\u043d\u043e \u0438\u043c\u0435\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0432\u044b\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0438 \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u043e\u0440\u043e\u0433\u043e \u043c\u043e\u0436\u0435\u0442 \u043e\u0431\u043e\u0439\u0442\u0438\u0441\u044c \u0438\u0445 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u0434\u0430\u0436\u0435 \u043a\u0440\u0443\u043f\u043d\u044b\u043c \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f\u043c.<\/p>\n<h3>\u0417\u0430\u043a\u043e\u043d\u043e\u0434\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f<\/h3>\n<p>\u0421\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0435 \u0437\u0430\u043a\u043e\u043d\u043e\u0434\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u043e \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0437\u0430\u0449\u0438\u0442\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u043e\u0436\u043d\u043e \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u0441 \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c\u0438 \u0434\u043e\u0440\u043e\u0436\u043d\u043e\u0433\u043e \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f: \u043d\u0435\u0437\u043d\u0430\u043d\u0438\u0435 \u043d\u0435 \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0430\u0435\u0442 \u043e\u0442 \u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0441\u0442\u0438.<\/p>\n<h4>GDPR (General Data Protection Regulation)<\/h4>\n<figure class=\"\"><\/figure>\n<p>\u041a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f:<\/p>\n<ul>\n<li>\n<p>\u0414\u0430\u043d\u043d\u044b\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0437\u0430\u0449\u0438\u0449\u0435\u043d\u044b &#171;\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e&#187;<\/p>\n<\/li>\n<li>\n<p>\u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u0449\u0438\u0442\u0443<\/p>\n<\/li>\n<li>\n<p>\u0428\u0442\u0440\u0430\u0444\u044b: \u0434\u043e 20 \u043c\u043b\u043d \u0435\u0432\u0440\u043e \u0438\u043b\u0438 4% \u043e\u0431\u043e\u0440\u043e\u0442\u0430<\/p>\n<\/li>\n<\/ul>\n<h4>152-\u0424\u0417 (\u0420\u043e\u0441\u0441\u0438\u044f)<\/h4>\n<figure class=\"\"><\/figure>\n<p>\u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438:<\/p>\n<ul>\n<li>\n<p>\u0422\u0440\u0435\u0431\u0443\u0435\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 \u0442\u0435\u0440\u0440\u0438\u0442\u043e\u0440\u0438\u0438 \u0420\u0424<\/p>\n<\/li>\n<li>\n<p>\u041e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0441\u043e\u0433\u043b\u0430\u0441\u0438\u0435 \u043d\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0430\u0432\u043e \u043d\u0430 \u0437\u0430\u0431\u0432\u0435\u043d\u0438\u0435<\/p>\n<\/li>\n<li>\n<p>\u0428\u0442\u0440\u0430\u0444\u044b \u0434\u043e 18 \u043c\u043b\u043d \u0440\u0443\u0431\u043b\u0435\u0439<\/p>\n<\/li>\n<\/ul>\n<h4>\u041f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0432\u044b\u0432\u043e\u0434\u044b<\/h4>\n<p>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043a\u0430\u0440\u0442\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0432\u0430\u0448\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435:<\/p>\n<figure class=\"\"><\/figure>\n<p>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u0435 \u0443\u0440\u043e\u0432\u043d\u0438 \u0437\u0430\u0449\u0438\u0442\u044b:<\/p>\n<figure class=\"\"><\/figure>\n<p>\u0412\u043d\u0435\u0434\u0440\u0438\u0442\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b \u0430\u043d\u043e\u043d\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u044d\u0442\u0430\u043f\u0435:<\/p>\n<ul>\n<li>\n<p>\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430<\/p>\n<\/li>\n<li>\n<p>\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/p>\n<\/li>\n<li>\n<p>\u0410\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0430<\/p>\n<\/li>\n<li>\n<p>\u0411\u044d\u043a\u0430\u043f\u044b<\/p>\n<\/li>\n<\/ul>\n<p>\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a pg_anon \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0440\u0435\u0448\u0438\u0442\u044c \u044d\u0442\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435. \u041d\u043e \u043f\u043e\u043c\u043d\u0438\u0442\u0435 \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e: \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c \u2014 \u044d\u0442\u043e \u043d\u0435 \u043a\u043e\u043d\u0435\u0447\u043d\u0430\u044f \u0446\u0435\u043b\u044c, \u0430 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441. \u041f\u043e\u043b\u0430\u0433\u0430\u044e, \u043b\u0443\u0447\u0448\u0435 \u043f\u043e\u0442\u0440\u0430\u0442\u0438\u0442\u044c \u0434\u0435\u043d\u044c \u043d\u0430 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 \u0430\u043d\u043e\u043d\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438, \u0447\u0435\u043c \u0433\u043e\u0434 \u043d\u0430 \u0440\u0430\u0437\u0431\u043e\u0440 \u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0439 \u0443\u0442\u0435\u0447\u043a\u0438.<\/p>\n<h2>pg_anon \u043a\u0430\u043a \u0440\u0435\u0448\u0435\u043d\u0438\u0435<\/h2>\n<h3>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 pg_anon \u0438 \u043f\u043e\u0447\u0435\u043c\u0443 \u043e\u043d \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f<\/h3>\n<p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0435\u0442\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u0439 \u0444\u0438\u043b\u044c\u043c \u043e \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043b\u0438\u0447\u043d\u043e\u0441\u0442\u0438. \u0423 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0432\u0438\u0434\u0435\u043e\u0437\u0430\u043f\u0438\u0441\u0438, \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b \u0438 \u0438\u043d\u0442\u0435\u0440\u0432\u044c\u044e \u0441 \u043e\u0447\u0435\u0432\u0438\u0434\u0446\u0430\u043c\u0438. \u041e\u0434\u043d\u0430\u043a\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u043a\u043e\u043d\u0444\u0438\u0434\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e &#8212; \u043d\u043e\u043c\u0435\u0440\u0430 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u043e\u0432, \u0430\u0434\u0440\u0435\u0441\u0430, \u043b\u0438\u0447\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u0440\u0443\u0433\u0438\u0445 \u043b\u044e\u0434\u0435\u0439. \u041f\u0440\u0438 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0435 \u0444\u0438\u043b\u044c\u043c\u0430 \u043a \u043f\u043e\u043a\u0430\u0437\u0443 \u0432\u044b \u0440\u0430\u0437\u043c\u044b\u0432\u0430\u0435\u0442\u0435 \u044d\u0442\u0438 \u0434\u0435\u0442\u0430\u043b\u0438 \u043d\u0430 \u0432\u0438\u0434\u0435\u043e, \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u0442\u0435 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u0438\u043c\u0435\u043d\u0430 \u0438 \u0430\u0434\u0440\u0435\u0441\u0430, \u043d\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442\u0435 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432\u0441\u044e \u0432\u0430\u0436\u043d\u0443\u044e \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0438 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0437\u0440\u0438\u0442\u0435\u043b\u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442 \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u0439 \u0444\u0438\u043b\u044c\u043c, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0437\u0430\u0449\u0438\u0449\u0435\u043d\u0430 \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u043e\u0441\u0442\u044c \u0432\u0441\u0435\u0445 \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u043e\u0432.<\/p>\n<p>\u0418\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 pg_anon \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 PostgreSQL. \u041f\u043e\u043c\u043d\u044e, \u043a\u0430\u043a \u043c\u043d\u0435 \u0441\u0430\u043c\u043e\u043c\u0443 \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u0432\u0440\u0443\u0447\u043d\u0443\u044e &#171;\u0440\u0430\u0437\u043c\u044b\u0432\u0430\u0442\u044c&#187; \u043a\u043e\u043d\u0444\u0438\u0434\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u0441\u0440\u0435\u0434. \u042d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a:<\/p>\n<pre><code class=\"bash\"># \u0421\u0442\u0430\u0440\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 - \u0440\u0443\u0447\u043d\u044b\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u044b pg_dump production_db &gt; dump.sql sed -i 's\/[0-9]\\\\\\\\{10\\\\\\\\}\/XXXXXXXXXX\/g' dump.sql  # \u041c\u0430\u0441\u043a\u0438\u0440\u0443\u0435\u043c \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u044b sed -i 's\/[^@]\\\\\\\\+@\/******@\/g' dump.sql         # \u041c\u0430\u0441\u043a\u0438\u0440\u0443\u0435\u043c email # \u0418 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435... \u0434\u0435\u0441\u044f\u0442\u043a\u0438 \u0441\u0442\u0440\u043e\u043a \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439  <\/code><\/pre>\n<p>\u042d\u0442\u043e\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0431\u044b\u043b \u043d\u0435\u043d\u0430\u0434\u0435\u0436\u043d\u044b\u043c \u0438 \u0442\u0440\u0443\u0434\u043e\u0437\u0430\u0442\u0440\u0430\u0442\u043d\u044b\u043c, \u043a\u0430\u043a \u0435\u0441\u043b\u0438 \u0431\u044b \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0443 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0438\u0441\u043a\u0430\u0442\u044c \u0438 \u0440\u0430\u0437\u043c\u044b\u0432\u0430\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u043a\u043e\u043d\u0444\u0438\u0434\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u0432 \u043c\u043d\u043e\u0433\u043e\u0447\u0430\u0441\u043e\u0432\u043e\u043c \u0444\u0438\u043b\u044c\u043c\u0435. pg_anon \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u043b \u044d\u043b\u0435\u0433\u0430\u043d\u0442\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435: \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043f\u0440\u0430\u0432\u0438\u043b \u043c\u0430\u0441\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432 YAML-\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 &#8212; \u0441\u0432\u043e\u0435\u0433\u043e \u0440\u043e\u0434\u0430 &#171;\u0443\u043c\u043d\u044b\u0439 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440&#187;, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0442\u043e\u0447\u043d\u043e \u0437\u043d\u0430\u0435\u0442, \u0447\u0442\u043e \u0438 \u043a\u0430\u043a \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u043c\u0430\u0441\u043a\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044f \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0446\u0435\u043b\u043e\u0441\u0442\u043d\u043e\u0441\u0442\u044c \u0438 \u0441\u043c\u044b\u0441\u043b \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438.<\/p>\n<h3>\u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u043f\u043e\u0434\u0445\u043e\u0434\u0430\u043c\u0438<\/h3>\n<p>\u0414<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\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-445989","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/445989","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=445989"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/445989\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=445989"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=445989"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=445989"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}