Backup-Manager
Backup-Manager copied to clipboard
Error when trying to upload to s3
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
I have exactly the same problem on Centos 7
@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 how do you know when backup-manager is done with the archives?
I think export BM_POST_BACKUP_COMMAND="/usr/bin/aws s3 sync /backups s3://bucket" will do the job
Even better
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.
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).
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.
I got same issues when try use BM_UPLOAD_S3_DESTINATION param with '-' in bucket name. Everything works after assigning a different bucket name.