How to script the download of the latest Atlas snapshot

Hello DevOps experts,
I was under the impression that I can download an atlas snapshot via mongocli with something like:

monogcli altas backup shnapshot .....

Checking the docs I find a lot but no download option, is there somewhere a hidden gem or am I out of luck here?

Going forward and checking the Atlas API I also don’t find an option to download an / the latest snapshot at all. Can anyone please confirm that this is not possible?

The basic question solve is: I want to script the download of the latest Atlas snapshot. Did anyone solved that and can share the solution here?

Thanks a lot and best regards,
Michael

Hi @Michael,

The gem is that the download of a snapshot is when you issue a restore command with type download:

https://docs.mongodb.com/mongocli/master/reference/atlas/backup-restore-start/#arguments

So you basically restore to a download link you can than curl or wget to a file…

You can do the same with curl and rest api …

:slight_smile:

Thanks
Pavel

2 Likes

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.