Last active
February 13, 2022 00:35
-
-
Save Jeve-Stobs/70a126c47a2f961bf5b1c8d8d85e402f to your computer and use it in GitHub Desktop.
Backup with mongodump & discord webhook
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
url="https://discord.com/api/webhooks/#/#" | |
mongodump mongodb://USERNAME:PASSWORD@DB_URL:DB_PORT/DATABASE?authSource=admin&w=1 --db=DATABASE | |
zip -r backup.zip dump/ | |
curl \ | |
-H "Content-Type: multipart/form-data" \ | |
-F "[email protected];type=application/zip" \ | |
$url | |
# crontab -e | |
# 0 */2 * * * path/backup.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment