r/GoodSoftware • u/fschmidt • Aug 22 '19
Continuous Backup
Today I will discuss a real need I have for my work. Luan uses Lucene and has scheduled backups. But now I am working on an online store that takes orders and I can't afford data loss. So I need continuous backup. A quick search shows worthless enterprise garbage. So I need to develop my own. I wrote a spec here:
https://bitbucket.org/frschmidt/luan/src/default/src/luan/backup/
This would be a stand-alone project, not dependent on my other code. Anyone here interested in implementing this?
0
Upvotes
View all comments
Show parent comment
1
u/fschmidt Aug 25 '19
No that doesn't work. The client would call split() and at the same time get a snapshot of the data. Then the client can generate a file for the snapshot and call consolidate(). This replaces all but the last backup file. The last backup file would contain changes since the snapshot.
Anyway I looked at how Postgres handles these issues:
https://www.postgresql.org/docs/current/wal.html
https://www.postgresql.org/docs/current/continuous-archiving.html
This makes me realize that there is more to this. A good implementation of continuous backup would need to handles these issues, like keeping a local copy and flushing it. So now I am thinking that it may be easier just to mirror updates to Postgres and let Postgres handle these issues.