3

Here are many methods to backup questions that I asked / answered / commented. Does one of these methods backup the text (not just ID) of questions and answers I marked as favorites (bookmarks, star icon)? If not, how do I do that?

The question and answer here are about backing up questions only, not answers. So that's different and doesn't help here.

I ask because I would like to make a backup of the information that I find useful for when I'm offline or things get deleted.

1 Answer 1

4

This SEDE Query does that for you.

In the votes table a bookmark is stored as votetypeid = 5 together with your userid. Only caveat is that only questions get bookmarked. In the join this means you have to join answers based on their question id, found in the parentid on the Post table. This explains the coalesce function that I used.

select p.id
     , p.parentid
     , p.title
     , concat('site://q/', p.id,'|/q/',p.id) [url]
     , p.posttypeid
     , p.body
from posts p 
inner join votes v on v.postid = /* q.id */ coalesce(p.parentid, p.id)
inner join users u on v.userid = u.id
where v.votetypeid = 5 -- favorite
and u.accountid = ##accountid?6795719##
order by coalesce(p.parentid, p.id)
       , p.posttypeid
       , p.creationdate

You can download these results as CSV (right top of the results grid).

Here is the cross-site database query

Keep in mind SEDE is updated once a week on Sunday.
Use the awesome SEDE Tutorial written by the unforgettable Monica Cellio.
Say "Hi" in SEDE chat.

10
  • Thanks! Is there a way to do this easily across all SE sites? And how to additionally display the question text and URL?
    – root
    Nov 21, 2020 at 13:27
  • 1
    @root all added.
    – rene
    Nov 21, 2020 at 16:14
  • Thanks! Unfortunately I hadn't realized while writing the question, but I'm also interested in having all comments to the questions and answers. And apart from bookmarked threads also threads where I wrote or edited or upvoted a question or answer or comment. If this is inappropriate to ask here, I can ask it in a separate question.
    – root
    Nov 21, 2020 at 21:04
  • @root votes are anonymous so it is impossible to find those.
    – rene
    Nov 22, 2020 at 7:18
  • I can see my own votes, isn't that enough? Aren't bookmarks anonymous as well? Sounds like querying additional votetypeid values apart from 5 might be a good start...
    – root
    Nov 23, 2020 at 9:40
  • @root you can see your votes on your profile but nobody else can. Bookmarks and bounties (votettypeid = 8) are the only two exceptions in the votes table. Those have a userid populated. For the other votetypeid's the field is null.
    – rene
    Nov 23, 2020 at 11:33
  • So I see my votes on the SE website but not in SEDE? (If so, I wonder what the purpose of this discrepancy is.)
    – root
    Nov 23, 2020 at 11:54
  • @root because then everyone can see them and that kind of defeats the goal of voting is anonymous
    – rene
    Nov 23, 2020 at 11:57
  • Can other users see my bookmarks? Why doesn't SEDE give me access to the things (e.g. my votes) which only I can see on SE?
    – root
    Nov 23, 2020 at 12:08
  • Yes, others can see your bookmarks. In SEDE the data isn't linked to you. You can login with your account but beyond that no other privileges or data is authorised against your actual SE profile. We all see the same data in SEDE.
    – rene
    Nov 23, 2020 at 12:15

You must log in to answer this question.

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