I have a M10 cluster and want to export snapshots to a gs bucket (i already have configured service account) . I need this since i cannot download snapshot (despite i can list them via atlas backups snapshots)
So to make it short:
- My infra is on GCP . My need is to be able to retrieve a snapshot to perform some offline processing on a separate self hosted instance.
HI @Sebastien_Bracquemont , if I understand correctly you’re wanting to export a Snapshot to GCP?
This isn’t currently available as part of atlas backups snapshots in Atlas CLI today, but you can achieve the same thing using the api subcommand instead. The api subcommand maps 1:1 with the Atlas Admin API, so it’s great for automation of tasks like these. You can read about the release of the Atlas CLI api feature here, and how to use the api subcommand in general here: Run Commands with the Admin API.
If you haven’t done so already, you’ll need to create the Snapshot Export bucket using atlas api cloudBackups createExportBucket (docs). Note the link to documentation for the createExportBucket endpoint, which has examples to help you format the JSON file / request for GCP.
Then create the Snapshot Export job using atlas api cloudBackups createBackupExportJob (docs). Note the link to the documentation forthe createBackupExportJob endpoint, which has examples to help you format the JSON file with the request body.
One last thing, as the release blog post states, the atlas api subcommand is available in the Atlas CLI v 1.44.0 and above, and is currently in “Public Preview” - this means that if you do automate this task, just to be aware that the names of the subcommands (createExportBucket and createBackupExportJob) might change when the feature goes to GA.
Let me know how you get on.