Migrating to the High Replication Datastore. datastore master/slave to HRD | appengine

なんか・・・datastoreが古い mastar/slaveだから HRDに変えろと催促メールが来た・・・
データ移行し終わったら使わない予定だけど。まだ消せないからとりあえず手順を試しておく。

https://developers.google.com/appengine/docs/python/tools/uploadinganapp

まずは、コードを保存してみる。
/usr/local/google_appengine/appcfg.py

appcfg.py download_app -A -V

デフォルトは403エラーになるそうで。。。
developer consoleのPermissionのところに
Note: code downloads are prohibited.と書いてある

You can permanently disable code downloads from the Versions screen in your development web server. On that page, click permanently prohibit code downloads:

と書いてあるけど、そんなのありませんがー。ー?

コードはあるからとりあえず。。。

https://developers.google.com/appengine/docs/adminconsole/migration#

■ Duplicating Your Application
Administration > Application Settings > Duplicate Application Settings
でボタンで。
設定とかはコピーされませんよと書いてある。

Storage Scheme が High Replicationになってるのが作成された。

■ Deploying Your New HRD Application
app.yamlとかを新しいhrd用の名前に変更してupdate
+ コードをアップする前にデータコピーするとインデックスが再構築されるから気をつけろと書いてある。
良くわからないけどコピーする前にupdateしろと

$ appcfg.py update gr-sample-hrd

11:15 PM Host: appengine.google.com
11:15 PM Application: gr-sample-hrd version: 1-1-4
11:15 PM
Starting update of app: gr-sample-hrd, version: 1-1-4
11:15 PM Getting current resource limits.
11:15 PM Scanning files on local disk.
11:15 PM Cloning 18 application files.
11:15 PM Uploading 1 files and blobs.
11:15 PM Uploaded 1 files and blobs
11:15 PM Compilation starting.
11:15 PM Compilation completed.
11:15 PM Starting deployment.
11:15 PM Checking if deployment succeeded.
11:15 PM Will check again in 1 seconds.
11:15 PM Checking if deployment succeeded.
11:15 PM Will check again in 2 seconds.
11:15 PM Checking if deployment succeeded.
11:15 PM Will check again in 4 seconds.
11:15 PM Checking if deployment succeede
11:15 PM Deployment successful.
11:16 PM Checking if updated app version is serving.
11:16 PM Completed update of app: gr-sample-hrd, version: 1-1-4
11:16 PM Uploading index definitions.

■ Using the Migration Tool
これでデータコピーできるのかな
元のアプリケーションの Application Settings > Migrate Application [View Migration Tool]をクリックすると
HRD Migrationが開かれた。
ここで、コピー先を新しく作ったhrdのアプリを選択。
start migration を押してみた。


こんな状態に。

billing設定してないから途中で止まるのかな?とりあえず放置。

数時間後。5時間後くらいかな?メールが来てました。

App Engine HR Migration gr-sample to gr-sample-hrd: Phase Complete!

当然ですが、billing設定していないので1GB以上、もう書き込めませんとエラーが出ていた。
新しい方は書き込めません。
元データの方は、
waiting Waiting to activate read-only. See below…
の状態で止まっているようです。つまり1GBだけ終わった状態なので completeしてないよ^^!

とりあえず他の作業が終わったら、データを移して、古い方を消そうかな。

This entry was posted on 金曜日, 8月 24th, 2012 at 11:27 PM and is filed under Google App Engine. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

Unityによるゲームを公開しております iOS/Android
https://itunes.apple.com/jp/app/lost-knight-3d-action/id900917032
https://play.google.com/store/apps/details?id=com.groundroad.runknight

各種開発支援・機能開発等小さいお仕事などもお請けしております。
unity開発支援, PHPシステム開発, javascript/html5 フロント開発, titanium mobileアプリ開発
お気軽にお問い合わせください
大崎・五反田近郊での対面でのお打ち合わせはいつでも可能です。