vrypan — Panayotis Vryonis
My blog is a digital scrapbook of ideas, thoughts and personal events. My digital home is www.vrypan.net.
notes@vrypanThe Letterrss

#en #howto #twitter #archiving

How to archive your tweets

Why not take a backup of all your tweets every now and then?

If you are a Twitter user, your tweets are probably an important part of your online activity.

Why not take a backup every now and then? After all, things happen, and having a backup never hurt anyone. Plus, your Twitter archive is the best way to browse through your timeline, back to your very first tweet.

Here's how to do it.

First, go to your twitter settings page, and click "Request your archive".

request your archive

A few minutes later you will get an email from twitter.


Follow the link. You will land back to your settings page, but this time there will be a "Download" button —click it.


Your archive will be downloaded as a ZIP file.

That's it! You can unzip it and click index.html to browse the downloaded archive. If you are a long time Twitter user, you will also appreciate the fact that you can easily go back to your very first tweets, something that's not trivial to do on twitter.com.

If you have your own web server, you may want to upload the export there. You don't have to do anything special, just upload the whole archive folder. For example, I've uploaded mine to www.vrypan.net/twitter-archive/

One step further: improve the exported archive.

However, the archive offered by Twitter is far from ideal:

  • All media files (photos) are served dynamically from twitter. Which means that if they are deleted or taken down, they will not be available in your local archive either.
  • The same goes for user avatars: You will get "broken" avatar images even if a user changes his.
  • All links are "shortened", using twitter's URL shortener. Even worst, many users use their own shortener of preference. If a URL shortener changes their URL structure, or goes out of business, etc., you will not be able to follow these links from 2 years ago.

As far as I know, there are no easy fixes for these issues.

However, if you are comfortable with working in Linux or OS X command line, I've put together a small python script that will go through your Twitter export, download any media it can into the img/ folder and modify the export so that media files are loaded from the local copy. It's far from perfect, but it will usually work :-)

Download it and run in a terminal python ./download_twitter_media.py.

I've uploaded my personal twitter archive, after running the script against it, here: As you can see, all images (even avatar images), are served by my own server, not twitter.

This post was originally posted to BigStash blog, which no longer exists.
Hmmm.. It's been a year since I updated my twitter archive, I'd better do it soon.

Let me send you my newsletter.

The Letter is a newsletter I send out whenever I have something to say or share. It may take a few days, weeks or months for the next one. It's not your typical "newsletter" but you'll probably find it interesting and insightful at times.

Don't worry, I hate spam as much as you do.

Share this post:           HN