How to Back Up My Production PostgreSQL Database in Docker?

0
6
Asked By CoolCactus123 On

I'm currently managing an on-prem PostgreSQL database running in Docker, and recently, our IT department decided to host multiple projects on the same server. This led to the removal of 'server level' backups to avoid including data from other projects, putting our important data at risk as the production database is now running without any backups. I'm aware that I could create a script to generate daily dumps of the database, but I'm concerned that this approach might be too unreliable, especially since as a developer, backing up the database isn't my responsibility. Any suggestions on how I should handle this situation?

3 Answers

Answered By CautiousCoder81 On

If you're not the one to handle backups, it might feel overwhelming, but maybe try to learn some skills while speaking up! The entire setup sounds a bit mishandled, and it could improve both your experience and the infrastructure. Good practice can set the tone for better long-term solutions. Don't hesitate to bring this up for the sake of the whole team's efficiency!

Answered By BackupBuddy98 On

Someone mentioned using a managed host—great idea! If you're stuck with the current setup, you could create nightly pg_dump backups or even set up monitoring for any failures. However, weigh the risks of data lost when selecting your backup frequency. Frequent testing of any restore processes is a must, and if this isn't your responsibility, definitely make sure to alert the someone who can act on it. Just ensure you document your concerns and share them with the higher-ups.

GratefulDev22 -

Thanks for the advice! I appreciate how you highlighted getting more involved without it weighing on me too much.

Answered By TechGuru2020 On

It sounds like your IT team needs to rethink their entire hosting strategy. You can't run a critical production database without backups! I'd recommend speaking up about this issue — it's definitely worth a review. In the meantime, if you have the option to use a managed database host like AWS RDS, it would handle backups automatically for you. If that's out of the question, consider having a read replica ready to failover, frequent data dumps to minimize data loss, and possibly streaming backups to ensure you're covered. Just make sure your team has monitoring in place to know if anything goes wrong. And honestly, raise the alarm to get the right people involved — you shouldn't have to shoulder this alone.

RiskyBusiness45 -

Unfortunately, I'm stuck in a position where I can't push too hard since it's not my department's responsibility, and honestly, they don't seem to know how to manage Docker or infrastructure well.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.