parent
f00be23e02
commit
d99555a4a8
@ -11,6 +11,7 @@
|
||||
|
||||
- [Backup Reports] Report not sent if reportWhen failure and at least a VM is successfull [#3181](https://github.com/vatesfr/xen-orchestra/issues/3181) (PR [#3185](https://github.com/vatesfr/xen-orchestra/pull/3185))
|
||||
- [Backup NG] Correctly migrate report setting from legacy jobs [#3180](https://github.com/vatesfr/xen-orchestra/issues/3180) (PR [#3206](https://github.com/vatesfr/xen-orchestra/pull/3206))
|
||||
- [Backup NG] remove incomplete XVA files [#3159](https://github.com/vatesfr/xen-orchestra/issues/3159) (PR [#3215](https://github.com/vatesfr/xen-orchestra/pull/3215))
|
||||
|
||||
### Released packages
|
||||
|
||||
|
@ -155,6 +155,7 @@ const getVmBackupDir = (uuid: string) => `${BACKUP_DIR}/${uuid}`
|
||||
const isHiddenFile = (filename: string) => filename[0] === '.'
|
||||
const isMetadataFile = (filename: string) => filename.endsWith('.json')
|
||||
const isVhd = (filename: string) => filename.endsWith('.vhd')
|
||||
const isXva = (filename: string) => filename.endsWith('.xva')
|
||||
|
||||
const listReplicatedVms = (
|
||||
xapi: Xapi,
|
||||
@ -966,6 +967,16 @@ export default class BackupNg {
|
||||
async (taskId, { handler, id: remoteId }) => {
|
||||
const fork = forkExport()
|
||||
|
||||
// remove incomplete XVAs
|
||||
await asyncMap(
|
||||
handler.list(vmDir, {
|
||||
filter: filename =>
|
||||
isHiddenFile(filename) && isXva(filename),
|
||||
prependDir: true,
|
||||
}),
|
||||
file => handler.unlink(file)
|
||||
)::ignoreErrors()
|
||||
|
||||
const oldBackups: MetadataFull[] = (getOldEntries(
|
||||
exportRetention,
|
||||
await this._listVmBackups(
|
||||
|
Loading…
Reference in New Issue
Block a user