OVHcloud Community

Welcome to your community space. Ask questions, search for information, post content, and interact with other OVHcloud Community members.

Automatic Block storage backup - how?


The workflow management permits to schedule backups of a cloud instance. What about the same for Block storage? I can only see a manuel backup possibility.


I have the same problematic, anyone can help us ? Please


Hi @Los & @FabianV

As far as I understand you must program it in a bash script or your control panel must have the option to do it by linking the Backup Storage accesses provided by OVH




The usual issue with block storage is the fact it is best to detach the volume from the instance before doing backup of it. Having said that if we were just to detach the disk from the instance for a snapshot, that can cause some issue also. It is best that the volume is unmounted from the operating system level first before doing it on OpenStack level. Then once the disk is detached you can do a backup.

Why detaching before backup is ideal? Well, when you snapshot a instance, the host sends a filesystem freeze signal to the guest operating system (your instance) via the QEMU Guest Agent. This ensures consistency and integrity of your data during the backup. Once it is done, the host sends to the guest OS signal that it can unfreeze the filesystem. This mechanism does not exist when you are backing up the volume. Which is why it is better to detach first so that you can ensure you have consistency and integrity of your data during the backup (no writes happening to the disk during backup).

Since OVHcloud does not have access to customers instances to unmount the volume on the operating system level, it is not ideal for us to detach the volume as it is not a clean way. It would be like removing a disk from a server while it is running and it is not a raid. Any application that uses it could have issues since the disk would just would disappear.

You can force a backup of the volume when it is in use. It is personal choice if you want to or not.

You can automate it with something like cron job that executes a script. The script could either the OpenStack API or the OVH API.

  1. On the instance you should umount the volume first (operating system level)
  2. Once that is done, you can detach the volume:
    OpenStack API: openstack server remove volume
    OVH API:{serviceName}/volume/{volumeId}/detach#POST
  3. Start the backup:
    OpenStack API: openstack volume backup create --name
    OVH API:{serviceName}/volume/{volumeId}/snapshot#POST
  4. Attach the volume back to the instance
    OpenStack API: openstack server add volume
    OVH API:{serviceName}/volume/{volumeId}/attach#POST
  5. Mount the volume again on the operating system level

Question on Block Storage Snapshots utility


Thank you @AdamO for your answer.

I created a bash script able to make backups and/or snapshots through a third party block storage that I synchronize. My script avoids detaching and backing up a block storage during its use and also avoids heavy performance loss through synchronization.

I plan to comment it and share it in the next few days to the community and on Github.

Don’t hesitate to contact me if you want to talk about it or need me to share it in the meantime.



In the context of the SBG fire: this “backup” step is it only a snapshot, or is it a proper backup like and instance backup to different storage?


Hi Los,
I’m interested in your script :wink:
Did you share it somewhere?
Thank you!


Hi, I didn’t take a moment to do it, I have to explain the script. I try to do it today.


This is the repository of my script :

Don’t hesitate to contact me if you have questions. I will complete the read me.


Thank you very much! It looks great, I will look further into it when I get some time.