{"id":14956786,"url":"https://github.com/dokku/dokku-mongo","last_synced_at":"2026-04-01T23:54:37.485Z","repository":{"id":1161297,"uuid":"41275535","full_name":"dokku/dokku-mongo","owner":"dokku","description":"a mongo plugin for dokku","archived":false,"fork":false,"pushed_at":"2026-03-22T19:12:13.000Z","size":680,"stargazers_count":180,"open_issues_count":0,"forks_count":32,"subscribers_count":4,"default_branch":"master","last_synced_at":"2026-03-23T10:53:07.900Z","etag":null,"topics":["dokku","dokku-plugin","dokku-service","mongo","mongodb","paas"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dokku.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"dokku","open_collective":"dokku","patreon":"dokku"}},"created_at":"2015-08-24T01:41:45.000Z","updated_at":"2026-03-22T19:12:16.000Z","dependencies_parsed_at":"2023-12-19T07:28:14.497Z","dependency_job_id":"5a8a4c54-6090-4bf8-a966-51d381d9e33f","html_url":"https://github.com/dokku/dokku-mongo","commit_stats":{"total_commits":593,"total_committers":16,"mean_commits":37.0625,"dds":0.2917369308600337,"last_synced_commit":"86a968774a9595066d0b8b83825b6485a9b16039"},"previous_names":[],"tags_count":123,"template":false,"template_full_name":null,"purl":"pkg:github/dokku/dokku-mongo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dokku%2Fdokku-mongo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dokku%2Fdokku-mongo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dokku%2Fdokku-mongo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dokku%2Fdokku-mongo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dokku","download_url":"https://codeload.github.com/dokku/dokku-mongo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dokku%2Fdokku-mongo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31293130,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T21:15:39.731Z","status":"ssl_error","status_checked_at":"2026-04-01T21:15:34.046Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["dokku","dokku-plugin","dokku-service","mongo","mongodb","paas"],"created_at":"2024-09-24T13:13:31.521Z","updated_at":"2026-04-01T23:54:37.467Z","avatar_url":"https://github.com/dokku.png","language":"Shell","funding_links":["https://github.com/sponsors/dokku","https://opencollective.com/dokku","https://patreon.com/dokku"],"categories":[],"sub_categories":[],"readme":"# dokku mongo [![Build Status](https://img.shields.io/github/actions/workflow/status/dokku/dokku-mongo/ci.yml?branch=master\u0026style=flat-square \"Build Status\")](https://github.com/dokku/dokku-mongo/actions/workflows/ci.yml?query=branch%3Amaster) [![IRC Network](https://img.shields.io/badge/irc-libera-blue.svg?style=flat-square \"IRC Libera\")](https://webchat.libera.chat/?channels=dokku)\n\nOfficial mongo plugin for dokku. Currently defaults to installing [mongo 8.2.6](https://hub.docker.com/_/mongo/).\n\n## Requirements\n\n- dokku 0.19.x+\n- docker 1.8.x\n\n## Installation\n\n```shell\n# on 0.19.x+\nsudo dokku plugin:install https://github.com/dokku/dokku-mongo.git --name mongo\n```\n\n## Commands\n\n```\nmongo:app-links \u003capp\u003e                              # list all mongo service links for a given app\nmongo:backup \u003cservice\u003e \u003cbucket-name\u003e [--use-iam]   # create a backup of the mongo service to an existing s3 bucket\nmongo:backup-auth \u003cservice\u003e \u003caws-access-key-id\u003e \u003caws-secret-access-key\u003e \u003caws-default-region\u003e \u003caws-signature-version\u003e \u003cendpoint-url\u003e # set up authentication for backups on the mongo service\nmongo:backup-deauth \u003cservice\u003e                      # remove backup authentication for the mongo service\nmongo:backup-schedule \u003cservice\u003e \u003cschedule\u003e \u003cbucket-name\u003e [--use-iam] # schedule a backup of the mongo service\nmongo:backup-schedule-cat \u003cservice\u003e                # cat the contents of the configured backup cronfile for the service\nmongo:backup-set-encryption \u003cservice\u003e \u003cpassphrase\u003e # set encryption for all future backups of mongo service\nmongo:backup-set-public-key-encryption \u003cservice\u003e \u003cpublic-key-id\u003e # set GPG Public Key encryption for all future backups of mongo service\nmongo:backup-unschedule \u003cservice\u003e                  # unschedule the backup of the mongo service\nmongo:backup-unset-encryption \u003cservice\u003e            # unset encryption for future backups of the mongo service\nmongo:backup-unset-public-key-encryption \u003cservice\u003e # unset GPG Public Key encryption for future backups of the mongo service\nmongo:clone \u003cservice\u003e \u003cnew-service\u003e [--clone-flags...] # create container \u003cnew-name\u003e then copy data from \u003cname\u003e into \u003cnew-name\u003e\nmongo:connect \u003cservice\u003e                            # connect to the service via the mongo connection tool\nmongo:connect-admin \u003cservice\u003e                      # connect via mongo to a mongo service as admin user\nmongo:create \u003cservice\u003e [--create-flags...]         # create a mongo service\nmongo:destroy \u003cservice\u003e [-f|--force]               # delete the mongo service/data/container if there are no links left\nmongo:enter \u003cservice\u003e                              # enter or run a command in a running mongo service container\nmongo:exists \u003cservice\u003e                             # check if the mongo service exists\nmongo:export \u003cservice\u003e                             # export a dump of the mongo service database\nmongo:expose \u003cservice\u003e \u003cports...\u003e                  # expose a mongo service on custom host:port if provided (random port on the 0.0.0.0 interface if otherwise unspecified)\nmongo:import \u003cservice\u003e                             # import a dump into the mongo service database\nmongo:info \u003cservice\u003e [--single-info-flag]          # print the service information\nmongo:link \u003cservice\u003e \u003capp\u003e [--link-flags...]       # link the mongo service to the app\nmongo:linked \u003cservice\u003e \u003capp\u003e                       # check if the mongo service is linked to an app\nmongo:links \u003cservice\u003e                              # list all apps linked to the mongo service\nmongo:list                                         # list all mongo services\nmongo:logs \u003cservice\u003e [-t|--tail] \u003ctail-num-optional\u003e # print the most recent log(s) for this service\nmongo:pause \u003cservice\u003e                              # pause a running mongo service\nmongo:promote \u003cservice\u003e \u003capp\u003e                      # promote service \u003cservice\u003e as MONGO_URL in \u003capp\u003e\nmongo:restart \u003cservice\u003e                            # graceful shutdown and restart of the mongo service container\nmongo:set \u003cservice\u003e \u003ckey\u003e \u003cvalue\u003e                  # set or clear a property for a service\nmongo:start \u003cservice\u003e                              # start a previously stopped mongo service\nmongo:stop \u003cservice\u003e                               # stop a running mongo service\nmongo:unexpose \u003cservice\u003e                           # unexpose a previously exposed mongo service\nmongo:unlink \u003cservice\u003e \u003capp\u003e                       # unlink the mongo service from the app\nmongo:upgrade \u003cservice\u003e [--upgrade-flags...]       # upgrade service \u003cservice\u003e to the specified versions\n```\n\n## Usage\n\nHelp for any commands can be displayed by specifying the command as an argument to mongo:help. Plugin help output in conjunction with any files in the `docs/` folder is used to generate the plugin documentation. Please consult the `mongo:help` command for any undocumented commands.\n\n### Basic Usage\n\n### create a mongo service\n\n```shell\n# usage\ndokku mongo:create \u003cservice\u003e [--create-flags...]\n```\n\nflags:\n\n- `-c|--config-options \"--args --go=here\"`: extra arguments to pass to the container create command (default: ` --storageEngine wiredTiger --auth `)\n- `-C|--custom-env \"USER=alpha;HOST=beta\"`: semi-colon delimited environment variables to start the service with\n- `-i|--image IMAGE`: the image name to start the service with\n- `-I|--image-version IMAGE_VERSION`: the image version to start the service with\n- `-m|--memory MEMORY`: container memory limit in megabytes (default: unlimited)\n- `-N|--initial-network INITIAL_NETWORK`: the initial network to attach the service to\n- `-p|--password PASSWORD`: override the user-level service password\n- `-P|--post-create-network NETWORKS`: a comma-separated list of networks to attach the service container to after service creation\n- `-r|--root-password PASSWORD`: override the root-level service password\n- `-S|--post-start-network NETWORKS`: a comma-separated list of networks to attach the service container to after service start\n- `-s|--shm-size SHM_SIZE`: override shared memory size for mongo docker container\n\nCreate a mongo service named lollipop:\n\n```shell\ndokku mongo:create lollipop\n```\n\nYou can also specify the image and image version to use for the service. It *must* be compatible with the mongo image.\n\n```shell\nexport MONGO_IMAGE=\"mongo\"\nexport MONGO_IMAGE_VERSION=\"${PLUGIN_IMAGE_VERSION}\"\ndokku mongo:create lollipop\n```\n\nYou can also specify custom environment variables to start the mongo service in semicolon-separated form.\n\n```shell\nexport MONGO_CUSTOM_ENV=\"USER=alpha;HOST=beta\"\ndokku mongo:create lollipop\n```\n\n### print the service information\n\n```shell\n# usage\ndokku mongo:info \u003cservice\u003e [--single-info-flag]\n```\n\nflags:\n\n- `--config-dir`: show the service configuration directory\n- `--data-dir`: show the service data directory\n- `--dsn`: show the service DSN\n- `--exposed-ports`: show service exposed ports\n- `--id`: show the service container id\n- `--internal-ip`: show the service internal ip\n- `--initial-network`: show the initial network being connected to\n- `--links`: show the service app links\n- `--post-create-network`: show the networks to attach to after service container creation\n- `--post-start-network`: show the networks to attach to after service container start\n- `--service-root`: show the service root directory\n- `--status`: show the service running status\n- `--version`: show the service image version\n\nGet connection information as follows:\n\n```shell\ndokku mongo:info lollipop\n```\n\nYou can also retrieve a specific piece of service info via flags:\n\n```shell\ndokku mongo:info lollipop --config-dir\ndokku mongo:info lollipop --data-dir\ndokku mongo:info lollipop --dsn\ndokku mongo:info lollipop --exposed-ports\ndokku mongo:info lollipop --id\ndokku mongo:info lollipop --internal-ip\ndokku mongo:info lollipop --initial-network\ndokku mongo:info lollipop --links\ndokku mongo:info lollipop --post-create-network\ndokku mongo:info lollipop --post-start-network\ndokku mongo:info lollipop --service-root\ndokku mongo:info lollipop --status\ndokku mongo:info lollipop --version\n```\n\n### list all mongo services\n\n```shell\n# usage\ndokku mongo:list\n```\n\nList all services:\n\n```shell\ndokku mongo:list\n```\n\n### print the most recent log(s) for this service\n\n```shell\n# usage\ndokku mongo:logs \u003cservice\u003e [-t|--tail] \u003ctail-num-optional\u003e\n```\n\nflags:\n\n- `-t|--tail [\u003ctail-num\u003e]`: do not stop when end of the logs are reached and wait for additional output\n\nYou can tail logs for a particular service:\n\n```shell\ndokku mongo:logs lollipop\n```\n\nBy default, logs will not be tailed, but you can do this with the --tail flag:\n\n```shell\ndokku mongo:logs lollipop --tail\n```\n\nThe default tail setting is to show all logs, but an initial count can also be specified:\n\n```shell\ndokku mongo:logs lollipop --tail 5\n```\n\n### link the mongo service to the app\n\n```shell\n# usage\ndokku mongo:link \u003cservice\u003e \u003capp\u003e [--link-flags...]\n```\n\nflags:\n\n- `-a|--alias \"BLUE_DATABASE\"`: an alternative alias to use for linking to an app via environment variable\n- `-q|--querystring \"pool=5\"`: ampersand delimited querystring arguments to append to the service link\n- `-n|--no-restart \"false\"`: whether or not to restart the app on link (default: true)\n\nA mongo service can be linked to a container. This will use native docker links via the docker-options plugin. Here we link it to our `playground` app.\n\n\u003e NOTE: this will restart your app\n\n```shell\ndokku mongo:link lollipop playground\n```\n\nThe following environment variables will be set automatically by docker (not on the app itself, so they won’t be listed when calling dokku config):\n\n```\nDOKKU_MONGO_LOLLIPOP_NAME=/lollipop/DATABASE\nDOKKU_MONGO_LOLLIPOP_PORT=tcp://172.17.0.1:27017\nDOKKU_MONGO_LOLLIPOP_PORT_27017_TCP=tcp://172.17.0.1:27017\nDOKKU_MONGO_LOLLIPOP_PORT_27017_TCP_PROTO=tcp\nDOKKU_MONGO_LOLLIPOP_PORT_27017_TCP_PORT=27017\nDOKKU_MONGO_LOLLIPOP_PORT_27017_TCP_ADDR=172.17.0.1\n```\n\nThe following will be set on the linked application by default:\n\n```\nMONGO_URL=mongodb://lollipop:SOME_PASSWORD@dokku-mongo-lollipop:27017/lollipop\n```\n\nThe host exposed here only works internally in docker containers. If you want your container to be reachable from outside, you should use the `expose` subcommand. Another service can be linked to your app:\n\n```shell\ndokku mongo:link other_service playground\n```\n\nIt is possible to change the protocol for `MONGO_URL` by setting the environment variable `MONGO_DATABASE_SCHEME` on the app. Doing so will after linking will cause the plugin to think the service is not linked, and we advise you to unlink before proceeding.\n\n```shell\ndokku config:set playground MONGO_DATABASE_SCHEME=mongodb2\ndokku mongo:link lollipop playground\n```\n\nThis will cause `MONGO_URL` to be set as:\n\n```\nmongodb2://lollipop:SOME_PASSWORD@dokku-mongo-lollipop:27017/lollipop\n```\n\n### unlink the mongo service from the app\n\n```shell\n# usage\ndokku mongo:unlink \u003cservice\u003e \u003capp\u003e\n```\n\nflags:\n\n- `-n|--no-restart \"false\"`: whether or not to restart the app on unlink (default: true)\n\nYou can unlink a mongo service:\n\n\u003e NOTE: this will restart your app and unset related environment variables\n\n```shell\ndokku mongo:unlink lollipop playground\n```\n\n### set or clear a property for a service\n\n```shell\n# usage\ndokku mongo:set \u003cservice\u003e \u003ckey\u003e \u003cvalue\u003e\n```\n\nSet the network to attach after the service container is started:\n\n```shell\ndokku mongo:set lollipop post-create-network custom-network\n```\n\nSet multiple networks:\n\n```shell\ndokku mongo:set lollipop post-create-network custom-network,other-network\n```\n\nUnset the post-create-network value:\n\n```shell\ndokku mongo:set lollipop post-create-network\n```\n\n### Service Lifecycle\n\nThe lifecycle of each service can be managed through the following commands:\n\n### connect to the service via the mongo connection tool\n\n```shell\n# usage\ndokku mongo:connect \u003cservice\u003e\n```\n\nConnect to the service via the mongo connection tool:\n\n\u003e NOTE: disconnecting from ssh while running this command may leave zombie processes due to moby/moby#9098\n\n```shell\ndokku mongo:connect lollipop\n```\n\n### enter or run a command in a running mongo service container\n\n```shell\n# usage\ndokku mongo:enter \u003cservice\u003e\n```\n\nA bash prompt can be opened against a running service. Filesystem changes will not be saved to disk.\n\n\u003e NOTE: disconnecting from ssh while running this command may leave zombie processes due to moby/moby#9098\n\n```shell\ndokku mongo:enter lollipop\n```\n\nYou may also run a command directly against the service. Filesystem changes will not be saved to disk.\n\n```shell\ndokku mongo:enter lollipop touch /tmp/test\n```\n\n### expose a mongo service on custom host:port if provided (random port on the 0.0.0.0 interface if otherwise unspecified)\n\n```shell\n# usage\ndokku mongo:expose \u003cservice\u003e \u003cports...\u003e\n```\n\nExpose the service on the service's normal ports, allowing access to it from the public interface (`0.0.0.0`):\n\n```shell\ndokku mongo:expose lollipop 27017 27018 27019 28017\n```\n\nExpose the service on the service's normal ports, with the first on a specified ip address (127.0.0.1):\n\n```shell\ndokku mongo:expose lollipop 127.0.0.1:27017 27018 27019 28017\n```\n\n### unexpose a previously exposed mongo service\n\n```shell\n# usage\ndokku mongo:unexpose \u003cservice\u003e\n```\n\nUnexpose the service, removing access to it from the public interface (`0.0.0.0`):\n\n```shell\ndokku mongo:unexpose lollipop\n```\n\n### promote service \u003cservice\u003e as MONGO_URL in \u003capp\u003e\n\n```shell\n# usage\ndokku mongo:promote \u003cservice\u003e \u003capp\u003e\n```\n\nIf you have a mongo service linked to an app and try to link another mongo service another link environment variable will be generated automatically:\n\n```\nDOKKU_MONGO_BLUE_URL=mongodb://other_service:ANOTHER_PASSWORD@dokku-mongo-other-service:27017/other_service\n```\n\nYou can promote the new service to be the primary one:\n\n\u003e NOTE: this will restart your app\n\n```shell\ndokku mongo:promote other_service playground\n```\n\nThis will replace `MONGO_URL` with the url from other_service and generate another environment variable to hold the previous value if necessary. You could end up with the following for example:\n\n```\nMONGO_URL=mongodb://other_service:ANOTHER_PASSWORD@dokku-mongo-other-service:27017/other_service\nDOKKU_MONGO_BLUE_URL=mongodb://other_service:ANOTHER_PASSWORD@dokku-mongo-other-service:27017/other_service\nDOKKU_MONGO_SILVER_URL=mongodb://lollipop:SOME_PASSWORD@dokku-mongo-lollipop:27017/lollipop\n```\n\n### start a previously stopped mongo service\n\n```shell\n# usage\ndokku mongo:start \u003cservice\u003e\n```\n\nStart the service:\n\n```shell\ndokku mongo:start lollipop\n```\n\n### stop a running mongo service\n\n```shell\n# usage\ndokku mongo:stop \u003cservice\u003e\n```\n\nStop the service and removes the running container:\n\n```shell\ndokku mongo:stop lollipop\n```\n\n### pause a running mongo service\n\n```shell\n# usage\ndokku mongo:pause \u003cservice\u003e\n```\n\nPause the running container for the service:\n\n```shell\ndokku mongo:pause lollipop\n```\n\n### graceful shutdown and restart of the mongo service container\n\n```shell\n# usage\ndokku mongo:restart \u003cservice\u003e\n```\n\nRestart the service:\n\n```shell\ndokku mongo:restart lollipop\n```\n\n### upgrade service \u003cservice\u003e to the specified versions\n\n```shell\n# usage\ndokku mongo:upgrade \u003cservice\u003e [--upgrade-flags...]\n```\n\nflags:\n\n- `-c|--config-options \"--args --go=here\"`: extra arguments to pass to the container create command (default: ` --storageEngine wiredTiger --auth `)\n- `-C|--custom-env \"USER=alpha;HOST=beta\"`: semi-colon delimited environment variables to start the service with\n- `-i|--image IMAGE`: the image name to start the service with\n- `-I|--image-version IMAGE_VERSION`: the image version to start the service with\n- `-N|--initial-network INITIAL_NETWORK`: the initial network to attach the service to\n- `-P|--post-create-network NETWORKS`: a comma-separated list of networks to attach the service container to after service creation\n- `-R|--restart-apps \"true\"`: whether or not to force an app restart (default: false)\n- `-S|--post-start-network NETWORKS`: a comma-separated list of networks to attach the service container to after service start\n- `-s|--shm-size SHM_SIZE`: override shared memory size for mongo docker container\n\nYou can upgrade an existing service to a new image or image-version:\n\n```shell\ndokku mongo:upgrade lollipop\n```\n\n### Service Automation\n\nService scripting can be executed using the following commands:\n\n### list all mongo service links for a given app\n\n```shell\n# usage\ndokku mongo:app-links \u003capp\u003e\n```\n\nList all mongo services that are linked to the `playground` app.\n\n```shell\ndokku mongo:app-links playground\n```\n\n### create container \u003cnew-name\u003e then copy data from \u003cname\u003e into \u003cnew-name\u003e\n\n```shell\n# usage\ndokku mongo:clone \u003cservice\u003e \u003cnew-service\u003e [--clone-flags...]\n```\n\nflags:\n\n- `-c|--config-options \"--args --go=here\"`: extra arguments to pass to the container create command (default: ` --storageEngine wiredTiger --auth `)\n- `-C|--custom-env \"USER=alpha;HOST=beta\"`: semi-colon delimited environment variables to start the service with\n- `-i|--image IMAGE`: the image name to start the service with\n- `-I|--image-version IMAGE_VERSION`: the image version to start the service with\n- `-m|--memory MEMORY`: container memory limit in megabytes (default: unlimited)\n- `-N|--initial-network INITIAL_NETWORK`: the initial network to attach the service to\n- `-p|--password PASSWORD`: override the user-level service password\n- `-P|--post-create-network NETWORKS`: a comma-separated list of networks to attach the service container to after service creation\n- `-r|--root-password PASSWORD`: override the root-level service password\n- `-S|--post-start-network NETWORKS`: a comma-separated list of networks to attach the service container to after service start\n- `-s|--shm-size SHM_SIZE`: override shared memory size for mongo docker container\n\nYou can clone an existing service to a new one:\n\n```shell\ndokku mongo:clone lollipop lollipop-2\n```\n\n### check if the mongo service exists\n\n```shell\n# usage\ndokku mongo:exists \u003cservice\u003e\n```\n\nHere we check if the lollipop mongo service exists.\n\n```shell\ndokku mongo:exists lollipop\n```\n\n### check if the mongo service is linked to an app\n\n```shell\n# usage\ndokku mongo:linked \u003cservice\u003e \u003capp\u003e\n```\n\nHere we check if the lollipop mongo service is linked to the `playground` app.\n\n```shell\ndokku mongo:linked lollipop playground\n```\n\n### list all apps linked to the mongo service\n\n```shell\n# usage\ndokku mongo:links \u003cservice\u003e\n```\n\nList all apps linked to the `lollipop` mongo service.\n\n```shell\ndokku mongo:links lollipop\n```\n\n### Data Management\n\nThe underlying service data can be imported and exported with the following commands:\n\n### import a dump into the mongo service database\n\n```shell\n# usage\ndokku mongo:import \u003cservice\u003e\n```\n\nImport a datastore dump:\n\n```shell\ndokku mongo:import lollipop \u003c data.dump\n```\n\n### export a dump of the mongo service database\n\n```shell\n# usage\ndokku mongo:export \u003cservice\u003e\n```\n\nBy default, datastore output is exported to stdout:\n\n```shell\ndokku mongo:export lollipop\n```\n\nYou can redirect this output to a file:\n\n```shell\ndokku mongo:export lollipop \u003e data.dump\n```\n\n### Backups\n\nDatastore backups are supported via AWS S3 and S3 compatible services like [minio](https://github.com/minio/minio).\n\nYou may skip the `backup-auth` step if your dokku install is running within EC2 and has access to the bucket via an IAM profile. In that case, use the `--use-iam` option with the `backup` command.\n\nIf both passphrase and public key forms of encryption are set, the public key encryption will take precedence.\n\nThe underlying core backup script is present [here](https://github.com/dokku/docker-s3backup/blob/main/backup.sh).\n\nBackups can be performed using the backup commands:\n\n### set up authentication for backups on the mongo service\n\n```shell\n# usage\ndokku mongo:backup-auth \u003cservice\u003e \u003caws-access-key-id\u003e \u003caws-secret-access-key\u003e \u003caws-default-region\u003e \u003caws-signature-version\u003e \u003cendpoint-url\u003e\n```\n\nSetup s3 backup authentication:\n\n```shell\ndokku mongo:backup-auth lollipop AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY\n```\n\nSetup s3 backup authentication with different region:\n\n```shell\ndokku mongo:backup-auth lollipop AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_REGION\n```\n\nSetup s3 backup authentication with different signature version and endpoint:\n\n```shell\ndokku mongo:backup-auth lollipop AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_REGION AWS_SIGNATURE_VERSION ENDPOINT_URL\n```\n\nMore specific example for minio auth:\n\n```shell\ndokku mongo:backup-auth lollipop MINIO_ACCESS_KEY_ID MINIO_SECRET_ACCESS_KEY us-east-1 s3v4 https://YOURMINIOSERVICE\n```\n\n### remove backup authentication for the mongo service\n\n```shell\n# usage\ndokku mongo:backup-deauth \u003cservice\u003e\n```\n\nRemove s3 authentication:\n\n```shell\ndokku mongo:backup-deauth lollipop\n```\n\n### create a backup of the mongo service to an existing s3 bucket\n\n```shell\n# usage\ndokku mongo:backup \u003cservice\u003e \u003cbucket-name\u003e [--use-iam]\n```\n\nflags:\n\n- `-u|--use-iam`: use the IAM profile associated with the current server\n\nBackup the `lollipop` service to the `my-s3-bucket` bucket on `AWS`:`\n\n```shell\ndokku mongo:backup lollipop my-s3-bucket --use-iam\n```\n\nRestore a backup file (assuming it was extracted via `tar -xf backup.tgz`):\n\n```shell\ndokku mongo:import lollipop \u003c backup-folder/export\n```\n\n### set encryption for all future backups of mongo service\n\n```shell\n# usage\ndokku mongo:backup-set-encryption \u003cservice\u003e \u003cpassphrase\u003e\n```\n\nSet the GPG-compatible passphrase for encrypting backups for backups:\n\n```shell\ndokku mongo:backup-set-encryption lollipop\n```\n\nPublic key encryption will take precendence over the passphrase encryption if both types are set.\n\n### set GPG Public Key encryption for all future backups of mongo service\n\n```shell\n# usage\ndokku mongo:backup-set-public-key-encryption \u003cservice\u003e \u003cpublic-key-id\u003e\n```\n\nSet the `GPG` Public Key for encrypting backups:\n\n```shell\ndokku mongo:backup-set-public-key-encryption lollipop\n```\n\nThis method currently requires the \u003cpublic-key-id\u003e to be present on the keyserver `keyserver.ubuntu.com`:\n\n### unset encryption for future backups of the mongo service\n\n```shell\n# usage\ndokku mongo:backup-unset-encryption \u003cservice\u003e\n```\n\nUnset the `GPG` encryption passphrase for backups:\n\n```shell\ndokku mongo:backup-unset-encryption lollipop\n```\n\n### unset GPG Public Key encryption for future backups of the mongo service\n\n```shell\n# usage\ndokku mongo:backup-unset-public-key-encryption \u003cservice\u003e\n```\n\nUnset the `GPG` Public Key encryption for backups:\n\n```shell\ndokku mongo:backup-unset-public-key-encryption lollipop\n```\n\n### schedule a backup of the mongo service\n\n```shell\n# usage\ndokku mongo:backup-schedule \u003cservice\u003e \u003cschedule\u003e \u003cbucket-name\u003e [--use-iam]\n```\n\nflags:\n\n- `-u|--use-iam`: use the IAM profile associated with the current server\n\nSchedule a backup:\n\n\u003e 'schedule' is a crontab expression, eg. \"0 3 * * *\" for each day at 3am\n\n```shell\ndokku mongo:backup-schedule lollipop \"0 3 * * *\" my-s3-bucket\n```\n\nSchedule a backup and authenticate via iam:\n\n```shell\ndokku mongo:backup-schedule lollipop \"0 3 * * *\" my-s3-bucket --use-iam\n```\n\n### cat the contents of the configured backup cronfile for the service\n\n```shell\n# usage\ndokku mongo:backup-schedule-cat \u003cservice\u003e\n```\n\nCat the contents of the configured backup cronfile for the service:\n\n```shell\ndokku mongo:backup-schedule-cat lollipop\n```\n\n### unschedule the backup of the mongo service\n\n```shell\n# usage\ndokku mongo:backup-unschedule \u003cservice\u003e\n```\n\nRemove the scheduled backup from cron:\n\n```shell\ndokku mongo:backup-unschedule lollipop\n```\n\n### Disabling `docker image pull` calls\n\nIf you wish to disable the `docker image pull` calls that the plugin triggers, you may set the `MONGO_DISABLE_PULL` environment variable to `true`. Once disabled, you will need to pull the service image you wish to deploy as shown in the `stderr` output.\n\nPlease ensure the proper images are in place when `docker image pull` is disabled.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdokku%2Fdokku-mongo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdokku%2Fdokku-mongo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdokku%2Fdokku-mongo/lists"}