Backup script for RimuHosting


A handy little one - a backup script for RimuHosting that will backup your Rails app and copy it to the provided backup storage account. To use it you first have to add Geoffrey Grosenbach's backup.rake script to your lib/tasks directory, then sign up for RimuHosting's backup service, then just save out this script as e.g. "" and add it to your crontab. Easy when you know how.

export TIMESTAMP=`date +'%Y%m%d%H%M'`
rm -f
rake db:backup RAILS_ENV=production
zip -r -9 -q *
lftp -u 'myaccount,mypassword' -e "set ftp:ssl-protect-data true; put -o backup_$; exit"

How to reply

Care to add your own 2 cents? Let me know via Twitter or my contact page.