Skip to content

NAS Backup - Support restore to CEPH RBD #12087

@Luskan777

Description

@Luskan777

problem

Hello, I'm using NAS backup, and I'm having trouble restoring backups to the primary storage Ceph RBD.

Currently, the documentation states that the Ceph primary storage type is supported, but I have doubts as to whether it is actually supported, or if the documentation refers to CephFS.

I can perform the backup normally, which leads me to believe that it is indeed supported; however, when restoring the backup, it returns the following errors:

KVM agent logs:

2025-11-17 18:01:42,288 DEBUG [utils.script.Script] (AgentRequest-Handler-2:[]) (logid:acdce457) Executing command [/bin/bash -c sudo mount -t nfs 10.15.30.102:/mnt/backup /usr/share/cloudstack-agent/tmp/csbackup.FIYta12343983814195024402 ].
2025-11-17 18:01:42,401 DEBUG [utils.script.Script] (AgentRequest-Handler-2:[]) (logid:acdce457) Successfully executed process [95184] for command [/bin/bash -c sudo mount -t nfs 10.15.30.102:/mnt/backup /usr/share/cloudstack-agent/tmp/csbackup.FIYta12343983814195024402 ].
2025-11-17 18:01:42,401 DEBUG [utils.script.Script] (AgentRequest-Handler-2:[]) (logid:acdce457) Executing command [/bin/bash -c rsync -az /usr/share/cloudstack-agent/tmp/csbackup.FIYta12343983814195024402/i-2-8160-VM/2025.11.17.15.31.11/root.f20043f7-1bf9-4bc2-98b1-b8e00cf5b97f.qcow2 /mnt/39eb8eaf-5196-35bf-8758-ddad77f491e9/f20043f7-1bf9-4bc2-98b1-b8e00cf5b97f ].
2025-11-17 18:01:42,411 WARN  [utils.script.Script] (AgentRequest-Handler-2:[]) (logid:acdce457) Execution of process [95200] for command [/bin/bash -c rsync -az /usr/share/cloudstack-agent/tmp/csbackup.FIYta12343983814195024402/i-2-8160-VM/2025.11.17.15.31.11/root.f20043f7-1bf9-4bc2-98b1-b8e00cf5b97f.qcow2 /mnt/39eb8eaf-5196-35bf-8758-ddad77f491e9/f20043f7-1bf9-4bc2-98b1-b8e00cf5b97f ] failed.
2025-11-17 18:01:42,411 DEBUG [utils.script.Script] (AgentRequest-Handler-2:[]) (logid:acdce457) Exit value of process [95200] for command [/bin/bash -c rsync -az /usr/share/cloudstack-agent/tmp/csbackup.FIYta12343983814195024402/i-2-8160-VM/2025.11.17.15.31.11/root.f20043f7-1bf9-4bc2-98b1-b8e00cf5b97f.qcow2 /mnt/39eb8eaf-5196-35bf-8758-ddad77f491e9/f20043f7-1bf9-4bc2-98b1-b8e00cf5b97f ] is [3].
2025-11-17 18:01:42,411 WARN  [utils.script.Script] (AgentRequest-Handler-2:[]) (logid:acdce457) Process [95200] for command [/bin/bash -c rsync -az /usr/share/cloudstack-agent/tmp/csbackup.FIYta12343983814195024402/i-2-8160-VM/2025.11.17.15.31.11/root.f20043f7-1bf9-4bc2-98b1-b8e00cf5b97f.qcow2 /mnt/39eb8eaf-5196-35bf-8758-ddad77f491e9/f20043f7-1bf9-4bc2-98b1-b8e00cf5b97f ] encountered the error: [3].
2025-11-17 18:01:42,412 DEBUG [utils.script.Script] (AgentRequest-Handler-2:[]) (logid:acdce457) Executing command [/bin/bash -c sudo umount /usr/share/cloudstack-agent/tmp/csbackup.FIYta12343983814195024402 ].
2025-11-17 18:01:42,471 DEBUG [utils.script.Script] (AgentRequest-Handler-2:[]) (logid:acdce457) Successfully executed process [95202] for command [/bin/bash -c sudo umount /usr/share/cloudstack-agent/tmp/csbackup.FIYta12343983814195024402 ].
2025-11-17 18:01:42,471 ERROR [resource.wrapper.LibvirtRestoreBackupCommandWrapper] (AgentRequest-Handler-2:[]) (logid:acdce457) Failed to restore backup for VM: i-2-8160-VM. Details: Unable to restore contents from the backup volume [f20043f7-1bf9-4bc2-98b1-b8e00cf5b97f].
2025-11-17 18:01:42,471 DEBUG [cloud.agent.Agent] (AgentRequest-Handler-2:[]) (logid:acdce457) Seq 39-3496200685723058480:  { Ans: , MgmtId: 206863093930034, via: 39, Ver: v1, Flags: 110, [{"org.apache.cloudstack.backup.BackupAnswer":{"result":"false","details":"Failed to restore backup for VM: i-2-8160-VM. Details: Unable to restore contents from the backup volume [f20043f7-1bf9-4bc2-98b1-b8e00cf5b97f].","wait":"0","bypassHostMaintenance":"false"}}] }

If we look closely at the command it is trying to execute to restore the backup, we find the following command:

/bin/bash -c rsync -az /usr/s
hare/cloudstack-agent/tmp/csbackup.FIYta12343983814195024402/i-2-8160-VM/2025.11.17.15.31.11/root.f20043f7-1bf9-4bc2-98b1-b8e00cf5b97f.qcow2 /mnt
/39eb8eaf-5196-35bf-8758-ddad77f491e9/f20043f7-1bf9-4bc2-98b1-b8e00cf5b97f

It seems that it is trying to restore the volume to a primary file system-based storage (NFS, ShareMountPoint, LocalStorage...)
We can confirm this because the path /mnt
/39eb8eaf-5196-35bf-8758-ddad77f491e9/f20043f7-1bf9-4bc2-98b1-b8e00cf5b97f has the ID of my primary storage (39eb8eaf-5196-35bf-8758-ddad77f491e9)

versions

Version: 4.21.0
Agents: KVM (Ubuntu 22)
Zone Type: Advanced Network
Primary Storage: Ceph RBD
Secondary Storage: NFS

The steps to reproduce the bug

  1. Add Ceph (RBD) as primary storage
  2. Add NFS Backup Repository
  3. Deploy Instance
  4. Execute Backup on the virtual machine
  5. Restore virtual machine backup (restoreBackup)
    ...

What to do about it?

Restore backups of Ceph RBD-based volumes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions