Changeset 167
- Timestamp:
- 01/19/08 14:03:49 (8 months ago)
- Files:
-
- trunk/Changes (modified) (1 diff)
- trunk/lib/Brackup/Target/Amazon.pm (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Changes
r166 r167 1 - added the aws_location option to set the datacenter location for 2 S3 targets. from Alessandro Ranellucci <aar@cpan.org>. 3 The Amazon S3 target now depends on version 0.41 of Net::Amazon::S3. 4 1 5 - fixed tempfile creation in gc (orphaned files were left in the 2 6 working directory). from Alessandro Ranellucci <aar@cpan.org>. trunk/lib/Brackup/Target/Amazon.pm
r165 r167 3 3 use warnings; 4 4 use base 'Brackup::Target'; 5 use Net::Amazon::S3 0. 37;5 use Net::Amazon::S3 0.41; 6 6 7 7 # fields in object: … … 10 10 # sec_access_key_id 11 11 # prefix 12 # location 12 13 # chunk_bucket : $self->{prefix} . "-chunks"; 13 14 # backup_bucket : $self->{prefix} . "-backups"; … … 23 24 or die "No 'aws_secret_access_key'"; 24 25 $self->{prefix} = $confsec->value("aws_prefix") || $self->{access_key_id}; 26 $self->{location} = $confsec->value("aws_location") || undef; 25 27 26 28 $self->_common_s3_init; … … 30 32 31 33 unless (grep { $_->{bucket} eq $self->{chunk_bucket} } @{ $buckets->{buckets} }) { 32 $s3->add_bucket({ bucket => $self->{chunk_bucket} })34 $s3->add_bucket({ bucket => $self->{chunk_bucket}, location_constraint => $self->{location} }) 33 35 or die "Chunk bucket creation failed\n"; 34 36 } 35 37 36 38 unless (grep { $_->{bucket} eq $self->{backup_bucket} } @{ $buckets->{buckets} }) { 37 $s3->add_bucket({ bucket => $self->{backup_bucket} })39 $s3->add_bucket({ bucket => $self->{backup_bucket}, location_constraint => $self->{location} }) 38 40 or die "Backup bucket creation failed\n"; 39 41 } … … 238 240 Brackup. If not specified it defaults to the AWS access key id. 239 241 242 =item B<aws_location> 243 244 Sets the location constraint of the new buckets. If left unspecified, the 245 default S3 datacenter location will be used. Otherwise, you can set it 246 to 'EU' for an AWS European data center - note that costs are different. 247 This has only effect when your backup environment is initialized in S3 (i.e. 248 when buckets are created). If you want to move an existing backup environment 249 to another datacenter location, you have to delete its buckets before or create 250 a new one by specifing a different I<aws_prefix>. 251 240 252 =back 241 253
