This is a Discord Bot I created to handle daily backups of my MongoDB for my Nightscout site located at https://dexcom.stelth2000inc.com. Every night at 11:59pm, the bot pulls a backup of from mLab, compresses it using 7zip, and then uploads it to my Amazon S3. I have my Amazon S3 set to only keep a week's worth of backups at any given time.
If you like to use this bot yourself:
.env.exmaple
to .env
BOT_TOKEN
: Your Discord bot tokenBOT_OWNER_ID
: Your Discord owner IdMONGO_HOST
: Your mblab host addressMONGO_USERNAME
: Your mlab database usernameMONGO_PASSWORD
: Your mlab database passwordMONGO_PORT
: The port your mongo instance is running onMONGO_DB
: Your mongo database nameMONGO_API_KEY
: Your mlab API keyAWS_REGION
: Amazon S3 region nameAWS_S3_BUCKET
: Amazon S3 bucket to upload toAWS_ACCESS_KEY_ID
: Amazon S3 Access KeyAWS_SECRET_ACCESS_KEY
: Amazon S3 Secret Access Key