Re: RBD Backup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On 11/21/2012 09:37 PM, Stefan Priebe - Profihost AG wrote:
Hello list,

is there a recommanded way to backup rbd images / disks?

Or is it just
rbd snap create BACKUP
rbd export BACKUP

You should use:

rbd export --snap BACKUP <img> <dest>

rbd snap rm BACKUP

Is the snap needed at all? Or is an export save? Is there a way to make
sure the image is consistent?


While reading rbd.cc it doesn't seem like running export on a running VM is safe, so you should snapshot before.

The snapshot isn't consistent since it has no way of telling the VM to flush it's buffers.

To make it consistent you have to run "sync" (In the VM) just prior to creating the snapshot.

Is it possible to use the BACKUP file as a loop device or something else
so that i'm able to mount the partitions from the backup file?


You can do something like:

rbd export --snap BACKUP image1 /mnt/backup/image1.img
losetup /mnt/backup/image1.img
kpartx -a /dev/loop0

Now you will have the partitions from the RBD image available in /dev/mapper/loop0pX

Wido

Thanks!

Greets Stefan
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux