henno

refresh_mongodb.sh

Dec 3rd, 2020
644
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
RAW Paste Data