sukria / Backup-Manager

Versatile yet easy to use command line backup tool for GNU/Linux. Suitable for desktop and servers.
http://www.backup-manager.org/
GNU General Public License v2.0
278 stars 91 forks source link

S3: Attribute (region) does not pass the type constraint because: Validation failed for 'Str' with value undef at reader Net::Amazon::S3::HTTPRequest::region #116

Closed HugoHeneault closed 5 years ago

HugoHeneault commented 5 years ago

I'm trying to setup s3 backup upload but it's not working :'(

Here' my backup-manager log:

Trying to upload files to s3 service
Connected to s3.amazon.com
Erreur rapportée par backup-manager-upload pour la méthode « s3 », voir « /tmp/bmu-log.dEkqVg ».

When I open the given log file I got:

Attribute (region) does not pass the type constraint because: Validation failed for 'Str' with value undef at reader Net::Amazon::S3::HTTPRequest::region (defined at /usr/local/share/perl/5.20.2/Net/Amazon/S3/HTTPRequest.pm line 50) line 8
        Net::Amazon::S3::HTTPRequest::region('Net::Amazon::S3::HTTPRequest=HASH(0x5459fe0)') called at /usr/local/share/perl/5.20.2/Net/Amazon/S3/Signature/V4.pm line 43
        Net::Amazon::S3::Signature::V4::_bucket_region('Net::Amazon::S3::Signature::V4=HASH(0x5457190)') called at /usr/local/share/perl/5.20.2/Net/Amazon/S3/Signature/V4.pm line 49
        Net::Amazon::S3::Signature::V4::_sign('Net::Amazon::S3::Signature::V4=HASH(0x5457190)', undef) called at /usr/local/share/perl/5.20.2/Net/Amazon/S3/Signature/V4.pm line 79
        Net::Amazon::S3::Signature::V4::sign_request('Net::Amazon::S3::Signature::V4=HASH(0x5457190)', 'HTTP::Request=HASH(0x544ece8)') called at /usr/local/share/perl/5.20.2/Net/Amazon/S3/HTTPRequest.pm line 83
        Net::Amazon::S3::HTTPRequest::http_request('Net::Amazon::S3::HTTPRequest=HASH(0x5459fe0)') called at /usr/local/share/perl/5.20.2/Net/Amazon/S3/Request.pm line 163
        Net::Amazon::S3::Request::_build_http_request('Net::Amazon::S3::Request::ListBucket=HASH(0x545a2e0)') called at /usr/local/share/perl/5.20.2/Net/Amazon/S3/Request.pm line 169
        Net::Amazon::S3::Request::http_request('Net::Amazon::S3::Request::ListBucket=HASH(0x545a2e0)') called at /usr/local/share/perl/5.20.2/Net/Amazon/S3.pm line 209
        Net::Amazon::S3::list_bucket('Net::Amazon::S3=HASH(0x1de3c00)', 'HASH(0x24775f0)') called at /usr/local/share/perl/5.20.2/Net/Amazon/S3/Bucket.pm line 235
        Net::Amazon::S3::Bucket::list('Net::Amazon::S3::Bucket=HASH(0x1de3bd0)') called at /usr/bin/backup-manager-upload line 887
        main::send_files_with_s3('my_public_key', 'my_secret_key', 'my-bucket', 'ARRAY(0x1dc3e78)', '/var/archives/uploads', 'ARRAY(0x1de3a08)') called at /usr/bin/backup-manager-upload line 1059

Any idea of what I should do?

Thanks a lot!

HugoHeneault commented 5 years ago

So I was following a tutorial saying I didn't need to create a bucket before running backup-manager, but it seems that you need to!

Creating the bucket fixed the issue, it's working now. 🎉