Homeflow are hiring (Ruby will power the spacecraft of the future)
We need people. Come, join us.
http://www.homeflow.co.uk/jobsWe need people. Come, join us.
http://www.homeflow.co.uk/jobsGot multiple CPU cores? Optimise your photos quickly using jpegoptim (sudo apt-get install jpegoptim):
find ./ -iname "*.jpg" -print|xargs -P4 -n100 jpegoptim -p -m85 --strip-all The -P and -n options case xargs will spawn 4 jpegoptim processes, each with 100 arguments. The -m option to jpegoptim reduces the quality. Leave it out if you just want to strip metadata. The -p preserves modification times.There are other ways you could use Monit to keep an eye on your MySQL replication processes, but this one is simple and involves no external dependencies:
check file mysql-slave with path /var/lib/mysql/master.info
if timestamp > 5 minutes then alert
If the slave process stops, then the master.info file doesn't get updated with changing binlog positions and Monit will send an alert. Obviously this depends on MySQL's implementation, and isn't as decoupled as a 'SHOW SLAVE STATUS' solution, but it's a lot simpler.
MySQL seems to update the binlog every few minutes if the slave is running. If you need quicker alerts, this method isn't for you!
Use this to dump all tables for a database that is all (or mostly)
INNODB tables. The CHANGE MASTER statement will be included, so you
just need to START SLAVE.
Using --single-transaction puts everything in a single transaction
(duh). Check that any non-transactional tables (e.g. MyISAM) will be
static during the dump, as the --single-transaction option counteracts
the --lock-all-tables option implicit in --opt. Phew.
mysqldump --single-transaction --opt -Q -u root -p --routines>
--master-data