I was recently asked by @beanstalkapp to write a blog / tutorial on my Node JS Hook Server, but I'd like to start by mentioning how awsome of a service beanstalk is for version control. Not only do they host SVN and GIT but their deployments rock, and saved us alot of time having to write our own deployment tool. We use it by creating 2 deployments per project, one to the Development environment and one to the Production environment. The Development environment is almost always set to automatically deploy every commit, saves us the trouble of checking into version control and then FTPing. *AWSOME* not only does that simplify our development cycle it gets us to check-in all of our code on a much more consistant basis than we probably would if we FTP'd everything. We use GIT, we started with SVN but moved to GIT when we...
Backup a SQL Database and email it.

So recently we needed rapid backups of one of our MySQL servers. As everyone know server admin tasks are not my favorite thing to do, but it is obviously a need in our development environment so I got to thinking what was a quick reliable way to accomplish this task. The backup is easy:
Write a small script to dump the db:
#!/bin/sh timestamp=$(date '+%d-%m-%Y@%H:%M') mysqldump -u dbuser -pPassword --all-databases | gzip > /tmp/path/for/backup/database_$timestamp.sql.gz
This is a bash script that stores the current timestamp to a variable then goes about dumping the databases to text and piping that to gzip which outputs a gzipped version of the DB. Compression is good since we're going to email it to a Gmail account for storage and we wanna maximize our 7 GB of backup space.
$timestamp in our filepath is replaced by the timestamp we generate above.
Next we actually need to mail this file to our backups account, after a short research session i came across mutt. Which seems to fufill the requirement of sending a email with an attached file easily from the command line:
mutt -s "Hourly backup from c4.kohsrv.net |...