镜像自地址
https://github.com/tuna/tunasync.git
已同步 2025-12-07 15:06:47 +00:00
existed working dir
这个提交包含在:
@@ -1,6 +1,7 @@
|
|||||||
#!/usr/bin/env python2
|
#!/usr/bin/env python2
|
||||||
# -*- coding:utf-8 -*-
|
# -*- coding:utf-8 -*-
|
||||||
import sh
|
import sh
|
||||||
|
import os
|
||||||
|
|
||||||
|
|
||||||
class BtrfsVolumeError(Exception):
|
class BtrfsVolumeError(Exception):
|
||||||
@@ -33,6 +34,9 @@ class BtrfsHook(object):
|
|||||||
|
|
||||||
def _create_working_snapshot(self):
|
def _create_working_snapshot(self):
|
||||||
self._ensure_subvolume()
|
self._ensure_subvolume()
|
||||||
|
if os.path.exists(self.working_dir):
|
||||||
|
print("Warning: working dir existed, are you sure no rsync job is running?")
|
||||||
|
else:
|
||||||
# print("btrfs subvolume snapshot {} {}".format(self.service_dir, self.working_dir))
|
# print("btrfs subvolume snapshot {} {}".format(self.service_dir, self.working_dir))
|
||||||
sh.btrfs("subvolume", "snapshot", self.service_dir, self.working_dir)
|
sh.btrfs("subvolume", "snapshot", self.service_dir, self.working_dir)
|
||||||
|
|
||||||
|
|||||||
在新工单中引用
屏蔽一个用户