Skip to content

Commit 9b74f9b

Browse files
committed
improve backup procedure for large shared data volumes
1 parent 49af674 commit 9b74f9b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

hasadna_k8s/ceph/pvc_backup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def main_shared(namespace, pvc_name, pv):
6464
print(f'Backup name: {backup_name}')
6565
subprocess.check_call(['ceph', 'fs', 'subvolume', 'snapshot', 'create', fs_name, sub_volume_name, backup_name, 'csi'])
6666
try:
67-
os.mkdir('/mnt/ceph')
67+
os.makedirs('/mnt/ceph', exist_ok=True)
6868
subprocess.check_call(['ceph-fuse', '/mnt/ceph'])
6969
try:
7070
paths = [path for path in iglob(os.path.join('/mnt/ceph/volumes', group_name, sub_volume_name, '.snap', backup_name)) if os.path.isdir(path)]

0 commit comments

Comments
 (0)