diff --git a/fe/fe-core/src/main/java/org/apache/doris/analysis/BackupStmt.java b/fe/fe-core/src/main/java/org/apache/doris/analysis/BackupStmt.java index e8d292710c7a66e..9753afc2d984220 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/analysis/BackupStmt.java +++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/BackupStmt.java @@ -167,12 +167,18 @@ protected void analyzeProperties() throws AnalysisException { copiedProperties.remove(PROP_BACKUP_WORKLOAD_GROUP); } - if (properties.get(PROP_BACKUP_PRIV) == null - && properties.get(PROP_BACKUP_CATALOG) == null - && properties.get(PROP_BACKUP_WORKLOAD_GROUP) == null) { - backupPriv = true; - backupCatalog = true; - backupWorkloadGroup = true; + if (isBackupGlobal()) { + if (properties.get(PROP_BACKUP_PRIV) == null + && properties.get(PROP_BACKUP_CATALOG) == null + && properties.get(PROP_BACKUP_WORKLOAD_GROUP) == null) { + backupPriv = true; + backupCatalog = true; + backupWorkloadGroup = true; + } + } else { + backupPriv = false; + backupCatalog = false; + backupWorkloadGroup = false; } if (!copiedProperties.isEmpty()) { diff --git a/fe/fe-core/src/main/java/org/apache/doris/analysis/RestoreStmt.java b/fe/fe-core/src/main/java/org/apache/doris/analysis/RestoreStmt.java index 10411aa418f80df..5c70d3d478e3c14 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/analysis/RestoreStmt.java +++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/RestoreStmt.java @@ -274,12 +274,18 @@ public void analyzeProperties() throws AnalysisException { copiedProperties.remove(PROP_RESERVE_WORKLOAD_GROUP); } - if (!properties.containsKey(PROP_RESERVE_PRIVILEGE) - && !properties.containsKey(PROP_RESERVE_CATALOG) - && !properties.containsKey(PROP_RESERVE_WORKLOAD_GROUP)) { - reservePrivilege = true; - reserveCatalog = true; - reserveWorkloadGroup = true; + if (isBackupGlobal()) { + if (!properties.containsKey(PROP_RESERVE_PRIVILEGE) + && !properties.containsKey(PROP_RESERVE_CATALOG) + && !properties.containsKey(PROP_RESERVE_WORKLOAD_GROUP)) { + reservePrivilege = true; + reserveCatalog = true; + reserveWorkloadGroup = true; + } + } else { + reservePrivilege = false; + reserveCatalog = false; + reserveWorkloadGroup = false; } if (!copiedProperties.isEmpty()) {