Skip to content

Instantly share code, notes, and snippets.

@dcoppari
Created March 6, 2020 19:22
Show Gist options
  • Save dcoppari/f3b5622b14a5f6447cfdd5e2b08e6f63 to your computer and use it in GitHub Desktop.
Save dcoppari/f3b5622b14a5f6447cfdd5e2b08e6f63 to your computer and use it in GitHub Desktop.
Howto Fix backup-manager upload to S3 error can't locate object method "add_key_filename" via package "0"
This is a workaround to fix the error for backup-manager
can't locate object method "add_key_filename" via package "0"
This error is raised bec no propper Net::Amazon::S3 initialization.
To solve this you must enter the host parameter to where the API will authenticate:
/usr/bin/backup-manager-upload on line 870 you need to change:
This:
my $s3 = Net::Amazon::S3->new(
{
aws_access_key_id => $user,
aws_secret_access_key => $passwd,
timeout => 300
}
);
To This:
my $s3 = Net::Amazon::S3->new(
{
host => 's3.sa-east-1.amazonaws.com',
aws_access_key_id => $user,
aws_secret_access_key => $passwd,
timeout => 300
}
);
note the host parameter is set to the S3 host endpoint to use.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment