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?
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?
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
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
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 andmongodump/mongorestore
. There is a guide to migrate Swisscom MongoDB to other DB provider (like your own computer), see here for the exact commands.