Category: Software

Slow Mysqldump Restores

Disabling AUTOCOMMIT, UNIQUE_CHECKS, and FOREIGN_KEY_CHECKS speeds up mysql restores dramatically.  My own tests of a 30MB dump were cut from 6 minutes to 11 seconds.  My 2GB backups can now be imported in a reasonable 40 minutes. The following script will add one line to the top and bottom of your mysqldump file.  This can take a while for large files.  There’s no shortcut…

Simple Duplicity S3 Script

Duplicity is a command line tool that performs encrypted incremental backups.  It supports a variety of file locations, including Amazon S3, and comes pre-installed on several Linux distributions.  Ubuntu’s backup application, Deja Dup, is a frontend for Duplicity that adds some convenient right-click functionality to the file explorer.  This works well on the home directory to quickly restore previous versions…

Reclaim Mongodb Diskspace

Mongodb chews through disk space.  Even our lightly used servers need to be cleared out every couple of months.  The new usePowerOf2Sizes flag has helped but it hasn’t eliminated our need to perform a full –repair every once in a while.  Unfortunately, the process requires downtime and even more free space than Mongo has consumed, but after mounting a temporary…

Jenkins Automation

Continuous integration and automated testing are essential to our internal operations, but two seemingly simple Jenkin’s features have evolved to be more important than we imagined – shell scripts and scheduled jobs.  They were glossed over from the beginning, we were in this for the CI after all.  Run bash scripts?  Yeah, why not.  Replace cron jobs?  OK, but cron’s…

My Vim and Tmux Workflow

My greatest hurdle when learning to work with Vim was establishing a flow.  Most editors, even most applications in general, use a tabbed interface that’s become so universal almost all apps implement the same keyboard shortcuts.  Naturally then, I jumped into Vim without realizing how much this preconception would work against me. Past experience told me to run one instance…