备份之前先停止容器

This commit is contained in:
lsy 2024-10-26 13:21:35 +08:00
parent 015923acd8
commit edda6485bb

View File

@ -90,7 +90,9 @@ for item in "$web_path"/*; do
continue
fi
cd "\$item" || exit
docker compose down
tar -czf "\${item_name}_\${date_time}.tar.gz" \$(ls)
docker compose up -d
bypy upload "\${item_name}_\${date_time}.tar.gz" "/\${item_name}/"
${path}/aliyunpan/aliyunpan upload "\${item_name}_\${date_time}.tar.gz" "/网站/\${item_name}/\${year}/"
mkdir -p "${loacl_path}/\${year}/\${item_name}" && cp "\${item_name}_\${date_time}.tar.gz" "${loacl_path}/\${year}/\${item_name}"