1

We can create create backups from the Developer Portal for MongoDB, but I'm wondering if this is exposed in any other way through the CLI?

Also, how can I access the backup to inspect it on my machine for example?

Sybil
  • 2,503
  • 3
  • 25
  • 36
Florian Bienefelt
  • 1,448
  • 5
  • 15
  • 28
  • What UI do you mean? Compass? Atlas? Some 3rd party cloud solution? if it is hosted service, it should have an API, we can help you find it. – Messa Sep 25 '18 at 14:24

4 Answers4

0

There is a CLI tool for making backups: mongodump (in the mongodb-org-tools package)

See also https://docs.mongodb.com/manual/core/backups/

Messa
  • 24,321
  • 6
  • 68
  • 92
0

Yes there are two CLI keystrokes to backup and restore

Backup

   Mongodump backupPath

Restore

   Mongorestore -d databasename backupPath

Ex- mongodump C:/user/desktop/backup

mongorestore -d DB1 C:/user/desktop/backup/DB1

PrathapG
  • 751
  • 1
  • 7
  • 21
0

Turns out you can't do anything outside of the UI. As per their docs: https://docs.developer.swisscom.com/devguide-sc/services/backups.html

Florian Bienefelt
  • 1,448
  • 5
  • 15
  • 28
  • see my anwser. There is an API, but yes you can't download your data from portal. Please also search #swisscomdev there are many similar questions and even GitHub projects to the backups without portal (directly to own S3 instance). – Sybil Sep 26 '18 at 05:57
0

There is an API for Service Instance backups and restores (the interface you see in developer portal). See other question Are mongodb backups made automatically?. There is even a CLI plugin to automate Developer Portal backups. Try it with cf install-plugin -r CF-Community "Swisscom Application Cloud".

You can't download the backups to your local computer. For that you you need to use cf ssh tunnel and mongodump/mongorestore. There is a guide to migrate Swisscom MongoDB to other DB provider (like your own computer), see here for the exact commands.

Sybil
  • 2,503
  • 3
  • 25
  • 36