- aliossdel
- aliossupload
- alisls
package main
import (
"github.com/chaiyd/tools-go/aliyun"
)
func main() {
aliyun.UploadFile()
aliyun.OssDelFile()
aliyun.AliSendLog()
}
[server]
AccessKeyId=""
AccessKeySecret=""
## alisls
LOGEndpoint="cn-beijing.log.aliyuncs.com"
LOGProject="log"
LOGLogstore="log"
LOGTopic="log"
## alioss
OSSEndpoint="https://oss-cn-beijing.aliyuncs.com"
OSSBucket="backup"
OSSDir="gitlab"
## 开始时间
OSSStartTime="2020-01-01"
# 删除oss备份,2个月前的,请写"-2"
OSSMonthsAgo=-3
[client]
# 上传阿里云sls
LOGFile="/Projects/tools-go/log"
# 删除本地日志,7天前的日志,请写"-7"
LogsDaysAgo=-7
BackupPath = "/data/backups/"
LogPath = "/data/back-logs/"
docker run --restart=always \
--volume=/:/rootfs:ro \
--volume=/var/run:/var/run:ro \
--volume=/sys:/sys:ro \
--volume=/docker/docker:/var/lib/docker:ro \
--volume=/dev/disk/:/dev/disk:ro \
--publish=8080:8080 \
--detach=true \
--name=cadvisor \
--privileged \
--device=/dev/kmsg \
gcr.io/cadvisor/cadvisor:v0.39.3