Live data from Hacker News

Show HN: Uphold – Tool for programmatically verifying database backups

github.com

11–16 of 16 posts

Re: Show HN: Uphold – Tool for programmatically verifying database backups

#11
post #8

I created this tool a while ago, but since it's apparently world backup day I thought it a good time to submit it here. It was created out of the fact that we run automated backups of our various databases, yet we very rarely attempted a restore. This allows me to know for sure that the backup was created and that it's available, accessible & restorable. You can then if you want to, programmatically test the contents…

Very cool. Ever thought about including default test suites with the tool? E.g. I have multiple nightly backups of Drupal databases and could think of some obvious default tests against the core tables that would be useful for all of them.

Sure, if you PR some example tests in I can make that happen.

Re: Show HN: Uphold – Tool for programmatically verifying database backups

#12

> then running programmatic tests against it that you define to make sure they really have what you need Sounds like the crux will still depend on how well one writes these tests. Agreeing that no backup is verified until it is restored... one way this can be achieved is use something like Ansible to script the backup of the database, script the restore, and run them and verify everything is backed up / restored prop…

You don't have to run the tests if you don't want, the tool has a different state for when you don't have them "ok_no_test". For some backups we run through Uphold we have written some very basic ones, like looking for the existence of some specific users, or that a table has X number of rows, which are very good for quick sanity tests.

Re: Show HN: Uphold – Tool for programmatically verifying database backups

#13
post #8

Earlier quoted context omitted.

Very cool. Ever thought about including default test suites with the tool? E.g. I have multiple nightly backups of Drupal databases and could think of some obvious default tests against the core tables that would be useful for all of them.

Sure, if you PR some example tests in I can make that happen.

I'll look in to it. I have never used Docker or Ruby but RSpec looks pretty straight forward from a quick scan.

Re: Show HN: Uphold – Tool for programmatically verifying database backups

#14
post #13

Earlier quoted context omitted.

Sure, if you PR some example tests in I can make that happen.

I'll look in to it. I have never used Docker or Ruby but RSpec looks pretty straight forward from a quick scan.

Even if you just write the SQL I can translate it into RSpec if it'll save you time.

Re: Show HN: Uphold – Tool for programmatically verifying database backups

#15
post #13

Earlier quoted context omitted.

I'll look in to it. I have never used Docker or Ruby but RSpec looks pretty straight forward from a quick scan.

Even if you just write the SQL I can translate it into RSpec if it'll save you time.

do you have a tool that does this translation or is the tool your brain? :)

Re: Show HN: Uphold – Tool for programmatically verifying database backups

#16

I created this tool a while ago, but since it's apparently world backup day I thought it a good time to submit it here. It was created out of the fact that we run automated backups of our various databases, yet we very rarely attempted a restore. This allows me to know for sure that the backup was created and that it's available, accessible & restorable. You can then if you want to, programmatically test the contents…

I would love this to be working with 3rd party backup tools such as barman or pgbackman.
Post reply on HN