Skip to content

Instantly share code, notes, and snippets.

@iit2011081
iit2011081 / mongo_backup_to_s3.py
Last active February 24, 2021 04:54
Mongodb automatic backup script to s3
import os
import sys
import subprocess
import boto3
from optparse import OptionParser
from datetime import datetime
DESTINATION_FOLDER = '/tmp/'
#Change below variables
S3_BUCKET = 'your_s3_bucket_name'