How to backup your blog
Google accidentally deleted their blog. Things like this could happen to everyone, the only questions are: when, and how prepared are you when it happens? The following article gives you ideas on how to backup your various blogs, and what to do when a problem happens - even if you didn't have backup.
Technorati Tags: blog backup
A few general rules about backups
- Automated backups are far better than manual ones. If you have to remember every time to do a backup, there's a chance that you'll backup less frequently than you were planning to, or even forget it. Plus, having to remember these actions is a continuous distraction from your other tasks.
- Only trust your backup after you've tested it. You can only be sure that your backup process works if you did a test-, or even better a real restore once.
- Check the logs of your backup process often. You should be able to spot if something went wrong, and you're no longer have backups of some of your things.
- Have backups at physically different locations. If you're storing backups on the same server where your live blog is, a hard drive failure will render all your backups useless too.
- Whenever something bad happens, the most important rule is: Don't panic. Most of the data loss is happening during emergency recovery attempts. There's not much you can do now that cannot be done after ten minutes of calm thinking. Sit back, check what's missing, and plan your actions before doing anything.
Now let's get more specific.
Backup your Blogger blog
While blogspot doesn't provide an easy way to access your blog's raw data, you still have a few backup options:
- Get an email-copy of all your posts. Go to Settings / Email, and enter an email address to the "BlogSend Address" field. You should consider registering a separate GMail account - therefore posts will not mix up with your regular mails, and you don't have to worry about mailbox size limits neither.
- Subscribe to your own site feed. Be sure to configure your feed reader to keep old feed items too, and have a full content feed (Settings / Site Feed / Descriptions should be "Full")
- Use a site-mirrorring tool (like wget, HTTrack, etc.) and periodically create a local mirror of your site. The advantage of this is that you'll have a copy of your comments too - the disadvantage is that this is a manual solution.
- Save your template every time you change it. Just select all the text in the editor area, and copy-paste it into an empty text file that you keep somewhere safe.
Of course none of these enable you to do a one-click restore once something gets deleted, but a little work is still better than loosing everything for good.
Backup your MovableType blog
You can email all your posts to yourself, or subscribe to your own feed just like with Blogger, but you have better options depending on the level of access to the server hosting your blog.
- In case of full access, implement a server-side backup solution. Don't forget to create SQL dumps of the blog database too. A simple, easy-to-setup solution is the free backup2l package for Linux servers.
- In case you only have ftp access, just copying the files is not enough - typical MovableType configurations store almost all data in databases that are not available with an FTP account. Still, it's worth to have an updated copy since plugins and MT configuration files are stored here.
- Regardless of the access level, you can always export your site periodically. Go to the Import/Export menu, choose the "Export Entries" tab, and check the "Export Entries From {your blog's name}" link. This is a permanent link to all the data on your blog, in a large text file. Bookmark the link and refresh your local copy often. (Note: this will not backup your templates and settings, just the contents of your blog!)
-
Similar to the export site option, you can create a special index template that will contain all your posts and comments in a simple, human-readable format. Create a new index template (preferably dynamic, otherwise it can seriously slow down your blog) with something like this:
<MTEntries lastn="9999">
<h1><$MTEntryTitle$></h1>
<p><$MTEntryPermalink$></p>
<p><$MTEntryDate$> | <$MTEntryAuthorDisplayName$> | <$MTEntryCategory$></p>
<$MTEntryBody$>
<$MTEntryMore$>
<ul>
<MTComments>
<li><$MTCommentOrderNumber$> | <$MTCommentAuthorLink$> | <$MTCommentDate$><br />
<$MTCommentBody$></li>
</MTComments>
</ul>
</MTEntries>
Important: this solution will not provide you an option to easily restore the contents of your blog, it's rather for having a human-readable page with all the contents of your blog. - Finally, the best solution for a full backup of contents, templates, settings, etc. - basically everything, use the thirdparty plugin TypeMover. You will need an FTP account to your blog to install and use this plugin.
Backup your Wordpress blog
Most of the above applies here too, with a few changes:
- WordPress stores theme files too in the file system, so it's important to backup your files too, even if you're not using any extra plugins.
- WordPress doesn't provide a dedicated import / export function, but there is a lenghty article explaining the problem and giving various solutions available. I recommend the WordPress database backup plugin, which is included from version 2.0. (The plugin for the previous versions of WordPress can be downloaded from the author's site.)
Restore your Blogger blog
Since none of the options allow you to do an automated restore, unfortunately you have to copy-paste your articles into new posts in case something goes wrong.
Restore your MovableType blog
- TypeMover's documentation provides a guide to restore from a previous backup.
- In case you are using the standard MT export, upload your file to the default mt/import directory, and go to the Import/Export menu on your blog's admin interface. Don't forget that this will reload all the posts and comments in the file, regardless of if they were already there or not - this can often cause duplicates.
- Rebuild your full site after finishing.
Restore your WordPress blog
- Reupload the saved files to your WordPress directory
- Follow the documentation on how to restore from the SQL file produced with the WordPress backup plugin. (Note that you will need database access here, either through phpMyAdmin or command line.)
What can you do if you didn't have any backups?
- Your hosting company might keep automated backups of your site even if you don't know about it. It's worth to check with them.
- Google's cache can help you recover some pieces. Search for the URL of your site like this: "site:www.yoursite.com" and click on the "Cached" links on the result pages.It's a long and frustrating process to recover your blog like this, but it's better than nothing.
- In case your blog is fairly old, you can try the Internet Archive. Just search for your URL, and select one of the dates from the result list. You will be able to navigate most of your site as it was saved on the selected date.
- Finally: take this event as a good lesson, and when you finished reconstructing your blog, the first thing you should do is to create a backup system.
Digg this article if you liked it.
March 29, 2006
Submit to del.icio.us
| Digg
| Furl
| reddit
| Y! MyWeb | comments (5)
Comments
Thanks.
This information was really useful.
Posted by: jens | March 29, 2006 07:39 PM
Thanks jens, I'm glad if I could help.
Posted by: Péter Szász | March 29, 2006 07:43 PM
I agree that automated backups are far better than manual ones. With that in mind I've created a service that automatically backs up any MySql-based blog either daily or weekly. Its currently free during the beta test period:
http://backupmyblog.com
Posted by: Doug Martin | March 30, 2006 04:38 PM
Thanks for the article. Really nice tips for bloggers on most platforms. However, may I also mention that there is a simple way to backup posts on Blogger. Read more about it at http://rankwil.blogspot.com/2006/01/backup-your-posts.html
Posted by: Ranjit | April 18, 2006 04:29 PM
Thanks Ranjit for your addition!
Posted by: Péter Szász | April 18, 2006 06:18 PM