mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-19 15:16:33 +00:00
Overwrite snapshot if slug allready exsist (#2146)
This commit is contained in:
parent
c6e3787681
commit
9744f3354b
@ -98,8 +98,10 @@ class SnapshotManager(CoreSysAttributes):
|
||||
|
||||
# Already exists?
|
||||
if snapshot.slug in self.snapshots_obj:
|
||||
_LOGGER.error("Snapshot %s already exists!", snapshot.slug)
|
||||
return None
|
||||
_LOGGER.warning(
|
||||
"Snapshot %s already exists! overwriting snapshot", snapshot.slug
|
||||
)
|
||||
self.remove(self.get(snapshot.slug))
|
||||
|
||||
# Move snapshot to backup
|
||||
tar_origin = Path(self.sys_config.path_backup, f"{snapshot.slug}.tar")
|
||||
|
Loading…
x
Reference in New Issue
Block a user