mysql - Are docker-hosted databases somehow exempt from backup best practices? -


as far aware, ms sql, postgresql, , even mysql databases (so, assumed, in general rdbms engines), cannot file system hosted on, need sql-level backup have hope of internal consistency , therefore ability restore.

but answers this , indeed the official docs referenced seem suggest 1 can tar away on database data:

docker run --volumes-from dbdata -v $(pwd):/backup ubuntu tar cvf /backup/backup.tar /dbdata 

these 2 ideas seem @ odds 1 another. there special how docker works makes unnecessary use sql-level backups? if not, missing in understanding? (why used official example when can't use production database? can't right...)

under circumstances, should safe use image of database on disk:

  • the database server not running.
  • all persistent data on disk system(s) being backed (logs, tables spaces, temporary storage).
  • all components restored together.
  • you restoring image same server on same path.

the last condition important, because aspects of database configuration may stored in operating system files.

you need backup within database whenever server running. server responsible internal consistency of data, , disk image may not complete or recoverable. if server not running, state of database should consistent in persistent storage.


Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

javascript - Complex json ng-repeat -

jquery - Cloning of rows and columns from the old table into the new with colSpan and rowSpan -