
有時候真害怕不小心把檔案誤殺,不然就是硬碟壞軌....XD,這樣不就等於做白工嘛...
底下就用 Google Doc 當 back up server. 不用害怕硬碟壞軌 + 誤殺檔案的後果.
原理其實就是用 Google 所提供的 API, 寫成底層的 protocol interface. 為了要 hack Google 的 upload check, 我們會暫存成 *.pdf 的檔名.但檔案內容還是 tar 檔. 等有需要時, 再download 回 local 端.再解 tar 即可....
supports
-[Uu] -[Tt] -[Pp] your_path
-[Dd] -[Yy] -[Pp] your_path
-u -t 3600 -p /home/sean/prj/ss
#back up the project 'ss' && upload 2 google doc @ period of 3600s
# 每3600s back up 一次,且上傳到 google doc server.
-u -t 0 -p /home/sean/prj/ss
#back up the project 'ss' && upload 2 google doc right now
# 立即備份,且上傳到 google doc server
-d -y 2010/11/04 -p /home/sean/prj/ss
#download the project 'ss' by day
# 下載back up data by day
results

code @
https://github.com/funningboy/co_syn/blob/master/GoogleDoc.pl
Refs:
SSL install
http://bredsaal.dk/lwpuseragent-and-https
http://code.activestate.com/lists/perl-win32-web/1972/
content type ref
http://en.wikipedia.org/wiki/Internet_media_type11
others API 4 google
learning plus: Google Finance 4 Quote
learning plus: Google Picasa API
learning plus: Google Finance API
Google Blogger API
Google Upload 2 Google DOC
沒有留言:
張貼留言