Create, restore, and download MongoDB backups automatically on Swisscom Application Cloud

242 Views Asked by At

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?

4

There are 4 best solutions below

0
On

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.

0
On

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

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

0
On

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

1
On

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