Skip to content

Instantly share code, notes, and snippets.

View denielaa's full-sized avatar
🏠
Working from home

Deniel Ariesta denielaa

🏠
Working from home
View GitHub Profile
@alanning
alanning / dump.sh
Last active July 24, 2022 23:42
Backup script that dumps a mongo database and compresses the result. Can be run on-demand or via nightly cron job.
#!/bin/bash
# Performs a dump of target database and compresses result.
# Outputs to: $DUMPDIR/$DUMPNAME.tar.xz
# Note: Absolute paths are required for use in cron jobs
DBNAME=meteor
ROOTDIR=/Users/alanning/foo
DUMPDIR=$ROOTDIR/dumps