-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathconfig.yaml
More file actions
57 lines (52 loc) · 1.87 KB
/
Copy pathconfig.yaml
File metadata and controls
57 lines (52 loc) · 1.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# local 本地路径配置
local:
path:
# remote 远端对象存储配置
remote:
endpoint: cos.ap-guangzhou.myqcloud.com # 例如:cos.ap-guangzhou.myqcloud.com
use_ssl: true
secret_id: ${MY_SECRET_ID} # 可设置在环境变量中
secret_key: ${MY_SECRET_KEY} # 可设置在环境变量中
bucket:
region:
path:
# sync 同步配置
sync:
# real_time.enable 是否启用实时同步(监听本地文件变更进行同步,仅同步服务运行期间发生变更的文件,可结合check_job实现全量同步)
real_time:
enable: true
hot_delay: 5 # 单位分钟(1-60),对频繁修改的文件进行延迟同步,避免频繁的覆盖上传
# check_job.enable 是否启用定期文件对账(扫描对比本地与远端文件差异进行同步)
check_job:
enable: true
interval: 72 # 文件对账频率间隔,单位小时
start_at: 4:00:00 # 文件对账启动时间(建议选在凌晨),将结合频率间隔配置定期执行
# symlink 由于对象存储不支持符号链接,所以需要选择对符号链接文件的处理策略,可选(skip|addr|file),默认为skip
# - skip 跳过符号链接文件,相当于忽略掉符号链接文件
# - addr 把链接指向的地址保存到对象存储,用于记录链接的目标
# - file 复制链接指向的实体文件到对象存储(为避免循环引用,符号链接指向文件夹时则会采用addr策略)
symlink: addr
# ignore 忽略不同步的文件和文件夹
ignore:
- .*.swp
- "*~"
- .DS_Store
- .ds_store
- .svn
- .git
- Thumbs.db
- .idea
log:
- writer: console
formatter: console
level: DEBUG
- writer: file
formatter: json
level: DEBUG
format_config:
time_fmt: "2006-01-02 15:04:05.000"
write_config:
log_path: "./run.log"
max_size: 10
max_age: 30
compress: true