fix(deploy): 在线更新备份 - 兼容 root-only 历史数据文件

This commit is contained in:
ddCat committed 2026-08-30 23:56:33 +08:00
1 parent 9820be4e8c
commit fb089b2d21
4 files changed
+45 -2

No files matched your search

+1 -1
View File
@@ -301,7 +301,7 @@ func (m *Manager) createBackup(version string) (Backup, error) {
if err != nil {
return Backup{}, err
}
if err := m.compose(m.composePath(), version, m.config.StepTimeout, dataEntry, "exec", "-T", "backend", "tar", "-C", "/data", "-cf", "-", "."); err != nil {
if err := m.compose(m.composePath(), version, m.config.StepTimeout, dataEntry, "exec", "-T", "--user", "root", "backend", "tar", "-C", "/data", "-cf", "-", "."); err != nil {
return Backup{}, fmt.Errorf("备份数据目录:%w", err)
}
if err := archive.Close(); err != nil {