fix(backup): 归档校验改用 ListObjects 避免依赖对象 HeadObject 权限

This commit is contained in:
yml2213
2026-11-10 15:31:42 +08:00
parent d0572e5001
commit 9e029a519f
2 changed files with 9 additions and 3 deletions
+6
View File
@@ -181,6 +181,12 @@ backup_oss_download() {
ossutil cp "${source}" "${destination}"
}
# 用 ListObjects 校验远端对象存在,避免依赖对象 HeadObject 权限(oss:GetObjectMeta)。
backup_oss_object_exists() {
local key="$1"
ossutil ls "${key}" 2>/dev/null | grep -q 'Object Number is: 1'
}
backup_write_complete_marker() {
local path="$1"
local payload_name="$2"