0 0 * * * for i in $(mysql -N -e 'show databases' -uroot -p'secret' ); do mysqldump -uroot -p'secret' $i | gzip -9c > /root/MYSQL_DB_BACKUP/$i\_$(date +\%Y-\%m-\%d_\%Hh\%M).sql.gz; done
This cronjob will create backups of all the databases on the server, compress and put them in /root/MYSQL_DB_BACKUP/name_of_database_datestamp.sql.gz
Tuesday, April 17, 2012
Thursday, April 12, 2012
How to install JavaScript runtime in Rails
*** Exception PhusionPassenger::UnknownError in PhusionPassenger::Rack::ApplicationSpawner (Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable))
Solution: Install Node.js
install on RHEL:
Its also possible to add gem 'therubyracer' to the projects Gemfile and bundle install it.
Solution: Install Node.js
install on RHEL:
wget http://nodejs.tchol.org/repocfg/el/nodejs-stable-release.noarch.rpm
yum localinstall --nogpgcheck nodejs-stable-release.noarch.rpm
yum install nodejs-compat-symlinks npm
Its also possible to add gem 'therubyracer' to the projects Gemfile and bundle install it.
Subscribe to:
Posts (Atom)