Drush 4 makes it really REALLY easy to backup all your sites, no more bash scripting etc.
Install RPM Forge repo:
cd /etc/yum.repos.d sudo wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm sudo rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt sudo rpm -K rpmforge-release-0.5.2-2.el5.rf.*.rpm sudo rpm -i rpmforge-release-0.5.2-2.el5.rf.*.rpm sudo rm -f rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm
If you are using Drupal and have allowed anonymous user to leave comments on the site, you will notice that the core comments module adds two cookies named comment_info_name and comment_info_mail. These cookies allow the comments form to be auto populated with name and email on any subsequent comments from the same user.
For majority of users this is not something of a concern. Whist this is useful, if any cookies are passed back from client side in the request, Varnish will simply request the page from the back end instead of requesting the page from the cache. This will result in many cache MISSes as the cookie is set for 365 days (!!!!)
Drush + Bash + Cron: Datbase Backup Goals
- Scan sites directory for a given drupal install
- Find all multisite folders/symlinks
- For each multisite:
- Use Drush to clear cache - we dont want cache table bloating up the MySQL dump file
- Use Drush to delete watchdog logs - we dont want watchdog table bloating up the MySQL dump file
- Use Drush to backup the database to pre-assigned folder
- Use tar to compress and timestamp the Drush generated sql file
Need to disable the CK Editor programmatically for specific form fields?
New form method
It seems Yahoo! Mail no longer requires the custom command (GUID 1), now you can access your Yahoo! Mail via IMAP using the settings below:
Yahoo! Mail IMAP Settings
Configure Yahoo imap with the following servers:
imap.mail.yahoo.com port 993 (SSL/TLS) smtp.mail.yahoo.com port 465 (SSL/TLS)
android.imap.mail.yahoo.com port 993 (SSL/TLS) android.smtp.mail.yahoo.com port 465 (SSL/TLS)
Yahoo! Mail IMAP "Hacks" - Background info
Following on from previous post about VCL tweaks to improve hitrate; there are occasions when a website should not be served from both www.foobar.com and http://foobar.com. In some instances Google will deem the content to be duplicate copy of each other and a website can suffer from dupe content penalty.
Show the most often-made requests to the backend
varnishtop -b -i TxURL
Show a histogram for the past 1000 requests
Displays all Varnish traffic for a specific client
The default Varnish config for Pressflow by Four Kitchens is an excellent starting point and gets you up and running with relatively little pain and effort. Having done a fair amount of Varnish tweaking for my personal and work websites, I came across a couple of varnish tweaks that resulted in a phenominal improvement in Varnish Hit rate.
Vary User Agent
Install EPEL Repo
Memcache can be found in the EPEL repo. Install EPEL repo:
rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
yum install memcached pecl install memcache yum install zlib-devel
Auto start memcache on reboot
chkconfig --level 2345 memcached on
Add PHP settings for Memcache