Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when trying to upload to s3 #94

Open
alxckn opened this issue Jan 25, 2017 · 9 comments
Open

Error when trying to upload to s3 #94

alxckn opened this issue Jan 25, 2017 · 9 comments

Comments

@alxckn
Copy link

alxckn commented Jan 25, 2017

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

@mmihalev
Copy link

I have exactly the same problem on Centos 7

@alxckn
Copy link
Author

alxckn commented Feb 28, 2017

@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 ;)

@mmihalev
Copy link

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

@mmihalev
Copy link

mmihalev commented Feb 28, 2017

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

@alxckn
Copy link
Author

alxckn commented Feb 28, 2017

Even better

@fezeev
Copy link

fezeev commented May 27, 2017

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.

@alexisattimont
Copy link

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).

@jcfjcosta
Copy link

jcfjcosta commented Jul 13, 2017

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

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

@sprnegr
Copy link

sprnegr commented Feb 24, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants