You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2-64Lines changed: 2 additions & 64 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -116,72 +116,10 @@ helm install ssp .
116
116
Where `ssp` can be the name you want to give to this chart.
117
117
118
118
## Backup and Restore data using MGOB
119
+
You can implement backup and restore feature on the Sugarizer School Portal MongoDB replicaset by using MGOB.
119
120
[MGOB](https://github.com/stefanprodan/mgob/) is a MongoDB backup automation tool built with Go. It features like scheduled backups, local backups retention, upload to S3 Object Storage (Minio, AWS, Google Cloud, Azure) and upload to gcloud storage.
120
121
121
-
To setup MGOB to automate MongoDB backups on Google Kubernetes Engine, follow these step by step instructions:
122
-
123
-
Requirements:
124
-
- GKE cluster minimum version v1.8
125
-
- kubctl admin config
126
-
127
-
### Store Service Account key as a secret
128
-
First, you need to create a GCP service account key from the API & Services page. In case you already have one, then download the JSON file and rename it to `key.json`.
- Add a reference to the secret. You can either insert your secret values as part of helm values or refer externally created secrets. In our case, we created a secret with a name `service-acc-secret`.
157
-
```bash
158
-
secret:
159
-
- name: service-acc-secret
160
-
```
161
-
An example YAML configuration is available as [mgob-gke.yaml](examples/mgob-gke.yaml).
162
-
163
-
### Backup to GCP Storage Bucket (Optional)
164
-
For long term backup storage, you could use a GCP Bucket since is a cheaper option than keeping all backups on disk.
165
-
You need to enable `storage.objects` acccess to the service account in order to allow objects creation in the bucket.
166
-
From the GCP web UI, navigate to Storage and create a regional bucket named `ssp-backup` (Or any other name if it's taken). Set the bucket and secret name in the backup-plan in the `values.yaml` file.
167
-
```bash
168
-
gcloud:
169
-
bucket: "ssp-backup"
170
-
keyFilePath: /secret/service-acc-secret/key.json
171
-
```
172
-
173
-
### Restoring data from backup
174
-
In order to restore data to the Sugarizer School Portal database, you need to open a shell in MGOB pod. The backups are available in `/storage/sugarizer-database/` directory inside the pod (where `sugarizer-database` was the name of our backup plan).
175
-
176
-
- In case of a database error in which you need to completely restore all the databases, you can run:
Where db_name is the name of the database to restore.
122
+
To setup MGOB to automate MongoDB backups on Google Kubernetes Engine, you can follow this [documentation](https://github.com/nikhilm98/sugarizer-school-portal#backup-and-restore-data-using-mgob).
185
123
186
124
## Contributing
187
125
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
0 commit comments