How to Backup a HTML copy of your ENTIRE Tumblr Blog

So, you want to backup your entire Tumblr blog into a neat, browsable local HTML archive huh?

Before I show you how, a quick note:

I tried the official Mac OS X tumblr backup tool without much luck. It refused to accept my login credentials and kept giving me an error message (Sorry. Please Try Again). This backup tool was originally posted on the Tumblr Staff Blog (At the time of this writing, you cannot download the file. The link is broken. Dear tumblr, what the fuck?) You can find a copy over at Softpedia though.

2/3/2014 Update per Frostbox staff comment below: Frostbox also offers tumblr blog backups with the ability to download archives. It’s still not a free solution however.

I am going to assume that none of the above solutions worked for you. Let’s get started.

You will need:

1.) A unix working environment (note: you CAN run this under windows, but I won’t cover that today)

2.) Basic shell/bash/linux knowledge

3.) A tumblr blog

4.) Two python scripts: tumblr_backup.py & xmltramp.py

(Credit goes to Brenden and Beat for these two wonderful scripts. I am hosting the scripts above for redundancy and/or in case other links are broken. You should always get them from the original source (tumblr_backup.py & xmltramp.py) for the most up to date copies.)

Steps:

First, after saving those two scripts into your working directory, let’s make them executable by issuing:

chmod +x *.py

Then, we will make a full, HTML backup of your Tumblr blog by issuing:

(note: replace YOURBLOGNAME. For example, if your Tumblr blog is: cute-cats.tumblr.com, simply enter the first segment of your blog URL: cute-cats as the last argument)

python tumblr_backup.py -x YOURBLOGNAME

That’s it. This will create a folder called YOURBLOGNAME which will include a HTML archive of your entire blog. Once the process is done, you can simply open up the index.html file and browse it offline.

Troubleshooting & Notes:

You can also do incremental backups of your blog. Meaning, you won’t have to re-download the entire blog each time you make a backup. For incremental backups, simply use:

python tumblr_backup.py -x -i YOURBLOGNAME

To get a comprehensive list of all the possible options, simply issue:

$python tumblr_backup.py --help

Usage: tumblr_backup.py [options] blog-name ...

Makes a local backup of Tumblr blogs.

Options:
  -h, --help            show this help message and exit
  -q, --quiet           suppress progress messages
  -i, --incremental     incremental backup mode
  -x, --xml             save the original XML source
  -b, --blosxom         save the posts in blosxom format
  -r, --reverse-month   reverse the post order in the monthly archives
  -R, --reverse-index   reverse the index file order
  -a HOUR, --auto=HOUR  do a full backup at HOUR hours, otherwise do an
                        incremental backup (useful for cron jobs)
  -n COUNT, --count=COUNT
                        save only COUNT posts
  -s SKIP, --skip=SKIP  skip the first SKIP posts
  -p PERIOD, --period=PERIOD
                        limit the backup to PERIOD ('y', 'm', 'd' or
                        YYYY[MM[DD]])
  -P PASSWORD, --private=PASSWORD
                        password for a private tumblr

These scripts give us a lot of flexibility and can be easily integrated into your existing backup solution(s)/cron job(s). One last note — I have tested this solution on my tumblr blog successfully, but it’s important to mention that my blog contains mostly text. This script is designed to backup any Tumblr blog containing any media except video

Enjoy.

Tags: , , , ,

  1. Frostbox’s daily automated backup now offers the ability to download your Tumblr and it backs up all sub-blogs under the main email address too – http://www.frostbox.com

    Reply

    1. Thanks for the update shane.

      Reply

    2. I just used this method with a Windows Vista x64 machine, and it worked great. I used a slightly different method that makes use of a batch file. It creates a mini-GUI window and walks the user through the backup process. I had to modify the batch file, though, because I didn’t install Python in the default location. This method didn’t back up videos for me, as mentioned in the post above. Any custom pages have to be saved separately. Your custom theme is not captured. However, this is great way to make an easily browse-able html backup of all the posts in your Tumblr blog. You can enter a password to backup a private blog, or configure it to only backup a portion of your blog, or only certain tags, etc. I like it. Lots. Thank you!!!!

      The information I used to configure this method to work with Windows is at:
      http://syringe.co.vu/post/77893912353/how-to-backup-your-tumblr-with-windows-and

      Reply

      1. Would you mind uploading that elsewhere? All I get is a screen asking for a password.

        Reply

        1. Dan-

          I am afraid the user running that tumblr blog decided to password protect his blog/page. I tried to find you a cached copy of the page without success.

          D

          Reply

        2. This is great, thank you! Is there a way to get it to save the number of notes with each post?

          Reply

          1. You are welcome. Unfortunately, this script does not save the number of notes as far as I know. I am sure it’s a simple modification though.

            Reply

          2. 73 to you, Brenden and Beat! This worked great.

            Reply

          3. Hello there;
            just to let you know, the tumblr_backup.py script no longer relies on ‘xmltramp’ since api-v2 has been implemented.
            https://github.com/bbolli/tumblr-utils/commit/99d5dbf2d2b12f0fdb71fc9511ecd847e17d412b
            The latest version is still available at the link you mentioned (thanks!)

            The api-v1 branch has password-protected entries support, but is no longer maintained.

            Reply

Leave a comment..