Backups and stability

21 views
Skip to first unread message

Dan Krol

unread,
Jan 17, 2020, 11:48:04 PM1/17/20
to Sandstorm-dev
I was just thinking about how I've gotten the general (not Sandstorm related) advice to not back up postgres data by the files directly. Instead I should use a database dump tool, because this safely prevents race conditions (half-written records, etc). (Though, I would think that shutting down postgres should make copying files sufficiently safe as well.)

This got me thinking: How do Sandstorm backups work? Postgres, or really anything, could be in the middle of writing something when the user asks for a backup. Is this accounted for during backups? I would think one way of being safe would be to shut down the grain first whenever a backup is requested.

Ian Denhardt

unread,
Jan 18, 2020, 12:10:02 AM1/18/20
to Dan Krol, Sandstorm-dev
Afaik we don't handle this at all right now; there's absolutely a risk
of database corruption due to race conditions. Shutting down the grain
should work, though we don't do that currently.

I opened an issue; I'd been aware of this but it looks like we didn't
have a ticket for it:

https://github.com/sandstorm-io/sandstorm/issues/3186

Quoting Dan Krol (2020-01-17 23:47:48)
> --
> You received this message because you are subscribed to the Google
> Groups "Sandstorm Development" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to [1]sandstorm-de...@googlegroups.com.
> To view this discussion on the web visit
> [2]https://groups.google.com/d/msgid/sandstorm-dev/CAAWRcS8upDSOP2jau1h
> majOFzt%2BsF_pU7B-rFg1pd%3DNrNNjfpg%40mail.gmail.com.
>
> Verweise
>
> 1. mailto:sandstorm-de...@googlegroups.com
> 2. https://groups.google.com/d/msgid/sandstorm-dev/CAAWRcS8upDSOP2jau1hmajOFzt%2BsF_pU7B-rFg1pd%3DNrNNjfpg%40mail.gmail.com?utm_medium=email&utm_source=footer
Reply all
Reply to author
Forward
0 new messages