- 40
- Sphinn It!
Posted By: Digitalmusings 596 days ago
Topic Type: News Story (Jump to http://digital-musings.com)
Category: Blogging
This posts lists the various tools and resources that one can use to backup the blog.
5 Comments
5 Comments
Save the date for:
SMX Singapore - July 2-3, 2009
SMX São Paulo - August 4-5
SMX East - October 5-7, 2009
SMX Stockholm - 12-13 October, 2009
SMX Mexico - November 11, 2009
Learn more about search marketing through free online webcasts and webinars from our sister site Search Marketing Now.
Comments
Didnt know that databases and site needs to be backed up separately. Thanks for clearing that point! :)
I use a common LAMP server and back up all of my databases by simply creating a folder for each backup and then calling a CRON job each day.
So, I have folders like this ABOVE my public_html directory:
/databasenamebackup/monday/
/databasenamebackup/tuesday/
/databasenamebackup/wednesday/
/databasenamebackup/thursday/
/databasenamebackup/friday/
/databasenamebackup/saturday/
/databasenamebackup/sunday/
and a CRON job to backup the database each day into the relevant folder, using the following format in the CRON job:
find /home/SITEHOMENAMEGOESHERE/databasenamebackup/monday/monday_wiki.sql -atime +2 -exec rm -f {} ';'
mysqldump -uUSERNAMEGOESHERE -pPASSWORDGOESHERE DATABASENAMEGOESHERE > /home/SITEHOMENAMEGOESHERE/databasenamebackup/monday/monday_wiki.sql
(The above CRON jobs altered to suit each day of the week.)
This gives me a daily backup that I can easily restore from on any day.
I don't bother to backup all of WordPress (or whatever other blog or CMS I am using), but simply pull the altered folders (like template folders) over to my hard drive with Filezilla. If I also want to pull the database backups over to my PC, all I have to do is pull over the whole /databasenamebackup/ folder.
Quick and easy (once you get the CRON jobs set up.)
Jerry
What I'd love to see is a script that will backup a copy and email it to you, without leaving backup copies on the server.
Anyone seen something like this in the wild?
iBrian,
I haven't tried to email database backups to myself, because I don't want such sensitive information sent via email, but the system should be able to email you the results of the backup with a command like
MAILTO=user@domain.com
at the end of the CRON job. I would suggest googling "CRON job email" or similar.
Also, I would recommend encrypting the email, to protect any sensitive details in the database from interception while in transit from your server to your PC. I did a search for "encrypting CRON job email" and found a few promising examples.
CRON jobs are fantastic for automating a lot of things like this and I personally wouldn't buy software to do something like this, when the capability is already on my server.
Cheers,
Jerry
Thanks for the comment, Jerry - will keep an eye out. :)