I have migrated (actually copied) a Debian Amazon EC2 server from North Virginia to the Ireland datacentre, within a VPC.
I have been using this python script to make automated EBS snapshot backups very night, but since I have migrated the server, it doesn't work.
The new volume is not recognised as existing, but it can make a snapshot of the old volume in North Virginia, even though the server is in Ireland.
I get this error:
root@ip-10-0-0-100:~# python /srv/bin/manage_snapshots.py vol-fac935ae 14 "Test Backup"
Traceback (most recent call last):
File "/srv/bin/manage_snapshots.py", line 36, in <module>
volumes = conn.get_all_volumes([vol_id])
File "/usr/local/lib/python2.7/dist-packages/boto/ec2/connection.py", line 2099, in get_all_volumes
[('item', Volume)], verb='POST')
File "/usr/local/lib/python2.7/dist-packages/boto/connection.py", line 1131, in get_list
raise self.ResponseError(response.status, response.reason, body)
boto.exception.EC2ResponseError: EC2ResponseError: 400 Bad Request
<?xml version="1.0" encoding="UTF-8"?>
<Response><Errors><Error><Code>InvalidVolume.NotFound</Code><Message>The volume 'vol-fac935ae' does not exist.</Message></Error></Errors><RequestID>30ba36b6-2f07-4c5f-b307-36865cb7ef44</RequestID></Response>
Assuming the problem is in boto configuration, how can I tell it that the server is now in Ireland?
I already have this in ~/.profile
:
# set AWS region
export EC2_URL=https://ec2.eu-west-1.amazonaws.com
But I think that is only for the command line ec2-api-tools.