Skip to content

Commit

Permalink
update sh scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
skadefro committed Sep 15, 2022
1 parent 9f0b8d9 commit a5e9546
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion db-backup.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh
docker-compose exec mongodb rm /tmp/openflow.bak
docker-compose exec mongodb /usr/bin/mongodump --db openflow --gzip --archive=/tmp/openflow.bak
docker compose cp mongodb:/tmp/openflow.bak .
docker-compose cp mongodb:/tmp/openflow.bak .
current_time=$(date "+%Y.%m.%d-%H.%M.%S")
echo "Current Time : $current_time"
cp openflow.bak openflow.$current_time.bak
4 changes: 2 additions & 2 deletions db-restore.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/sh
docker compose cp openflow.bak mongodb:/tmp/
docker-compose exec mongodb /usr/bin/mongorestore --gzip --archive=/tmp/openflow.bak
docker-compose cp openflow.bak mongodb:/tmp/
docker-compose exec mongodb /usr/bin/mongorestore --gzip --archive=/open/openflow.bak

0 comments on commit a5e9546

Please sign in to comment.