This repository has been archived on 2025-12-25. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
qmi-cloud/shell-utils/mongodump.sh
2020-05-05 13:55:38 +02:00

6 lines
237 B
Bash
Executable File

#!/bin/bash
id=`docker ps | grep 'mongo:4.2' | awk '{ print $1 }'`
d=$(date +%Y-%m-%d-T%H:%M:%S%z)
docker exec $id sh -c 'exec mongodump --uri="mongodb://root:example@mongo/qmicloud?authSource=admin" --archive' > $1/qmicloud-$d.archive