#!/bin/sh

file_suffix=$1

docker-compose pause mongo
docker run --rm --volumes-from gosdn-mongo-1 -v $(pwd)/docker_volume_backup:/backup ubuntu bash -c 'cd /data/db/ && tar cvf /backup/mongo_backup_'"$file_suffix"'.tar .'
docker-compose unpause mongo
