N
Neon13mo ago
stormy-gold

Branches as backups?

Hi, I recently migrated to a database-per-tenant architecture and now I need to implement backups. I was thinking about using the classic pg_dump and pg_restore command and store the result on a S3. Is it possible to do it with Neon Braching? Like creating a branch and restoring it later if needed?
6 Replies
cloudy-cyan
cloudy-cyan13mo ago
We generally recommend a project per tenant If you use branches as a backup, you'll likely incur storage costs that you weren't expecting. You'll keep old tuples alive. Generally we recommend PITR window for this, but a more complete solution is in the works
ratty-blush
ratty-blush13mo ago
@Gary, el Pingüino Artefacto we are actually working on making your use case well supported in the product and in our storage pricing. we are going to introduce different storage tiers for branches. neon will automatically manage this for you: branches that did not see any connection activity will automatically be offloaded to archive, and on the connection attempt they will be pulled them back from archive. our restore UI already supports restoring from another branch, too, so you can totally use neon branches like this. like tristan is saying, this is not very cost efficient for larger projects today, but with the changes that we'll be releasing later this year, it will be very efficient
stormy-gold
stormy-goldOP13mo ago
yes, i'm using project per tenant, i always use the wrong term some secret for neon deploy on 30? i sound kinda cool
afraid-scarlet
afraid-scarlet11mo ago
Hey @Gary, el Pingüino Artefacto ! Since you're using a database per tenant architecture, I'd love your feedback about this page which details how the architecture can be implemented https://neon-next-4w52m3qe8-neondatabase.vercel.app/use-cases/database-per-tenant This is a preview, so all feedback is welcome 😄
Neon
Database per tenant at scale
Manage thousands of Postgres databases with minimal effort and costs.
stormy-gold
stormy-goldOP11mo ago
Hi, thanks for sharing the post. It looks pretty good and I honestly don't know what else I could add.
afraid-scarlet
afraid-scarlet11mo ago
Thank you so much for taking the time. I really appreciate it 😄

Did you find this page helpful?