The Blog

Uncategorized

Backup and Restore compressed MySQL databases using gz or bz2

Posted on

Backup

mysqldump --routines -u root -p --databases db1 db2 db3 | gzip > /var/www/backups/mysql/databases.sql.gz # multiple db using gzip
mysqldump --routines -u root -p --databases db1 db2 db3 | bzip2 > /var/www/backups/mysql/databases.sql.bz2 # multiple db using bz2

mysqldump --routines -u root -p db1 | gzip > /var/www/backups/mysql/db1.sql.bz2 # single db using gzip
mysqldump --routines -u root -p db1 | bzip2 > /var/www/backups/mysql/db1.sql.bz2 # single db using bz2

Restore

bunzip2 < db1.sql.bz2 | mysql -u root -p db1
zcat db1.sql.gz | mysql -u root -p db1

Same goes for multiple DBs just add one or more DB to restore at the end of the command, or leave blank to restore all.

Posted in Uncategorized Leave a comment

Multi-Domain SSL Setup with “Subject Alternative Names”

Posted on

SSL Setup for multiple domains/subdomains is different than single-domain or wildcard domain setup. There are 2-ways to setup this (as far as I know) – using Subject Alternative Names and Server Name Indication (SNI)

In this article, we will use “Subject Alternative Names” method.

Use Cases

This tutorial is intended for following types of use case. If you are trying to setup something else, please ignore this.

non-www and www version of your site

  1. example.com
  2. www.example.com

Read More

Posted in Uncategorized Leave a comment
« Previous PageNext Page »