Skip to content

Commit

Permalink
Fix sync.btrfs snaps in .osnap/last/next instead of .osnap/last
Browse files Browse the repository at this point in the history
  • Loading branch information
cvaroqui committed Mar 20, 2023
1 parent c86d08a commit 6dfac6e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions opensvc/drivers/resource/sync/btrfs/__init__.py
Expand Up @@ -420,8 +420,10 @@ def remove_dst(self, node):
def rename_src_snap_next(self):
src = self.src_next_dir()
dst = self.src_last_dir()
cmd = ["mv", "-v", src, dst]
return [subprocess.list2cmdline(cmd)]
return [
subprocess.list2cmdline(["rm", "-rf", dst]),
subprocess.list2cmdline(["mv", "-v", src, dst]),
]

def rename_dst_snap_next(self, node):
src = self.dst_next_dir(node)
Expand Down

0 comments on commit 6dfac6e

Please sign in to comment.