public
Description: OneBody is free, open-source, web-based social networking and online directory software for churches.
Home | Edit | New

DatabaseBackups

This might not be the absolute best way to backup, but it is fairly fool-proof. (This assumes you DeployedWithCapistrano. If you didn’t, you’ll need to adjust the first command line below.)

cd /var/www/apps/onebody/shared/db
mysqldump -uroot -pyourpassword onebody > onebody.sql
tar czvf ~/onebody_backup_`date +%Y-%m-%d-%H%M`.tgz .

Restore

To do a restore of the SQL database, extract the tgz file, then:

mysql -uroot -pyourpassword onebody < onebody.sql

In the off chance that the photo files and attachments were lost, you also have a copy of them in your backup. Just copy them back to /var/www/apps/onebody/shared/db/.

Last edited by seven1m, Sun Mar 01 17:40:06 -0800 2009
Home | Edit | New
Versions: