How to download mongodb backup from Digital Ocean to Local Computer


Posted 1 month ago by Ryan Dhungel

Category: MongoDB Digital Ocean

Viewed 185 times

Estimated read time: 1 minute

sudo mkdir /var/backups/mongobackups
sudo mongodump --db admin --out /var/backups/mongobackups/$(date +'%m-%d-%y')
cd /var/backups/mongobackups
# list files ls
# filename you see
01-04-24
# Run this command on your local machine
scp -r your_username@your_droplet_ip:/var/backups/mongobackups/01-04-24 /path/on/local/machine