Mount Ceph Snapshots for file level backup

Hi,
the commands in the thread you linked to are not specific to 'Borgbackup'. In this post you have the all the commands you'll need. If it's a VM and not a container you'll need to specify the partition as well, e.g.
Code:
mount -o noload /dev/rbd/rbd-kvm/vm-103-disk-0@snap-part1 /path/to/mountpoint/
Once mounted, you can use your favorite file-level backup tool. And after doing the backup you can do the rest of those commands to unmount and destroy the snapshot again.
 
Hello,

now it nearly works, but I get "already mounted or mount point busy". I cannot find any reasons.

rbd ls pool2-1 :
vm-100-disk-0
vm-101-disk-1

rbd --pool pool2-1 snap create pool2-1/vm-101-disk-1@test

rbd --pool pool2-1 snap ls vm-101-disk-1 :
SNAPID NAME SIZE PROTECTED TIMESTAMP
28 test 20 GiB Tue Dec 10 16:20:40 2019

rbd map --read-only pool2-1/vm-101-disk-1@test :
/dev/rbd0

rbd showmapped :
id pool namespace image snap device
0 pool2-1 vm-101-disk-1 test /dev/rbd0

mkdir -p /mnt/tmp

kpartx -va /dev/rbd/pool2-1/vm-101-disk-1@test :
add map vm-101-disk-1@test1 (253:3): 0 8388608 linear 252:0 2048
add map vm-101-disk-1@test2 (253:4): 0 33552384 linear 252:0 8390656

mount -o noload /dev/rbd/pool2-1/vm-101-disk-1@test-part2 /mnt/tmp :
mount: /mnt/tmp: /dev/rbd0p2 already mounted or mount point busy.

lsof /dev/rbd0p2 : <nothing>
lsof /dev/rbd/pool2-1/vm-101-disk-1@test-part2 : <nothing>

kpartx -vd /dev/rbd/pool2-1/vm-101-disk-1@test :
del devmap : vm-101-disk-1@test2
del devmap : vm-101-disk-1@test1

rbd unmap /dev/rbd/pool2-1/vm-101-disk-1@test

sync

rbd --pool pool2-1 snap ls vm-101-disk-1 :
SNAPID NAME SIZE PROTECTED TIMESTAMP
28 test 20 GiB Tue Dec 10 16:20:40 2019

rbd snap rm pool2-1/vm-101-disk-1@test :
Removing snap: 100% complete...done.
 
The problem is probably the kpartx commands. Please try again without those.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!