Backup-Manager icon indicating copy to clipboard operation
Backup-Manager copied to clipboard

Error when trying to upload to s3

Open alxckn opened this issue 8 years ago • 9 comments

Hello,

I'm trying to upload backups to s3 and I'm facing this error:

Using the upload method "S3".
Trying to upload files to s3 service
Connected to s3.amazon.com
Bucket backup does not exist... creating
opened /var/archives/index-20170125-1 of length 559 and will name the key index-20170125-1
Error reported by backup-manager-upload for method "s3", check "/tmp/bmu-log.oj0ULo".
Releasing lock
foo@foo:~$ sudo cat /tmp/bmu-log.oj0ULo 
Could not create bucket backup
Can't locate object method "add_key_filename" via package "0" (perhaps you forgot to load "0"?) at //usr/local/bin/backup-manager-upload line 930.

Is this a bug or am I missing something in my configuration? Thank you,

Alex

alxckn avatar Jan 25 '17 16:01 alxckn

I have exactly the same problem on Centos 7

mmihalev avatar Feb 28 '17 17:02 mmihalev

@mmihalev I created a cronjob to upload backed up files every day right after backup-manager's run has finished, using aws cli:

15 2 * * * /usr/local/bin/aws s3 sync /var/archives s3://<bucket-name>/archives >> /var/log/aws_s3.log

Hope that helps ;)

alxckn avatar Feb 28 '17 17:02 alxckn

@alxckn how do you know when backup-manager is done with the archives?

mmihalev avatar Feb 28 '17 18:02 mmihalev

I think export BM_POST_BACKUP_COMMAND="/usr/bin/aws s3 sync /backups s3://bucket" will do the job

mmihalev avatar Feb 28 '17 18:02 mmihalev

Even better

alxckn avatar Feb 28 '17 18:02 alxckn

Just now faced this problem and remember, that I already resolved it some time ago. I don't remember, what exactly was the reason, but the final point was changing the bucket region. Region "Europe Ireland" faced this problem. Region "US East (N. Virginia)" don't.

fezeev avatar May 27 '17 22:05 fezeev

I've met this problem too. @fezeev is right, but the easiest way to do that is to not create the bucket previously and let backup-manager to create it (simply set a name which doesn't already exist in your buckets).

alexisattimont avatar Jul 12 '17 22:07 alexisattimont

Hi, this is linked with the perl package Net::Amazon::S3. Most probably this: https://github.com/rustyconover/net-amazon-s3/issues/19

Buckets in AWS Europe use signature v4. Also may be related with the absence of host.

jcfjcosta avatar Jul 13 '17 16:07 jcfjcosta

I got same issues when try use BM_UPLOAD_S3_DESTINATION param with '-' in bucket name. Everything works after assigning a different bucket name.

sprnegr avatar Feb 24 '20 15:02 sprnegr