Advertisement
henno

refresh_mongodb.sh

Dec 3rd, 2020
1,058
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.25 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # Clean up previous dump files
  4. rm -r dump/*
  5.  
  6. # Dump the current database state into 'dump' folder
  7. mongodump --db=$1
  8.  
  9. # Move the files from dump/projectName to dump
  10. mv dump/$1/* dump
  11.  
  12. # Delete dump/projectName folder
  13. rm -r dump/$1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement