diff --git a/docker/sync/Dockerfile b/docker/sync/Dockerfile index 33b8763..ac7ce4c 100644 --- a/docker/sync/Dockerfile +++ b/docker/sync/Dockerfile @@ -57,6 +57,7 @@ ENV ALIYUNPAN_PAN_DIR=/sync_drive ENV ALIYUNPAN_SYNC_MODE=upload ENV ALIYUNPAN_SYNC_POLICY=increment ENV ALIYUNPAN_SYNC_DRIVE=backup +ENV ALIYUNPAN_SYNC_CYCLE=infinity ENV ALIYUNPAN_SYNC_PRIORITY=time ENV ALIYUNPAN_SYNC_LOG=false ENV ALIYUNPAN_LOCAL_DELAY_TIME=3 diff --git a/docker/sync/app.sh b/docker/sync/app.sh index 1a8524d..952b18c 100755 --- a/docker/sync/app.sh +++ b/docker/sync/app.sh @@ -56,4 +56,4 @@ else ./aliyunpan config set -file_record_config 2 fi -./aliyunpan sync start -dp ${ALIYUNPAN_DOWNLOAD_PARALLEL} -up ${ALIYUNPAN_UPLOAD_PARALLEL} -dbs ${ALIYUNPAN_DOWNLOAD_BLOCK_SIZE} -ubs ${ALIYUNPAN_UPLOAD_BLOCK_SIZE} -log ${ALIYUNPAN_SYNC_LOG} -ldt ${ALIYUNPAN_LOCAL_DELAY_TIME} +./aliyunpan sync start -dp ${ALIYUNPAN_DOWNLOAD_PARALLEL} -up ${ALIYUNPAN_UPLOAD_PARALLEL} -dbs ${ALIYUNPAN_DOWNLOAD_BLOCK_SIZE} -ubs ${ALIYUNPAN_UPLOAD_BLOCK_SIZE} -log ${ALIYUNPAN_SYNC_LOG} -ldt ${ALIYUNPAN_LOCAL_DELAY_TIME} -cycle ${ALIYUNPAN_SYNC_CYCLE} diff --git a/docker/sync/docker-compose.yml b/docker/sync/docker-compose.yml index 1e9d127..b32533f 100644 --- a/docker/sync/docker-compose.yml +++ b/docker/sync/docker-compose.yml @@ -31,6 +31,8 @@ services: - ALIYUNPAN_SYNC_MODE=upload # 备份策略: exclusive(排他备份文件,目标目录多余的文件会被删除),increment(增量备份文件,目标目录多余的文件不会被删除) - ALIYUNPAN_SYNC_POLICY=increment + # 备份周期, 支持两种: infinity(永久循环备份),onetime(只运行一次备份) + - ALIYUNPAN_SYNC_CYCLE=infinity # 网盘:backup(备份盘), resource(资源盘) - ALIYUNPAN_SYNC_DRIVE=backup # 是否显示文件备份过程日志,true-显示,false-不显示