mirror of
https://github.com/vatesfr/xen-orchestra.git
synced 2026-09-11 06:29:51 -05:00
When restoring a backup, try to reuse data from an existing snapshot. We use this snasphot and apply a reverse differential of the changes between the backup and the snapshot Prerequisite : a uninterrupted delta chain from the backup being restored to a backup that still have its snapshot on the host
12 lines
279 B
JavaScript
12 lines
279 B
JavaScript
'use strict'
|
|
|
|
const { dirname, resolve } = require('path')
|
|
|
|
const resolveRelativeFromFile = (file, path) => {
|
|
if (file.startsWith('/')) {
|
|
return resolve(dirname(file), path)
|
|
}
|
|
return resolve('/', dirname(file), path).slice(1)
|
|
}
|
|
module.exports = resolveRelativeFromFile
|