Restore full backup of Redmine from Google Storage May 28, 2012

Restore database from dump file

# required settings 
DB_USERNAME='<redmine db username>'
DB_PASSWORD='<redmine db password>'
DB_NAME='<redmine db name>'
REDMINE_ROOT='<full path to redmine root>' # e.g. /home/peter/rails/'
BACKUP_ROOT='<full path to backup root>' # e.g. /home/peter/backups (will be created)
RESTORE_FROM='<date in YYYYmmDD format>' # e.g. '20110201' for February 1, 2011

$ mysql -u $DB_USERNAME --password=$DB_PASSWORD $DB_NAME < $BACKUP_ROOT/redmine/db/$RESTORE_FROM