Simply how to backup MongoDB information source by hand in DigitalOcean? Enable’s think about the alternative in this short article. With our DigitalOcean Managed Solutions, Bobcares assist you with your DigitalOcean concerns.
Simply how to backup MongoDB information source by hand in DigitalOcean?
In DigitalOcean, we backup MongoDB by hand using the abiding by actions:
1. S3cmd installation
2. S3cmd setup
3. MongoDB Data source back-up using S3cmd
1. We need to establish Python along with dependences at first:
apt-get established python3 python3-setuptools crinkle -y
2. After that download and set up the existing variation of S3cmd using the listed below command:
crinkle -LO https://github.com/s3tools/s3cmd/releases/download/v2.2.0/s3cmd-2.2.0.tar.gz
3. Presently extract the files:
tar -xvzf s3cmd-2.2.0. tar.gz
4. Download and set up the extracted directory website by accessing it using the listed below code:
cd s3cmd-2.2.0 . . python3 setup.py established
5. Presently the gadget is installed.
1. With the DigitalOcean Ease of access trick along with Secret trick, we can develop the S3cmd gadget using the listed below code:
2. Get In the DigitalOcean Ease Of Access Trick, Trick Trick, Location, along with Endpoint.
3. We can verify the container information using the abiding by command after the setup:
s3cmd information s3:// mongodb-dump/
MongoDB Data source back-up using S3cmd
1. Connect to the MongoDB covering by getting in the abiding by command after extremely first logging right into the web server:
2. After that find all the information sources easily offered:
3. Next off, make use of the command noted below to establish a back-up of the testdb information source located in the/ choose directory website:
mongodump-- db testdb-- out/ choose/
4. We can run the noted below code to backup all MongoDB information sources:
mongodump-- out/ choose
5. After that verify all back-up information sources using the abiding by command:
6. Perform the S3cmd code to duplicate the testdb information source directory website to the DigitalOcean Spaces:
tar -czvf -/ opt/testdb|s3cmd put - s3:// mongodb-dump/testdb. tar.gz
7. To duplicate the admin directory website for all information sources to the DigitalOcean Spaces, run the S3cmd command:
tar -czvf -/ opt/admin|s3cmd put - s3:// mongodb-dump/admin. tar.gz
8. Eventually verify all information source back-ups on the DigitalOcean Locations using the abiding by command:
s3cmd ls s3:// mongodb-dump
We can in addition check out to the DigitalOcean Spaces along with verify the back-up files.
[Looking for a solution to another query? We are just a click away.]
The brief post offers a 3 action strategy from our Help group to backup the MongoDB information source by hand in DigitalOcean locations.