Skip to content

NikitaKharkov/mongodb-dumper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Docker mongodb dumper

To dump database:

./dump.sh -h YOUR_HOST

There are several additional options:

-h (required) -- host name
-p            -- port
-d            -- database name; if not set - all database will be dumped
-o            -- additional options for mongodump command; wrap in double quotas all the options

As a result you have db dump in the current folder.

To restore database:

./restore.sh -f PATH_TO_FILE -h YOUR_HOST

There are several additional options:

-f (required) -- path to file
-h (required) -- host name
-p            -- port
-o            -- additional options for mongorestore command; wrap in double quotas all the options

You can always see help info by run command with option --help:

./restore.sh --help

Inspired by Ferikl

About

Provide making dumps with docker images' help

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages