This simple Linux BASH script creates a MongoDB database dump to a file, the script can be used later for some cronjobs.
GitHub https://github.com/garanet/MongoDB-bkp-script.git
#!/bin/bash
# www.garanet.net
# MySQL Full Backup Bash Script
# https://github.com/garanet/MongoDB-bkp-script.git
# Define variables
m_host="localhost"
m_user="root"
m_password="secret"
m_database="nameMongoDB"
m_dump="/backup/mongo-dump"
# Backup Database.
/usr/bin/mongodump -h ${m_host} -u ${m_user} -p ${m_password} -d ${m_database} -o ${m_dump};
# Compress dump.
tar cvfz /backup/${m_dump}.tar.gz ${m_dump}/;
# Delete old.
rm -rf ${m_dump};
A FastAPI, SQLAlchemy & Uvicorn to fetch a Google Sheet A FastAPI, SQLAlchemy & Uvicorn to fetch a Google Sheet… Read More
A webtool in Python Flask that creates an LDAP user and his TrueNAS shares pool in ISCSI or NFS. There… Read More
A Terraform configuration that provisions the following infrastructure: A VPC with: Public subnets for external resources. Private subnets for internal… Read More
This website uses cookies.
Read More