PostgreSQL Backup/Replicate solutions?
Hi guys, before all, I will talk about my infrastructure here.
I have a LiteServer machine running Synapse, Dpaste, Mastodon etc., I didn't put the database (PostgreSQL backend) on the machine, instead, I used Microsoft Azure's flexible instance. All of them are based in Netherlands.
There are always 3-2-1 principle, and my database is on Azure, and only on Azure, which is not secure.
What I wanna do is to replicate or backup the whole database server on Azure (currently around 1~2 GB).
I also have a B1s instance on Azure, based in Netherlands, has 2 x 64 GB disks mounted on it, already in the same vnet as the database server, this would be my replicate server.
I can run a Docker PostgreSQL container on it, but how can I replicate my Azure one here as soon as the data is stored (well, doesn't actually need to be live, maybe a crontab with hourly check is also ok since this is just hobby project)
Incremental backup would be the best choice, but how can I do it?
That database is tiny if it's just a couple of Gigs, so not a big deal to replicate. One way to replicate to a completely unrelated PG instance would be logical replication. Check it out