gbartolini
As a community, we have decided to support volume snapshot backups and offer the Barman Cloud plugin to ensure we provide the same level of service. Our aim is to encourage other organisations or developers to create plugins for their preferred backup solutions.
Currently, as maintainers of CNPG, we must concentrate on the core capabilities and allow the ecosystem to grow with both community and, potentially, commercial solutions based on CNPG-I.
I suggest you to read CloudnativePG documentation as well as this article: https://www.cncf.io/blog/2023/09/29/recommended-architecture...
Also watch the video of my talk at last Kubecon in Chicago about handling very large databases.
I hope this helps.
Postgres Disaster Recovery with Kubernetes Volume Snapshots Using CloudNativePG
However, we are talking about Postgres, here, not a generic database. PostgreSQL natively provides continuous backup, streaming replication, including synchronous (controlled at transaction level), cascading, and logical. You can easily implement with Postgres, even in Kubernetes with CloudNativePG, architectures with RPO=0 (yes, zero data loss) and low RTO in the same Kubernetes cluster (normally a region), and RPO <= 5 minutes with low RTO across regions. Out of the box, with CloudNativePG, through replica clusters.
We are also now launching native declarative support for Kubernetes Volume Snapshot API in CloudNativePG with the possibility to use incremental/differential backup and recovery to reduce RTO in case of very large databases recovery (like ... dozens of seconds to restore 500GB databases).
So maybe it is time to reconsider some assumptions.
It is ultimately your choice. I am a big fan of shared nothing architecture for the database. (I am a maintainer of CloudNativePG)
That is why we took the approach to reduce the number of components and integrate everything in Kubernetes, especially with logging (we directly log in JSON to standard output) and the usage of application containers, which enables us to cover the case of troubleshooting via the fencing mechanism (your pods are up, you can access storage, but Postgres is down, giving you the possibility to check even possible data corruption issues).
Also, the status is directly available in Kubernetes, so in our view easier for Kubernetes administrators.
Finally, the source code is open source and directly available for inspection - if you want to understand what is happening.
Back then, we evaluated Crunchy Operator's source code. Being primarily imperative and using an external tool for failover, where the two main reasons we decided to start a new project in 2019 which was entirely declarative and purely based on the Kubernetes API server for cluster status. Such project was released open source last April under the name CloudNativePG and hopefully it will enter the CNCF Sandbox soon (fingers crossed).
Regarding being opinionated I believe that it is what we expect from an operator. An operator simulates what human DBAs in this case would do. I am a maintainer of CloudNativePG, and I have been running and supporting PostgreSQL in production for 15+ years, creating also another open source software for backups (Barman). In CloudNativePG we have basically translated our recipes into Go code and tests.
Many people believe that databases should not run in Kubernetes. I not only believe the opposite, I believe that running Postgres in Kubernetes represents the best way, potentially, to run Postgres out there.
EDB is the original creator. The software is now entirely owned by a vendor neutral community, openly governed. We have applied for the CNCF sandbox and waiting for the approval at this stage.
We decided to go even further with the CloudNativePG operator.
EDB as original creator has decided to donate the intellectual property of the source code to the community, open sourced the existing operator under Apache License 2.0 to apply for the CNCF Sandbox. The project not only includes the operator, but also the PostgreSQL operand images - which can be customized (we provide details on how images should be).
We genuinely welcome other vendors to participate in the community and contribute to the project, including by offering professional services around it. Our multi-year commitment is to become a graduated CNCF project.
For more information: https://cloudnative-pg.io/
From a Postgres standpoint, IMO, it is also important the concept of cluster - as that's what applications connect too - the operator hides the underlying complexity of managing the single instances. And .. also important monitoring sets of clusters from an infrastructure management PoV.
Operators are there to help in both cases, and this is the goal of our CloudNativePG operator.
IMO CNCF represents an opportunity for vendors of the same database engine to converge in a healthy community and provide the best operator for their platform. This is probably the first stage.
The second stage could be to study those operators (of different engines, like Postgres, MySQL, ...) and generalize commonalities in a sort of standard spec. Just an idea. Is this in line with what you are thinking?
Thanks!
I agree this is something we could somehow work together as a standard kind of spec, but probably we are still at an early stage of the process. My 2 cents.
However, what is important here though is that this is the first operator for Postgres whose IP is now owned by a vendor neutral and openly governed community - or at least aims to be based on the public GOVERNANCE policies. We look upon the CNCF for principles and values.
This is our commitment.
Thanks for sharing the news!
The project is hosted on github.com/cloudnative-pg/cloudnative-pg and it is distributed under Apache License 2.0.
It manages PostgreSQL primary/standby architecture clusters, providing self-healing, high availability through automated failover, continuous backup, point-in-time recovery, native Prometheus exporter, JSON standard output logging, rolling updates, and so on.
It relies on the Kubernetes API server to keep the status of the cluster, detect issues/changes, and react.
It is production ready, originally created by EDB, which is one of the major contributors to the open source PostgreSQL project.
1) Zero data loss backups (as far as I know, Barman is the first backup tool for PostgreSQL to implement it)
2) Monitoring ('check' command)
3) Hybrid WAL shipping (archiving + streaming)
4) Incremental backups
5) Faster recovery time (backups are stored as plain files, you can have incremental recovery and you can use 'get-wal') - also we are working on parallel backup and recovery
6) Backup from a standby
In terms of management, Barman is very low maintenance, but the outcomes you get are relevant.
If you have multiple PostgreSQL servers, you can concentrate backups in a single Barman host. Every server can have its own settings allowing you to implement hybrid solutions (you can mix versions, backup methods such as rsync or pg_basebackup, WAL archiving, WAL streaming, and so on).
As said above by "amenonsen", with hook scripts you can also relay WAL files to S3 very easily, and create a backup of your backup.
That is why I think having a separate backup server has more pros than cons.
I hope this helps.
Streaming and “zero data loss” backups for PostgreSQL with Barman 2.0
Just wanted to inform you guys that today we released Barman 2.0 for PostgreSQL.This new release adds support for streaming backups (removing the need for SSH connections altogether) and introduces "zero data loss" backups for PostgreSQL 9.4/9.5/9.6.Streaming backup also makes integration with Docker easier and adds experimental support to backup of PostgreSQL on Windows systems too.Barman is a...
By then, we'd love to have a Debian package too.
Thank you.
2ndQuadrant has adopted the open-source business model, and we have a long history of contributions to the PostgreSQL project and its evolution (I encourage you to verify my words). This applies to satellite projects too, including repmgr (High Availability) and Barman (Disaster Recovery). With Barman we have a precise statement: it has to be open-source and to remain open-source, under GNU GPL 3. Being a business, we need to fund the development of features through our consulting services in Disaster Recovery or through feature sponsorships. But our intention is that everything will be released open-source (otherwise, why bother releasing this software in the first place?).
On a more technical point of view, one of the main characteristics of Barman is that it does not require to be physically located where the Postgres server resides. It performs remote backup (if you can, you can do local backups too, but I prefer sharing nothing between a backup server and a production server - points of view?). If you think about it carefully, this also gives more flexibility in terms of architecture, especially in large master-slave scenarios (you do not need to install Barman on every Postgres server or share the same file system, for instance).
Barman can compress transactions/WAL files (bzip2, gzip or custom) and has a parallel management of the WAL archive and periodical backups (I suggest you read this article where we describe the association between a WAL segment and a backup http://blog.2ndquadrant.com/management-wal-archive-barman/).
Currently it does not automatically compress periodical backups, but gives a clear and simple interface to archiving (to give you an idea, we have a customer that regularly - every week - transfers on tapes a 6TB database with Barman). Current development version has already hooks for pre and post backup operations. Next boundaries will be incremental backup and retention policies (what you probably call backup maintenance) - as I said, depending on fundings we receive.
Another important aspect of Barman is that you can have a backup server managing multiple PostgreSQL servers, from one single place, and having a catalogue of periodical backups.
Then ... I'd say remote recovery, data directory and tablespace relocation during recovery, Point in Time recovery, diagnostics, etc.
If you have more information, you can join the IRC channel too or the mailing list (details on www.pgbarman.org).