The FAQ says: Comments are temporary "Post-It" notes left on a question or answer, meaning that we should not expect them to be around forever.

So I would like to backup all my comments on a regular basis: what is the easiest way for me to download all my comments across all Stack Exchange sites?

  • 8
    Why would you want to backup all my comments on a regular basis? What's the point? As a side note, you can search comments via the Data Explorer
    – Taryn
    Nov 26, 2013 at 17:59
  • 3
    Do you have comment that it would be bad if they were deleted? If so edit it into a relevant question/answer or make an answer from it Nov 26, 2013 at 18:04
  • 3
    You have some stringent data-retention policies! ;) Nov 26, 2013 at 18:07
  • It's already backedup for you. Just learn to use SQL Nov 26, 2013 at 18:09
  • 1
    @bluefeet & AB: As a rule, I don't like to have stuff I wrote being deleted without at least being sent a copy of it, as I can need it later for various purposes, ranging from remembering some ideas to training some voice recognition engine. I indeed have stringent data-retention policies: I am a strong believer in data liberation, and wish StackExchange paid more respect to user-generated content (I'm actually even more annoyed that we cannot retrieve our answers to deleted questions (and as you know questions do get deleted from time to time).). Nov 26, 2013 at 18:15
  • RichardTingle: content that can be useful for me for later use is not restricted to answers. ʞunɥdɐpɐɥd: yes one of the solution I was hoping for was some already-written SQL query. I know SQL but it would be even faster it is already available. I'll give a shot then! Nov 26, 2013 at 18:24
  • @ʞunɥdɐpɐɥd I've just written an SQL query to retrieve all comments for a given user: data.stackexchange.com/stackoverflow/query/150358/… . It's actually pretty good, the only issue is that it needs to be run for each Stack Exchange website. Nov 26, 2013 at 18:38

4 Answers 4


"Back them up" by editing them into a question or answer. They'll quickly be mirrored across The Internet.

  • 2
    What should happen when someone knows enough to spot an error in an answer (and thus comments), but not enough to provide a full alternative answer? (Assume the answerer disagrees that this is a problem.) As an asker, or other person reviewing a question looking for a solution, I'd sure want to know about issues with a proposed approach. Where should those comments go? Nov 26, 2013 at 18:10
  • 2
    If a correcting edit is rejected, they should go in another answer, @Monica. If the author lacks sufficient knowledge to write one, then hopefully someone else will be able to.
    – Shog9
    Nov 26, 2013 at 18:12

You can use the Data Explorer and run this query (thanks bluefeet and ʞunɥdɐpɐɥd for the suggestion).

-- Display all comments of a given user

DECLARE @UserId int = ##UserId##

SELECT Comments.Text
FROM Comments
WHERE Comments.UserId = @UserId

The main issue is that it needs to be run for each Stack Exchange website you want to retrieve your comments from, which can be pretty tedious to do.

  • 1
    Odd, edge-case problem (I understand, but just disagree with your reason for it); but good solution! Nov 26, 2013 at 20:21

You can download a Stack Exchange GDPR data dump of your own content, and extract your comments from the respective PostComments.json file.

It looks like even the comment revision history is included, which is normally inaccessible to users who are not moderators.

I wrote an answer to Dump of my own Stack Exchange content which discusses the process in more detail.


Just download the entire data dump of the site. That'd be the easiest option anyway. Getting just your comments out of it would be a bit more involved though.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .