https://github.com/dsdatsme/automate_mongo
https://github.com/dsdatsme/automate_mongo
bash google-cloud-platform mongodb
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/dsdatsme/automate_mongo
- Owner: DSdatsme
- Created: 2018-09-06T13:20:05.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-09-10T07:59:00.000Z (over 6 years ago)
- Last Synced: 2025-02-12T12:55:21.394Z (4 months ago)
- Topics: bash, google-cloud-platform, mongodb
- Language: Shell
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# automate_mongo
this repo is to automate the backup for mongodb server on Compute Instance(GCP)
there are three important files in this repo
startup.sh, startup2.sh & q.shstartup.sh
this will create a GCP instance and tell that instance to download "q.sh" from the bucket and run it.
after that it will create a disk and mount it to a new instance.q.sh
this file will be present at a bucket and it will be downloaded by a startup script present in the newly created instance(here b-instamce).
the file installs mongo-db and downloads the data from a given bucket source to the newly created external disk.
After that it loads the data to mongo server.startup2.sh
this script detaches the external disk and and then creates a snapshot of the main boot disk of instance(here b-instance).
then it deletes (b-instance).
it then creates a bootable disk from snapshot and then a new instance(here new-instance) is created using newly created bootable disk.
and lastly it restarts the mongo server which is mentioned in the startup script.Requirements:
A local system to run scripts where you have already setup "gcloud auth login"
a bucket with data inside (here ernon.json)
access to create bucket and google compute