mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-06-05 09:10:49 +00:00
Merge pull request #1085 from balena-io/restore-fix
device-state: correctly call volume creation on backup restore step
This commit is contained in:
commit
806adb9ef6
@ -452,7 +452,7 @@ module.exports = class DeviceState extends EventEmitter
|
|||||||
volume.remove()
|
volume.remove()
|
||||||
.catch(NotFoundError, _.noop)
|
.catch(NotFoundError, _.noop)
|
||||||
.then =>
|
.then =>
|
||||||
@applications.volumes.createFromPath({ appId, name: volumeName, config: volumes[volumeName] }, path.join(backupPath, volumeName))
|
@applications.volumes.createFromPath({ appId, name: volumeName }, volumes[volumeName], path.join(backupPath, volumeName))
|
||||||
else
|
else
|
||||||
throw new Error("Invalid backup: #{volumeName} is present in backup but not in target state")
|
throw new Error("Invalid backup: #{volumeName} is present in backup but not in target state")
|
||||||
.then ->
|
.then ->
|
||||||
|
Loading…
x
Reference in New Issue
Block a user