Discussion:
[S3tools-general] Sync Command
Cherish Drain
2015-11-03 21:06:33 UTC
Permalink
Hi,

I have two questions:

1. How do I tell s3mod the aws credentials? Does it read the credentials
from a file just like the aws commands do?

2. How can I convert the following aws sync command to use s3mod

aws s3 sync ./test s3://test --content-encoding "gzip" --content-type
"text/html" --cache-control "max-age=0, no-cache" --exclude "*" --include
"index.html" --profile stage

I want to be able to use the content-type, content-encoding, and
cache-control parameters. It is not clear that you provide access to these
parameters.

Best,
Cherish
David Low
2015-11-03 23:55:55 UTC
Permalink
Hi,

1. Yes, they're in the s3cmd.ini file. it's a bit of a maze but the
credentials are in there :) on linux that should be in .s3cmd/ but i'm only
working from memory at the moment and could be wrong.

2. I'm not qualified to answer the parameters question sadly, The sync
functionality (which i admit, i've been having a few issues with. but
that's a different topic) is basically a file dump and any files you point
at it... say you have a directory called /this/place/ and run the command
$> s3cmd -sync /this/place s3://bucketplace/. it'll copy all of the files
in that directory to the s3 bucket on AWS. likewise it works in reverse too.

Likewise,
David~
Post by Cherish Drain
Hi,
1. How do I tell s3mod the aws credentials? Does it read the credentials
from a file just like the aws commands do?
2. How can I convert the following aws sync command to use s3mod
aws s3 sync ./test s3://test --content-encoding "gzip" --content-type
"text/html" --cache-control "max-age=0, no-cache" --exclude "*" --include
"index.html" --profile stage
I want to be able to use the content-type, content-encoding, and
cache-control parameters. It is not clear that you provide access to these
parameters.
Best,
Cherish
------------------------------------------------------------------------------
_______________________________________________
S3tools-general mailing list
https://lists.sourceforge.net/lists/listinfo/s3tools-general
--
Best Wishes
David~
Cherish Drain
2015-11-04 02:12:53 UTC
Permalink
Hi,

Can I set the content-encoding and content-type and cache-control using the
sync command? also can I include and exclude files?

Best,
Cherish
Post by David Low
Hi,
1. Yes, they're in the s3cmd.ini file. it's a bit of a maze but the
credentials are in there :) on linux that should be in .s3cmd/ but i'm only
working from memory at the moment and could be wrong.
2. I'm not qualified to answer the parameters question sadly, The sync
functionality (which i admit, i've been having a few issues with. but
that's a different topic) is basically a file dump and any files you point
at it... say you have a directory called /this/place/ and run the command
$> s3cmd -sync /this/place s3://bucketplace/. it'll copy all of the files
in that directory to the s3 bucket on AWS. likewise it works in reverse too.
Likewise,
David~
Post by Cherish Drain
Hi,
1. How do I tell s3mod the aws credentials? Does it read the credentials
from a file just like the aws commands do?
2. How can I convert the following aws sync command to use s3mod
aws s3 sync ./test s3://test --content-encoding "gzip" --content-type
"text/html" --cache-control "max-age=0, no-cache" --exclude "*" --include
"index.html" --profile stage
I want to be able to use the content-type, content-encoding, and
cache-control parameters. It is not clear that you provide access to these
parameters.
Best,
Cherish
------------------------------------------------------------------------------
_______________________________________________
S3tools-general mailing list
https://lists.sourceforge.net/lists/listinfo/s3tools-general
--
Best Wishes
David~
------------------------------------------------------------------------------
_______________________________________________
S3tools-general mailing list
https://lists.sourceforge.net/lists/listinfo/s3tools-general
Cherish Drain
2015-11-04 20:48:09 UTC
Permalink
Hello,

Does any one have an answer to my question below?

How can I use the s3cmd sync command to set the...
1. content type i.e text/html
2. cache control (like AWS sync) i.e max-age=300
3. content encoding i.e gzip

?

I'm trying to replicate the following command but use s3cmd sync instead:

aws s3 sync ./test s3://test --content-encoding "gzip" --content-type
"text/html" --cache-control "max-age=0, no-cache" --exclude "*" --include
"index.html" --profile stage


Thanks,
C
Post by Cherish Drain
Hi,
Can I set the content-encoding and content-type and cache-control using
the sync command? also can I include and exclude files?
Best,
Cherish
Post by David Low
Hi,
1. Yes, they're in the s3cmd.ini file. it's a bit of a maze but the
credentials are in there :) on linux that should be in .s3cmd/ but i'm only
working from memory at the moment and could be wrong.
2. I'm not qualified to answer the parameters question sadly, The sync
functionality (which i admit, i've been having a few issues with. but
that's a different topic) is basically a file dump and any files you point
at it... say you have a directory called /this/place/ and run the command
$> s3cmd -sync /this/place s3://bucketplace/. it'll copy all of the files
in that directory to the s3 bucket on AWS. likewise it works in reverse too.
Likewise,
David~
Post by Cherish Drain
Hi,
1. How do I tell s3mod the aws credentials? Does it read the credentials
from a file just like the aws commands do?
2. How can I convert the following aws sync command to use s3mod
aws s3 sync ./test s3://test --content-encoding "gzip" --content-type
"text/html" --cache-control "max-age=0, no-cache" --exclude "*" --include
"index.html" --profile stage
I want to be able to use the content-type, content-encoding, and
cache-control parameters. It is not clear that you provide access to these
parameters.
Best,
Cherish
------------------------------------------------------------------------------
_______________________________________________
S3tools-general mailing list
https://lists.sourceforge.net/lists/listinfo/s3tools-general
--
Best Wishes
David~
------------------------------------------------------------------------------
_______________________________________________
S3tools-general mailing list
https://lists.sourceforge.net/lists/listinfo/s3tools-general
Loading...