1

I am creating an AMI (Amazon EC2 server image) for all the servers I'm working on. Every server image is separated into some dozens of tar files:

Splitting /mnt/routing-4-server-Ubuntu-x86-64.tar.gz.enc...
Created routing-4-server-Ubuntu-x86-64.part.00
Created routing-4-server-Ubuntu-x86-64.part.01
Created routing-4-server-Ubuntu-x86-64.part.02
Created routing-4-server-Ubuntu-x86-64.part.03
Created routing-4-server-Ubuntu-x86-64.part.04
...
...
Created routing-4-server-Ubuntu-x86-64.part.48
Created routing-4-server-Ubuntu-x86-64.part.49

When I upload these files to a bucket called my-servers-august-9, I get a big mess of files. It will be a a problem when I want to delete some images.

I have tried to store them under subfolders, but this concept seems not to be working in the S3 environment, and the explanations in the Amazon forums quite baffling.

Any idea how can I create this folder structure?

my-servers-august-9
    routing server
        x86-64
            file
            file
            file
            ...
        i386
            file
            file
            file
            ...
     other-server1
        type
            files
        type
            files
     other-server2
        type
            files

Thanks,

Udi

1 Answer 1

1

S3 doesn't support folders. You can put a / in the filename to simulate folders, but they are really just objects in the bucket.

There are two ways to solve your problem. You could either create a new bucket for each server (not recommended by Amazon, as you could quickly hit your 100 bucket limit), or you could use a structured naming scheme.

I personally use date-hostname-imagetype as my naming scheme. In your case, you would probably want type-arch-date or something like that.

Then you can easily sort the list and delete the files you don't need.

Good luck!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .