Skip to content

Instantly share code, notes, and snippets.

@mani95lisa
Last active August 29, 2015 14:02
Show Gist options
  • Save mani95lisa/9e627e67bf39fe366de5 to your computer and use it in GitHub Desktop.
Save mani95lisa/9e627e67bf39fe366de5 to your computer and use it in GitHub Desktop.
###################################################
# mongosback configuration file
##################################################
###################################################
# general settings
###################################################
PID_FILE="/var/run/mongosback.pid"
LOG_FILE="/var/log/mongo-backup.log"
# Location to store backup (and archives if enabled)
BACKUP_PATH="/var/local/backup"
# Also log to syslog? (useful for encountered errors)
SYSLOG="1"
# Enabling this will disable compression, archiving and exporting.
# Useful if simple dumps are needed with error handling and throttling.
SIMPLE_BACKUP="0"
# NOTE: LVM & RAW backups not fully complete, do not enable.
# LVM snapshots, create snapshots of mongo data.
LVM_SNAPSHOTS="0"
# Source logical volume (destination is backup_path)
SOURCE_LV="/dev/mapper/vg_me-lv_main"
# RAW data backup method (copy on disk data to archive).
RAW_BACKUP="0"
# Mongodata location (path to mongo data files)
MONGO_DATA_LOCATION="/var/lib/mongodb"
###################################################
# mongo settings
###################################################
# Path to mongodump, if left blank, script will attempt to locate
MONGO_DUMP="/usr/bin/mongodump"
# Mongo host and port
MONGO_HOST_PORT="127.0.0.1:27017"
# connectivity cedentials
MONGO_USER=""
MONGO_PASS=""
# Add any additional mongodump options here
MONGO_DUMP_OPTIONS=""
# Which database to backup (leave blank to backup all databases)
# If using the "--oplog" mongodump option, leave this blank.
DO_BACKUP="research"
###################################################
# arhchiving settings
###################################################
ARCHIVE="1"
DAYS_TO_KEEP="30"
###################################################
# performance settings
###################################################
# IO/CPU Process Priority (accepts: idle, low, normal, high)
PERFORMANCE_THROTTLING="normal"
# Enable gzip compression
COMPRESS="1"
# Compression level (accepts: fast, normal, best)
COMPRESSION_LEVEL="fast"
###################################################
# email settings
###################################################
# Send success or failure e-mails with details.
EMAIL_REPORT="0"
# Email details
EMAIL_ADDRESS="[email protected]"
# Subject is generated (mongohost - success/failure - backup size - backup time)
###################################################
# export options (move to rremote server)
###################################################
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment