#!/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 'rm -r /data/db/* && cd /data/db && tar xvf /backup/mongo_backup_'"$file_suffix"'.tar --strip 1'
docker-compose restart mongo
