Quantcast
Channel: PV Cloud Systems » recipe
Browsing latest articles
Browse All 10 View Live

Automatically convert MySQL tables from MyISAM to InnoDB

Requirements Ubuntu or Debian (for the default debian-sys-maint user) MySQL 5.0 or more (information_schema table) Perl 5 (always in any Linux) libdbd-mysql-perl package (DBD::mysql on CPAN) It could...

View Article



Auto generate a MySQL server-id with puppet for replication

How it works We take the IP address, hash it, and generate a file. This is a sort of unusual technique, as I prefer to push a PHP script in and generate the file, rather than use a Ruby ERB. This...

View Article

Image may be NSFW.
Clik here to view.

Automated MySQL backup to Amazon S3 with built-in expiration

How it works The script builds a tarball with the InnoDB backup tool by Percona called “xtrabackup”. It uploads it to S3. Depending on various rules, it chooses in which S3 directory to put it. Since...

View Article

A puppet class to install Percona MySQL on Debian/Ubuntu

How it works: First add Percona Repository, then second, percona MySQL itself. I will include an “apt::percona” class in a “pkg::mysql-perlcona” class Requirements: Puppet a recent Debian or Ubuntu...

View Article

When a Debian / Ubuntu repository does not work – Example with Percona

Today a weird thing happened: I launched a new instance with the Percona MySQL class, and it didn’t install properly. It was giving me some weird error messages: err: /Stage[main]/Apt::Percona/Exec[apt...

View Article


Simple CRON wrapper to seamlessly execute scripts with stdout / stderr output

The best practice for CRON jobs is to set an admin email to receive the output, and only output something if there is an error. Now this is all good but it often needs some kind of adapting and you...

View Article

Always have a handy MySQL replication user/password on your server –...

How it works Connects with Debian/Ubuntu default credentials, in /etc/mysql/debian.cnf, updates the file and the replication, regardless of if they already exist of not. TODO: check if the user already...

View Article

How to force a directory to only contain puppet managed files

Sometimes, you want some directories to be completely managed by puppet, and depending on certain conditions, you will have one or another file. For example, if you deploy your apache config files with...

View Article


Resync a MySQL slave on Amazon EC2 from a backed up S3 archive

How it works From an archive produced in the previous article for automated MySQL backup ( click here to see it ), we can easily sync a slave. We download the file from S3, and automatically set it up....

View Article


how to restrict to only allowed IP addresses with Apache and htaccess

This is a really basic thing, but for some reason I always forget the exact syntax/order of the parameters of this configuration, and end up looking it up each time I need it. I figured why not put it...

View Article
Browsing latest articles
Browse All 10 View Live




Latest Images