# Hourly backup, only if something has changed

**URL:** <https://meta.discourse.org/t/hourly-backup-only-if-something-has-changed/27274>\
**Category:** Feature\
**Tags:** backups\
**Created:** [6 april 2015 om 21:57 UTC](https://meta.discourse.org/t/hourly-backup-only-if-something-has-changed/27274 "2015-04-06T21:57:56Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)\
**Post date:** [7 april 2015 om 05:39 UTC](https://meta.discourse.org/t/hourly-backup-only-if-something-has-changed/27274/3 "2015-04-07T05:39:17Z")

</div>

Sounds like [streaming replication](https://wiki.postgresql.org/wiki/Streaming_Replication) is what we want here, to me.

Run the forum on cheap server #1, streaming replicate to cheap server #2, if server #1 goes down, then:

- stop replication from #1 to #2 (it already isn’t working, but remove the setup)
- set up discourse on server #3
- point DISCOURSE\_DB\_HOST on #3 to #2 (and rebuild)
- take a backup on #3 using #2 as database
- remove DISCOURSE\_DB\_HOST from #3 container definition (and rebuild)
- restore backup on #3 using #3 as database
- switch over DNS
- re-set up streaming replication from #3 to #2

Certainly not a setup for the faint of heart when it comes to ops.

---

_[View the full topic](https://meta.discourse.org/t/hourly-backup-only-if-something-has-changed/27274)._
