Backup Twitter Tweets with TwitterBackup

Posted 2008-10-16 in Java by Johann.

Are you worried about losing your Twitter tweets? I too looked for a tool to back up my Twitter updates but couldn’t find one. So – I wrote one. And you can have it for free!

TwitterBackup

TwitterBackup is a tool that downloads all your tweets and stores them in XML format. The document type is identical to Twitter’s API.

Download

Download TwitterBackup 3.2.9 (779 KB) (last updated 2016-11-06)

Source code also available (6.4 MB).

After downloading, double-click the twitterbackup-3.2.9.jar file. If this doesn’t work, open a command prompt and type java -jar twitterbackup-3.2.9.jar.

Running TwitterBackup

TwitterBackup tool

This is TwitterBackup. Fill out the fields and press “Start.”

Username

Enter your Twitter user name here. Not your email address.

Password

Well, your password.

File Name

This is the name of the file where your tweets will be stored after they have been downloaded.

If the file exists, TwitterBackup will read it and add only newer tweets to it. This is an incremental backup and faster than a full backup.

Proxy

If you are connected to the internet through a proxy, enter the proxy address and the port (optional) here. Examples: blaproxy, blaproxy:9080.

Start

To download all Tweets, click this button. This will start the Twitter back up process.

Notes

  • TwitterBackup might not work if you have blank characters in your password.
  • License is MIT License (OSI certified).
  • There is a delay time of several seconds between requests (as demanded by the Twitter API).
  • Depending on the number of your updates, the backup process can take several minutes.
  • Your settings are stored on your computer, not on my server or anywhere on the net.

20 comments

#1 2009-01-16 by NecatPace

how i can import my twitts into my wordpress?

#2 2009-01-16 by Johann

NecatPace,

you mean after you've downloaded them with TwitterBackup?

#3 2009-01-16 by NecatPace

yeap, i have all twitts with your program, and now i want import to my wordpress

#4 2009-02-20 by Johann

NecatPace,

sorry for the late answer... Try looking at XSLT. This can transform all tweets to RSS 2.0.

#5 2009-02-20 by Edoardo

@NecatPace, maybe you are looking for something like Twitter Tools that automatically updates wp with your tweets: http://alexking.org/projects/wordpress

#6 2009-03-08 by cf

Anything for capturing all the tweets with a particular hash tag?

#7 2009-03-08 by Johann

cf,

sorry, no. TwitterBackup will download all your tweets. If you want to extract some of them, look at XSLT.

#8 2009-04-04 by Gray

by the time i found Twitter Tools by Alex King, i already had thousands of tweets. tried importing via RSS and other tools but only got back the last 500.

now i found this tool, which is awesome. hopefully i can convert this into something WP can take. THEN turn on Twitter Tools =)

(why even do this?)

because i want non-twitter-users to be able to comment on what i tweet about, and not have the 140 character limit for really long replies. i'm also a backup freak =P

#9 2009-04-04 by Mindez

Heya, love the app, I've been looking for something like this for a while now. Couple of criticisms though:

- If you tweet while the backup is running, the next call to the API will only get 19 new tweets (which makes sense) and hence detect that it's finished backing up (I assume it's coded to keep going until there are less than 20 new tweets), which means redownloading the program in order to get anything beyond the page it got up to.

- Suggest a feature to maybe get and backup in the same way all @replies, possibly? Not sure what's possible, but this would be a nice feature.

#10 2009-04-04 by Storm Cunningham

Thanks for this. I've been trying to find out how long Twitter keeps tweets in the system, but can't. Do you know?
The two problems I have with your backup program are these:
1) There's no prompt for a path. Are we supposed to put the path in the field for the file name? I had to search my hard disk, and found the file under "Administrator". If we don't have any control over where it goes, you should tell us where it's going.
2) What kind of file is it writing, and what program are we supposed to use to view it?

#11 2009-04-04 by Mindez

Storm: Twitter keeps the last 3200 tweets, from what I see. You can only go back 160 pages in a person's history anyway. There doesn't seem to be a time limit on tweets, just a numerical limit.

The text field that asks for the filename, you can either put a full path in there or just a single filename. If you put a full path in there, it goes in that directory, else it'll write it to the directory that the program is in.

It writes an xml file, which you can view the contents of with Wordpad etc. I'm not entirely certain how to view it naturally, I assume some kind of XML decoder will be needed.

#12 2009-04-10 by Johann

Gray,

look at XSLT to convert your tweets to RSS.

Mindez,

good suggestion. I'm sure you could pull a whole lot of data out of Twitter, more than what it's doing right now.

Oh and thanks for filling in for me while I was out to get an ice cream.

Storm,

  1. if you don't enter a path, the directory is where the program is run from
  2. the format is identical to the Twitter API

#13 2009-04-10 by Storm Cunningham

Thanks for the feedback. It might be good to prompt people to entire the path, rather than just the filename: not all of us are programmers who would take that for granted. So, I opened the file with Firefox, and saw all the HTML with the text. Is there a better way to view the backup files? (sorry for my coding ignorance)

#14 2009-07-01 by Anthony Peacock

This is a really useful little app.

I would like to suggest a slight improvement. Could you mask the password characters?

The app runs for a reasonable amount of time, which I have no problem with, but all that time it is displaying the password in clear text. This is fine at home, but at work or in an internet cafe this is a bit of a problem.

#15 2009-07-01 by Johann

Anthony,

unfortunately, I can't. I use the Thinlet UI toolkit for the user interface and that thing is so simple, it doesn't support password fields.

I think you'll have to minimize the application. Or simply don't use it on untrusted computers, which is what I'd recommend.

#16 2009-08-16 by Matthias

It´s a great tool, thank you!

An improvement would be to choose the period, that should be saved local.

"Backup my tweets from 01. June 2009 on..."

#17 2009-08-16 by Johann

Matthias,

I don't know why you'd want only a part of your Twitter history backed up -- doesn't sound like a real backup to me.

However, setting a time period should be easy to do. Download the sources and have fun :-)

#18 2009-11-26 by mica

is there an existing XSLT that I can use to transform my XML into something more readable? Or do I need to author my own?

#19 2009-11-29 by Johann

mica,

I don't have one, sorry. If you write one, post a link here.

Thanks

#20 2009-12-27 by Rob

Johann, this is a neat app. Thank you!

A simple solution for those like Anthony above who are concerned about the password field being visible: just sign into Twitter the normal way and change your password to something else before running the backup. After you've finished with this tool you can sign in and change it back again.

Subscribe

RSS 2.0, Atom or subscribe by Email.

Top Posts

  1. DynaCloud - a dynamic JavaScript tag/keyword cloud with jQuery
  2. 6 fast jQuery Tips: More basic Snippets
  3. xslt.js version 3.2 released
  4. xslt.js version 3.0 released XML XSLT now with jQuery plugin
  5. Forum Scanners - prevent forum abuse
  6. Automate JavaScript compression with YUI Compressor and /packer/

Navigation