{"id":20066036,"url":"https://github.com/kelda/dksnap","last_synced_at":"2025-06-11T01:33:35.530Z","repository":{"id":51889632,"uuid":"238303123","full_name":"kelda/dksnap","owner":"kelda","description":"Docker Snapshots for Development and Test Data","archived":false,"fork":false,"pushed_at":"2022-12-11T23:18:37.000Z","size":134,"stargazers_count":150,"open_issues_count":18,"forks_count":12,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-05T18:36:35.609Z","etag":null,"topics":["cli","containers","database","database-management","developer-tools","docker","docker-compose","go","golang","terminal"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kelda.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-02-04T20:48:11.000Z","updated_at":"2025-04-11T16:43:16.000Z","dependencies_parsed_at":"2023-01-27T09:01:23.922Z","dependency_job_id":null,"html_url":"https://github.com/kelda/dksnap","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kelda%2Fdksnap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kelda%2Fdksnap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kelda%2Fdksnap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kelda%2Fdksnap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kelda","download_url":"https://codeload.github.com/kelda/dksnap/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kelda%2Fdksnap/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259181324,"owners_count":22817922,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","containers","database","database-management","developer-tools","docker","docker-compose","go","golang","terminal"],"created_at":"2024-11-13T13:54:18.311Z","updated_at":"2025-06-11T01:33:35.477Z","avatar_url":"https://github.com/kelda.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dksnap\n[![Build Status](https://travis-ci.org/kelda/dksnap.svg?branch=master)](https://travis-ci.org/kelda/dksnap)\n[![Go Report Card](https://goreportcard.com/badge/github.com/kelda/dksnap)](https://goreportcard.com/report/github.com/kelda/dksnap)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE)\n[![Slack](https://kelda.io/img/dksnap/slack-badge.svg)](http://slack.kelda.io)\n[![Made by Kelda](https://kelda.io/img/dksnap/love-badge.svg)](https://kelda.io)\u003cbr/\u003e\n[Install](#install)\u0026nbsp;\u0026nbsp;|\u0026nbsp;\u0026nbsp;\n[Key Features](#key-features)\u0026nbsp;\u0026nbsp;|\u0026nbsp;\u0026nbsp;\n[FAQ](#faq)\u0026nbsp;\u0026nbsp;|\u0026nbsp;\u0026nbsp;\n[Roadmap](#roadmap)\u0026nbsp;\u0026nbsp;|\u0026nbsp;\u0026nbsp;\n[Contributing](#contributing)\u003cbr/\u003e\n\n#### `dksnap` creates, views, and runs snapshots of Docker containers.\nWhen testing locally we often use containers with *test data*. `dksnap` allows\nyou to snapshot those containers at a good state, and roll back or forward as\nneeded.\n\nFor a full description check out this [blogpost](https://kelda.io/blog/dksnap-docker-snapshots-for-development-and-test-data).\n\n[\u003cimg src=\"https://kelda.io/img/dksnap/dksnap-demo3.gif\" width=\"75%\" \u003e](https://youtu.be/fmYGfs632-g)\n\n# Install\nInstall on MacOS or Linux:\n\n```\ncurl https://kelda.io/install-dksnap.sh | sh\n```\n\nOr download the latest [release](https://github.com/kelda/dksnap/releases) and\ncopy to your path.\n\n## Demo\nWatch the [demo](https://youtu.be/fmYGfs632-g), or try it yourself with\nstep-by-step [instructions](./demo/README.md):\n\n```\n# Download the demo.\ngit clone https://github.com/kelda/dksnap.git\ncd dksnap/demo\n\n# Start the example application. You can access it in your browser at localhost:8080.\ndocker-compose up -d\n\n# Use dksnap to create snapshots of the entries in the Mongo database.\ndksnap\n```\n\n# Key Features\n\n## Create Snapshots\n\u003cimg src=\"https://kelda.io/img/dksnap/create-snapshot2.png\" width=\"450\" height=\"100%\"\u003e\n\nCreate a snapshot of any running Docker container. `dksnap` works with any\ncontainer, but has extra features for select databases.\n* Snapshots are volume aware.  They will capture data in volumes as well as in\n  the container image.\n* Snapshots are database aware.  When snapshotting databases that implement the\n  [plugin interface](./pkg/snapshot/types.go), `dksnap` will politely ask the\n  database process to dump its contents before creating a Docker image.\n\n## View Snapshots\n\u003cimg src=\"https://kelda.io/img/dksnap/diff.png\" width=\"450\" height=\"100%\"\u003e\n\n`dksnap` includes a terminal browser that provides a tree view of all your\nsnapshots along with diffs showing how they've changed over time.\n\n## Replace Running Containers\n\u003cimg src=\"https://kelda.io/img/dksnap/replace-snapshot.gif\" width=\"450\" height=\"100%\"\u003e\n\nReplace a running Docker container with a snapshot taken in the past.  `dksnap`\nwill automatically shut down the running container, boot the snapshot image,\nand restart the container using the same Docker command arguments.\n\n## Other Features\n\n### Works With Any Container\nBy default, `dksnap` creates snapshots by committing the container's\nfilesystem with `docker commit`, and dumping the contents of all attached\nvolumes.\n\n### Database Awareness\n`dksnap` is database aware, meaning it knows how to politely dump and\nrestore and diff database contents for the following databases:\n* Mongo\n* Postgres\n* MySQL\n\nIt has a plugin architecture making it easy to add more databases in the\nfuture.  Contributions welcome!\n\n### Docker Images\n`dksnap` images are simply `docker` images with some additional metadata.  This\nmeans they can be viewed and manipulated using the standard `docker` command\nline tools.\n\n### Share Snapshots\n`dksnap` stores all of the snapshot information in a `docker` image, so you can\nshare your snapshot by pushing it to a Docker registry just like you would any\nother container image.\n\n### Volume Awareness\nSnapshots are volume aware. The official database images all store their data\nin volumes  which `docker commit` does not capture.  `dksnap` saves volumes in\naddition to the container filesystem.\n\n# FAQ\n\n#### How is this different than `docker commit`?\n`dksnap` uses `docker commit` for its generic snapshot approach to capture the\ncontainer’s filesystem. However, `docker commit` has distinct limitations:\n* It doesn't capture volumes, so it can't be used with most database docker\n  images.\n* It isn't database aware.  It doesn't politely save/restore database state\n  meaning it's prone to creating corrupted database images.\n\n#### How is this different than a Docker image?\n`dksnap` uses Docker images as the storage format for its snapshots, which\nmakes them fully compatible with all of the things you would normally do with\nan image (run, push, delete, etc). You could handcraft Docker images to mimic\n`dksnap` snapshots, but `dksnap` makes it easy to create them from running\ncontainers.\n\n# Roadmap\n* Automated snapshot creation from production and staging databases in CI.\n* A non-graphical CLI interface that's scriptable.\n* Native support for additional databases.\n* Snapshot of CPU and RAM state.\n\n# Contributing\n`dksnap` is still in alpha and under heavy development.  Contributions are very\nmuch welcome so please get involved.  Check out the [contribution\nguidelines](CONTRIBUTING.md) to get started.\n\n### Build\n`dksnap` requires being built with `go` version 1.13 or later.\n\nIt uses Go Modules, and [error wrapping](https://blog.golang.org/go1.13-errors).\n\n```\ngit clone https://github.com/kelda/dksnap\ncd dksnap\nGO111MODULE=on go build .\n./dksnap\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkelda%2Fdksnap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkelda%2Fdksnap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkelda%2Fdksnap/lists"}