query: tag:S3

EC2のインスタンスのイメージをバックアップする手順のメモです。
以下はEC2上のインスタンスにSSHでログインしての作業です。
まずは以下のようなコマンドでイメージを書き出します。

shell>>

ec2-bundle-vol -d /mnt -k /mnt/pk-XXXXXXXXXX.pem -c /mnt/cert-XXXXXXXXXX.pem -u <AWSのユーザID>

<<--

AWSのユーザIDはAWSの「Your AWS Profile」のページから参照できます。
XXXX-XXXX-XXXXのような数字の羅列でした。

結果として、/mnt/の下にimage.manifest.xmlimage.part.XXというファイルが書き出されます。

処理が終了するまでの間に、10分弱ぐらいかかったかな。
Have a coffee break!

続いてはイメージのS3へのアップロードです。以下のコマンドで先ほど生成されたファイル群をS3にアップロードします。

shell>>

ec2-upload-bundle -b s21g-ubuntu -m /mnt/image.manifest.xml -a <アクセスキー> -s <秘密アクセスキー>

<<--

アクセスキーと秘密アクセスキーはAWSのページで確認してください。
-bで指定した名前は、S3のバケット名になります。

こちらは2分ぐらいで終了。トータルで10分ちょっとですね。

最後に、ローカル環境から以下のコマンドを実行して、作成したイメージを登録します。

sh>>
% ec2-register s21g-ubuntu/image.manifest.xml
IMAGE ami-8a789de3
<<--

これによって、AMIを指定してインスタンスを起動できるようになります。

posted by genki genki on Fri 25 Apr 2008 at 16:55 with 0 comments

AWS (Amazon Web Service) including S3 and EC2 had downed again (See here)

We may have a need of balancing our services over the several EC2 clones.
Fortunately, there have already been several computing clouds on the Internet.
But there are no compatibilities between them.
Their interfaces should be standardized.
I think that the spec would become similar to EC2 because of its accumulated experiences.

BTW, I can't stop recalling the story of Permutation City of Egan.

posted by takiuchi takiuchi on Tue 8 Apr 2008 at 08:58 with 0 comments