Tuesday, March 30, 2010

Daylight Saving Time for Ubunu Linux

If you find the time of your Ubuntu machine out by an hour due to DST, then the following steps might sort it out for you:


  1. locate the name of the timezone that is suitable for you

    ls /usr/share/zoneinfo


  2. Use zic to set the zone correctly for your localtime

    zic -l $zoneName


Thursday, March 4, 2010

Copying EC2 Instances Between Regions

On Amazon AWS EC2, there are different regions. Presently there are three regions. EU-West, US-West, and US-East. To move/copy instances between regions is not trivial, and is not possible using the GUI (either elasticfox or amazon console).

The following is what has worked for me to copy from EU-WEST to US-WEST:


Determine the name of the bucket your current instance is stored at


The bucket name is usually part of the manifest url and is something of the form:
$bucket_name/$manifest_name.xml



Determine suitable kernel and ramdisk ids in the target region


Each AMI image requires references to suitable kernels and ramdisks. This references differ from region to region, so suitable ids need to be researched for your target region. For best results, select akis and aris that are as close as possible to those in the original region


ec2-describe-images -o amazon --region $target_region | grep $kernel_description



Using the API tools provided by Amazon, run the following Command



./ec2-migrate-image -o $Access_Key -w $Access_Password --region eu-west-1 --bucket $name_of_existing_bucket --destination-bucket $new_bucket_in_us --manifest $manifest_name.manifest.xml --location us-west-1 --kernel=$suitable_kernel_id --ramdisk=$suitable_ram_disk_id


Note: Transferring ECB blocks currently needs to be done out of band. This involves using rsync, dd, or equivalent.

Resources