[{"data":1,"prerenderedAt":10},["ShallowReactive",2],{"public:public\u002Fcontent\u002Fdocs\u002Fself-hosted":3},{"slug":4,"title":5,"description":6,"draft":7,"updated":8,"html":9},"self-hosted","Self-hosted PostgreSQL","Cron pg_dump to MinIO or any S3-compatible store and create a read-only, prefix-scoped user for Verestore.",false,null,"\u003Ch1>Self-hosted PostgreSQL with MinIO or any S3-compatible store\u003C\u002Fh1>\n\u003Ch2>1. Dump with cron\u003C\u002Fh2>\n\u003Cpre>\u003Ccode class=\"language-sh\"># \u002Fetc\u002Fcron.d\u002Fpg-backup  (as the postgres user)\n0 2 * * * postgres pg_dump --format=custom --no-owner orders | mc pipe backups\u002Facme-backups\u002Forders\u002Forders-$(date -u +\\%Y-\\%m-\\%dT\\%H-\\%M).dump\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Ch2>2. A read-only MinIO user for Verestore\u003C\u002Fh2>\n\u003Cpre>\u003Ccode class=\"language-sh\">cat &gt; verestore-read.json &lt;&lt;&#39;JSON&#39;\n{\n  &quot;Version&quot;: &quot;2012-10-17&quot;,\n  &quot;Statement&quot;: [\n    {\n      &quot;Effect&quot;: &quot;Allow&quot;,\n      &quot;Action&quot;: [&quot;s3:ListBucket&quot;],\n      &quot;Resource&quot;: [&quot;arn:aws:s3:::acme-backups&quot;],\n      &quot;Condition&quot;: { &quot;StringLike&quot;: { &quot;s3:prefix&quot;: [&quot;orders\u002F*&quot;] } }\n    },\n    {\n      &quot;Effect&quot;: &quot;Allow&quot;,\n      &quot;Action&quot;: [&quot;s3:GetObject&quot;],\n      &quot;Resource&quot;: [&quot;arn:aws:s3:::acme-backups\u002Forders\u002F*&quot;]\n    }\n  ]\n}\nJSON\nmc admin policy create backups verestore-read verestore-read.json\nmc admin user add backups verestore &quot;$(openssl rand -hex 24)&quot;\nmc admin policy attach backups verestore-read --user verestore\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>The endpoint must be reachable from the internet over \u003Cstrong>HTTPS\u003C\u002Fstrong> with a valid certificate for the hosted service. If it isn&#39;t, the hosted service can&#39;t reach it. Agent mode, which would run the same restore inside your network, is planned, not built: join the waitlist on the \u003Ca href=\"\u002Fpricing\">pricing page\u003C\u002Fa>.\u003C\u002Fp>\n\u003Cp>The same policy works on Ceph RGW, Garage and SeaweedFS (S3 API with IAM-style policies).\u003C\u002Fp>\n",1794290783591]