awslabs / amazon-s3-tar-tool

A utility tool to create a tarball of existing objects in Amazon S3

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

execution failing -"cannot execute binary file"

arikyakir opened this issue · comments

My arch is x86_64 (AW amzl2) and i use the s3tar of s3tar-linux-amd64 and receive "cannot execute binary file" whcih is mostly related to wrong arch of binary

[ec2-user@ip-172-31-18-208 bin]$ uname -a
Linux ip-172-31-18-208.eu-west-1.compute.internal 5.10.167-147.601.amzn2.x86_64 #1 SMP Tue Feb 14 21:50:23 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
[ec2-user@ip-172-31-18-208 bin]$

[ec2-user@ip-172-31-18-208 bin]$ objdump -a s3tar
s3tar: file format elf64-little
s3tar
[ec2-user@ip-172-31-18-208 bin]$

[ec2-user@ip-172-31-18-208 bin]$ s3tar --region eu-west-1 -xvf s3://arik-share/vapp-ovf/ovf.tgz s3://arik-share/vapp-ovf/
-bash: /home/ec2-user/amazon-s3-tar-tool/bin/s3tar: cannot execute binary file
[ec2-user@ip-172-31-18-208 bin]$

not sure what is wrong here

Hi @arikyakir thanks for reporting this issue. It looks like the file was compiled with the arm64 flag instead of the amd64 flag. I have updated the binaries.

I've made a slight upgrade and released v1.0.2 so I downloading that. One thing to notice is that when extracting the file the -C flag is now required to specify the destination.

I noticed you are using the extension tgz. Tgz is usually used for files that are Tar and gzip compressed. I suggest using the .tar extension since these files don't have compression.

thanks, recreated from scratch and its working now

can i use file.tar.gz instead? i need the compression as its large objects needed to be stored also for long retention and it have cost implication

can i use file.tar.gz instead? i need the compression as its large objects needed to be stored also for long retention and it have cost implication

Compression is not possible. The tool works by "moving" existing Amazon S3 data into a new file. To be able to compress the data we would need to download it to a compute layer (EC2, Lambda, etc). The purpose of the tool is to build a single file out of many without having to download the files.