All Projects → kelda → Dksnap

kelda / Dksnap

Licence: apache-2.0
Docker Snapshots for Development and Test Data

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Dksnap

Httpie
As easy as /aitch-tee-tee-pie/ 🥧 Modern, user-friendly command-line HTTP client for the API era. JSON support, colors, sessions, downloads, plugins & more. https://twitter.com/httpie
Stars: ✭ 53,052 (+43385.25%)
Mutual labels:  cli, terminal, developer-tools
Curlie
The power of curl, the ease of use of httpie.
Stars: ✭ 877 (+618.85%)
Mutual labels:  cli, terminal, developer-tools
Haxor News
Browse Hacker News like a haxor: A Hacker News command line interface (CLI).
Stars: ✭ 3,342 (+2639.34%)
Mutual labels:  cli, terminal, developer-tools
Cmd2
cmd2 - quickly build feature-rich and user-friendly interactive command line applications in Python
Stars: ✭ 342 (+180.33%)
Mutual labels:  cli, terminal, developer-tools
Directus Docker
Directus 6 Docker — Legacy Container [EOL]
Stars: ✭ 68 (-44.26%)
Mutual labels:  database-management, database, docker-compose
Mongoke
Instant Graphql for MongoDb (active branch is golang, rewrite in process)
Stars: ✭ 203 (+66.39%)
Mutual labels:  database, containers, docker-compose
Saws
A supercharged AWS command line interface (CLI).
Stars: ✭ 4,886 (+3904.92%)
Mutual labels:  cli, terminal, developer-tools
Docker Mastery For Nodejs
Docker Mastery for Node.js Projects, From a Docker Captain
Stars: ✭ 231 (+89.34%)
Mutual labels:  developer-tools, containers, docker-compose
Prequel
Prequel for Laravel. Clear and concise database management.
Stars: ✭ 1,141 (+835.25%)
Mutual labels:  database-management, database, developer-tools
Http Prompt
An interactive command-line HTTP and API testing client built on top of HTTPie featuring autocomplete, syntax highlighting, and more. https://twitter.com/httpie
Stars: ✭ 8,329 (+6727.05%)
Mutual labels:  cli, terminal, developer-tools
Influx Prompt
An interactive command-line InfluxDB cli with auto completion.
Stars: ✭ 42 (-65.57%)
Mutual labels:  cli, terminal, developer-tools
Docker
Directus Docker — The Official Docker Container for the Directus Suite
Stars: ✭ 93 (-23.77%)
Mutual labels:  database-management, database, containers
Run
⚡The resource runtime
Stars: ✭ 90 (-26.23%)
Mutual labels:  cli, terminal, developer-tools
Wordup Cli
Wordup is a fully integrated development platform for WordPress. Develop plugins and themes locally. Preview in the cloud. Automatic updates in WP.
Stars: ✭ 116 (-4.92%)
Mutual labels:  cli, developer-tools, docker-compose
Word Wrap
Wrap words to a specified length.
Stars: ✭ 107 (-12.3%)
Mutual labels:  cli, terminal
Spinner
Go (golang) package with 90 configurable terminal spinner/progress indicators.
Stars: ✭ 1,637 (+1241.8%)
Mutual labels:  cli, terminal
Labs
This is a collection of tutorials for learning how to use Docker with various tools. Contributions welcome.
Stars: ✭ 10,443 (+8459.84%)
Mutual labels:  containers, docker-compose
Appstoreconnect Cli
An easy to use command-line tool for interacting with the Apple AppStore Connect API
Stars: ✭ 110 (-9.84%)
Mutual labels:  cli, developer-tools
Unix Permissions
Swiss Army knife for Unix permissions
Stars: ✭ 106 (-13.11%)
Mutual labels:  cli, terminal
Httpcat
httpcat is a simple utility for constructing raw HTTP requests on the command line.
Stars: ✭ 109 (-10.66%)
Mutual labels:  cli, terminal

dksnap

Build Status Go Report Card License Slack Made by Kelda
Install  |   Key Features  |   FAQ  |   Roadmap  |   Contributing

dksnap creates, views, and runs snapshots of Docker containers.

When testing locally we often use containers with test data. dksnap allows you to snapshot those containers at a good state, and roll back or forward as needed.

For a full description check out this blogpost.

Install

Install on MacOS or Linux:

curl https://kelda.io/install-dksnap.sh | sh

Or download the latest release and copy to your path.

Demo

Watch the demo, or try it yourself with step-by-step instructions:

# Download the demo.
git clone https://github.com/kelda/dksnap.git
cd dksnap/demo

# Start the example application. You can access it in your browser at localhost:8080.
docker-compose up -d

# Use dksnap to create snapshots of the entries in the Mongo database.
dksnap

Key Features

Create Snapshots

Create a snapshot of any running Docker container. dksnap works with any container, but has extra features for select databases.

  • Snapshots are volume aware. They will capture data in volumes as well as in the container image.
  • Snapshots are database aware. When snapshotting databases that implement the plugin interface, dksnap will politely ask the database process to dump its contents before creating a Docker image.

View Snapshots

dksnap includes a terminal browser that provides a tree view of all your snapshots along with diffs showing how they've changed over time.

Replace Running Containers

Replace a running Docker container with a snapshot taken in the past. dksnap will automatically shut down the running container, boot the snapshot image, and restart the container using the same Docker command arguments.

Other Features

Works With Any Container

By default, dksnap creates snapshots by committing the container's filesystem with docker commit, and dumping the contents of all attached volumes.

Database Awareness

dksnap is database aware, meaning it knows how to politely dump and restore and diff database contents for the following databases:

  • Mongo
  • Postgres
  • MySQL

It has a plugin architecture making it easy to add more databases in the future. Contributions welcome!

Docker Images

dksnap images are simply docker images with some additional metadata. This means they can be viewed and manipulated using the standard docker command line tools.

Share Snapshots

dksnap stores all of the snapshot information in a docker image, so you can share your snapshot by pushing it to a Docker registry just like you would any other container image.

Volume Awareness

Snapshots are volume aware. The official database images all store their data in volumes which docker commit does not capture. dksnap saves volumes in addition to the container filesystem.

FAQ

How is this different than docker commit?

dksnap uses docker commit for its generic snapshot approach to capture the container’s filesystem. However, docker commit has distinct limitations:

  • It doesn't capture volumes, so it can't be used with most database docker images.
  • It isn't database aware. It doesn't politely save/restore database state meaning it's prone to creating corrupted database images.

How is this different than a Docker image?

dksnap uses Docker images as the storage format for its snapshots, which makes them fully compatible with all of the things you would normally do with an image (run, push, delete, etc). You could handcraft Docker images to mimic dksnap snapshots, but dksnap makes it easy to create them from running containers.

Roadmap

  • Automated snapshot creation from production and staging databases in CI.
  • A non-graphical CLI interface that's scriptable.
  • Native support for additional databases.
  • Snapshot of CPU and RAM state.

Contributing

dksnap is still in alpha and under heavy development. Contributions are very much welcome so please get involved. Check out the contribution guidelines to get started.

Build

dksnap requires being built with go version 1.13 or later.

It uses Go Modules, and error wrapping.

git clone https://github.com/kelda/dksnap
cd dksnap
GO111MODULE=on go build .
./dksnap
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].