Friday, October 28, 2005

Blogger Backup With WGET

You can use wget1 under *nix or Windows2 to back up your Blogger site. Here's how (using a Windows example):
  1. Install wget on your system (Linux and other *nix users in most cases will already have it installed on their systems. If not, you can download the source code and compile it or add it with your favorite package management system.)
  2. Create a folder on your system where you would like to store your Blogger site backup.
  3. Create a simple batch file in notepad with the following commands (each bulleted line(s) of text should be on one line in your editor) and save it in your local backup folder you added in step 2 as blog-mirror.bat

    • c:\progra~1\Gnuwin32\bin\wget -v -r -p --wait=1 -erobots=off --level=2 --convert-links --span-hosts --domains=yourblogname.blogspot.com,photos1.blogger.com http://yourblogname.blogspot.com/
    • pause

    Yes, you could add the Gnuwin32\bin to your PATH in Windows, but I'm lazy I guess (backing up my blog is generally the only thing I use wget for at any rate). In *nix just call wget -v -r -p... from your local backup directory without the proceeding path information...

  4. Double-click on blog-mirror.bat and let the backing up begin. Press any key when the process is completed. Easy!
I was having a little difficulty getting my images saved locally until I came across the -erobots=off option from the post I have linked. Once I added that, no problems...

1wget is a GNU free software command line utility "...for retrieving files using HTTP, HTTPS and FTP... internet protocols". It's a very useful tool, particularly for backing up websites, which is the focus of this post.

2You can get wget already compiled for Windows operating systems at GNU utilities for Win32

No comments: