menu
techminis

A naukri.com initiative

google-web-stories
Home

>

Databases

>

How to Use...
source image

Hackernoon

1M

read

219

img
dot

Image Credit: Hackernoon

How to Use Docker to Template Local Database

  • Resetting a large local development database can be time-consuming.
  • PostgreSQL has a built-in template system to speed up database replication.
  • Copying data between volumes is possible when using Docker to avoid restoring the database dump.
  • The author used the BusyBox Docker image to make the copying process faster.
  • The author created scripts to automate the process of creating and switching between volumes.
  • The first script is used to create a template database and accepts two required parameters: project name and database dump path.
  • The second script is used to switch to the created template.
  • Creating a tooling around your daily tasks can save you a lot of time.
  • This approach saves the author a lot of time on a daily basis.
  • The repository with the scripts is available on GitHub.

Read Full Article

like

13 Likes

For uninterrupted reading, download the app