Here are some scripts that I’ve made. Provided here in case anyone finds them useful.
backupDB dbname [backuplocation] [-P port] [-a dbadmin] [-d dbhost] [-m userhost] [-h help]
This script backs up a given database to a given location in a timestamped file of the following format:
date +%m%d%y.sql.gz. The default location is
The script requires the
date command and
ssh if the database is not local.
addDB dbname [port] [dbuser] [userhost] [dbadmin] [dbhost]
This script creates a new user and database, gives the user rights to the database and outputs a generated password. It takes a name as input which is used for the name of the created database and user. Note that the password generated may not be strong as it uses
websiteGen sitedir [host:port] [dir] [-h help]
DescriptionThis script generates a static site in a given directory from a host. This can be useful for running a dynamic site locally and generating a static site for publishing.
see: “Analysis of the Linux Random Number Generator” GuttermanPinkasReinman2006.pdf↩