1.此处用的是增量同步
#!/bin/bash
rm -rf /var/log/nginx/access.log.*.*
local_host="`hostname --i`"
aws s3 sync /var/log/nginx/ s3://cjtt-nginx/access/`date +%Y-%m-%d`"__"$local_host/
1.此处用的是增量同步
#!/bin/bash
rm -rf /var/log/nginx/access.log.*.*
local_host="`hostname --i`"
aws s3 sync /var/log/nginx/ s3://cjtt-nginx/access/`date +%Y-%m-%d`"__"$local_host/