Take the 2-minute tour ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

If you are logged in to your Blogger account, you can easily download a dump of your website by clicking on the Settings → Other → Export Blog link. (Source.)

How can I do this automatically each day on Linux, from a cron job?

share|improve this question
    
It’s not much, but take a look at Blogger Backup. –  Alex Aug 6 '12 at 20:12
add comment

3 Answers 3

up vote 2 down vote accepted

First you need to do a login with curl and then you can simply invoke another call to the download link.

I would follow this article to accomplish this. The trick is to find out which URL you need to call to export your blog.

What I did is:

  1. Use Chrome
  2. Open developer tools (F12 or ctrl+shift+j).
  3. Select the network tab.
  4. Go to the "export" button/link and click it.

You will see the download happening, and you will see a new record in the network tab. Mine is : http://draft.blogger.com/feeds/7135654868651822450/archive (if not authenticated you will get 404).

enter image description here

(update by Mark Harrison) Based on the information above, here is a script that will download the xml dump of the blog. (end update)

FEED=12312312312312313
GMAIL=yourname@gmail.com

echo -n google passwd:
stty -echo
read GPASS
stty echo                  

AUTH=`curl 2>/dev/null https://www.google.com/accounts/ClientLogin \
    -d Email=$GMAIL \   
    -d Passwd=$GPASS  \
    -d accountType=GOOGLE \
    -d source=blogix \
    -d service=blogger \
  | grep '^Auth=' | cut -c 6-`

curl >blog.xml \
    -H "Authorization: GoogleLogin auth=$AUTH" \
    http://www.blogger.com/feeds/$FEED/archive
share|improve this answer
    
Wow @Alex thanks! –  guy mograbi Aug 22 '12 at 9:28
add comment

You might consider a 'cloud' solution, such as backupify or ifttt.com ?

share|improve this answer
add comment

As someone who uses Backupify, IFTTT, Zapier and a handful of other cloud connecting sites, I think in your case, a one time dump plus a IFTTT -> Dropbox for posts and files would be your best bet. To verify it's working, you could also have it send you an email with your post.

IFTTT has been around for years now and has always been reliable. They are planning on charging at some point, but I can't imagine you would fall under that for just this use case alone.

Backupify will charge you right off the bat.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.