ちょっとしたWebサイトを作りたいと思った時にGoogleサイトは便利な存在です。制約もありますが、あまり体裁を気にせずに情報だけを伝えたいと思うような時に使えます。また、アイディア出しのプロトタイプとしても使い勝手が良いです。 情報が蓄積されていくと独自のWebサイトに移行したいと考えるかも知れません。そんな時にはgoogle-sites-backupを使ってみましょう。

google-sites-backupの使い方

google-sites-backupはコマンドラインで実行します。ウィザードに沿って回答していくだけでコンテンツがエクスポートされます。オプションで指定することも可能です。

$ google-sites-backup/run.sh gdata-python-client/ google-sites-backup/
If your Site is hosted on a Google Apps domain, enter it (e.g. example.com); otherwise leave empty: moongift.jp
Site name: aaaaaaaa
Session file to store the auth token [leave empty to skip]: 
Please enter your OAuth 2.0 Client ID which identifies your app: xxxxxxxxxxxx
Please enter your OAuth 2.0 Client secret which you share with the OAuth provider: xxxxxxxxxxxx

Visit the following URL in your browser to authorize this app:

https://accounts.google.com/o/oauth2/auth...

What is the verification code? 4/dFmoZvsnwq6QLLH9CefeDxG4cioFDvm7SjcKwNeaF5E
Directory to store the backup: ~/Downloads/test-backup/
Fetching & saving the content feed of 'fuji-climbing-2012' ...
Entry ID: https://sites.google.com/feeds/content/moongift.jp/fuji-c...
backup//a/moongift.jp/fuji-climbing-2012/home.html (Entity - webpage)
backup//a/moongift.jp/fuji-climbing-2012/__meta/home.txt (Meta - webpage)
Next page to fetch from the API? No.

Moving list entries into their parent pages...

All done.

エクスポートされるのはHTMLで、デザインは当たっていないので注意してください。

デザインについては別途考える必要がありますが、バックアップさえできてしまえば後は自由に使えるでしょう。Gitなどでバージョン管理する上でも役立つことでしょう。

google-sites-backupはPython製のオープンソース・ソフトウェア(MIT License)です。

famzah/google-sites-backup: Export a Google Site and save it locally on your computer