September 27, 2009

Export Google Sites

Google has released an API for Google Sites that lets you create or edit pages, upload or download attachments, monitor the activity of a site programmatically. The API could be use to create a new interface for Google Sites, to upload files from other sources or to migrate your data.

Google's Data Liberation team built a Java application for importing and exporting Google Sites. The application lets you export the pages from a site and all their attachments to a folder.

"The folder structure of an exported site is meant to mimic the Sites UI as closely as possible. Thus if exporting to a directory "rootdirectory," a top-level page normally located at webspace/pagename, would be in a file named index.html, located in rootdirectory/pagename. A subpage of that page, normally located at webspace/pagename/subpage, would be in a file named index.html in rootdirectory/pagename/subpage. Attachments are downloaded to the same directory as the index.html page to which they belong," mentions the user guide.

You should only enter the domain name if you use Google Apps. "Webspace" is the name of your site: http://sites.google.com/site/sitename/.


Unfortunately, you can't use this tool to import HTML files to an existing site. The importing option is only useful for the sites exported using the same application.

16 comments:

  1. Importing copies google sites content to the machine running the tool, while exporting copies the content to google sites. I expected import/export to be relative to google sites, but it is termed relative to the machine running the application.

    Importing a site worked fine. Exporting wouldn't work to a apps domain. The tool claimed to succeed, but no content appeared on the site. Exporting to sites.google.com seems to get the tool stuck with a neverending progress bar.

    ReplyDelete
  2. Oops. I got that backwards. The tools sticks if you try to export a site with no content, but the import/export is relative to google sites.

    ReplyDelete
  3. Does this work with Google Pages or just sites?

    ReplyDelete
  4. I can't get this tool to export a google site. Anyone try it recently?

    ReplyDelete
  5. It's working for me wonderfully on an Apps account. Looks like they got the bugs out.

    ReplyDelete
  6. This is working pretty well for exporting, but certain inherent properties of site like navigations don't work.

    ReplyDelete
  7. Will this tool work if SSO is enable for Google Enterprise Apps.

    ReplyDelete
  8. This tool doesn't seem to work for me. It hangs after downloading 1 or 2 pages.

    ReplyDelete
  9. The tool said I imported successfully from a directory to a site, but when I opened the site, none of the content from the directory was there.

    ReplyDelete
  10. all fine but it doesnt fetch almost any page formatting and you have to edit the code HEAVILY bfore it can be of any use


    well i guess it is better than nothing

    ReplyDelete
  11. Not sure if this has been mentioned previously but if you are using 2-step authentication for your Google user account the app will error with "Invalid user credentials." I just used another account without 2-step auth enabled. You may be able to use a application specific password but I did not test it.

    ReplyDelete
  12. I just tested using an Application specific password and it works great

    ReplyDelete
  13. > you have to edit the code HEAVILY bfore it can be of any use

    I'm looking at an exported page someone sent me and its rife with (unusable) CSS style commands and relative href paths.

    Is there any way to get the basic XHTML content? Or even just the text?

    There are nearly 400 pages we need to convert to another wiki format and I can't imagine how to write a parser that would remove all of the unusable parts.

    ReplyDelete
  14. I used this tool but it not export to utf-8. Why it don't export to sql. Thanks.

    ReplyDelete

  15. This is really very informative and useful information.
    More details visit our Website:
    IEC code online
    www.indianwesterlies.blogspot.com

    ReplyDelete
  16. Thanks for sharing this guide about ice code but what some need for this process like a pan card. IEC Code

    ReplyDelete

Note: Only a member of this blog may post a comment.