Stop services during backup when using snapshots?
https://lemmy.ca/post/26151124
=> More informations about this toot | More toots from avidamoeba@lemmy.ca
If you’re worried a out a database being corrupt, I’d recommend doing an actual backup dump of the database and not only backing up the raw disk files for it.
That should help provide some consistency. Of course it takes longer too if it’s a big db
=> More informations about this toot | More toots from johntash@eviltoast.org
I dump the db too.
With that said if backing up the raw files of a db while the service is stopped can produce a bad backup, I think we have bigger problems. That’s because restoring the raw files and starting the service is functionally equivalent to just starting the service with its existing raw files. If that could cause a problem then the service can’t be trusted to be stopped and restarted either. Am I wrong?
=> More informations about this toot | More toots from avidamoeba@lemmy.ca
I was talking about dumping the database as an alternative to backing up the raw database files without stopping the database first. Taking a filesystem-level snapshot of the raw database without stopping the database first also isn’t guaranteed to be consistent. Most databases are fairly resilient now though and can recover themselves even if the raw files aren’t completely consistent.
Stopping the database first and then backing up the raw files should be fine.
The important thing is to test restoring :)
=> More informations about this toot | More toots from johntash@eviltoast.org
Now this makes perfect sense.
=> More informations about this toot | More toots from avidamoeba@lemmy.ca This content has been proxied by September (ba2dc).Proxy Information
text/gemini