s3cmd : Configure multiple s3 accounts on same server


First configure s3cmd
s3cmd --configure
Add access keys and Secret Keys.

Now rename ~/.s3cfg to ~/.s3cfg-first

s3cmd --configure
Now rename ~/.s3cfg to ~/.s3cfg-second
 
Configure third and so on

If you do not define config file parameter in command, it takes default config file i.e. .s3cfg


You need to define config file with command and you can communicate with different s3 buckets of same server or different servers.
s3cmd ls s3://bucketname -c ~/.s3cfg-first
It will list the content of the bucket of first server.
s3cmd ls s3://bucketname -c ~/.s3cfg-second
It will list the content of the bucket of second server.

Similar way you can copy content, delete content or move them.

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...