Backup and Rotate MySQL Databases Simple Bash Script
Make a directory ( it can anywhere ) called baks/mysql mkdir -p /baks/mysql Create a file (it can be anywhere) called /root/mysql_backups.sh and put this script in it #!/bin/bash # modify the following to suit your environment export DB...
Written by Sean Behan on 05/16/2017
Use a Cron Job to Automate Sphinx Index Refresh from Rails Rake Task
If using Sphinx, you need to refresh indexes when you add new content to your database. This is fairly easy to do by hand rake thinking_sphinx:index RAILS_ENV=production But if you want to automate this and use a cron, remember to set the PATH, SHELL an...
Written by Sean Behan on 06/17/2012
Set Cron Job to Run Every Five Minutes for a Ruby on Rails Rake Task
First off you'll need to edit your cron file. Normally, the cron files are kept under /etc/cron.daily or /etc/cron.hourly but we can just use the command line tool, crontab and pass it the -e flag, so that we can edit the file without any fuss. sudo cron...
Written by Sean Behan on 06/17/2012