Mongodb backup using python

1
2
import os
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Mongodb backup from the dumped files(json or bson).

do the follows : take the backup data from the mongodb and locate the folder in the program , put the name of the database with out "<<>>"

sample :
folder = "/home/backup/mongo/"
command = "mongorestore --db sampledb" + " " + folder + "/" + bsonfiles

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.