lxd/storage_ceph_utils.go
func (s *storageCeph) cephRBDVolumeDumpToFile(sourceVolumeName string, file string) error {
	logger.Debugf(`Dumping RBD storage volume "%s" to "%s"`, sourceVolumeName, file)

	args := []string{
		"export",
		"--id", s.UserName,
		"--cluster", s.ClusterName,
		sourceVolumeName,
		file,
	}

	rbdSendCmd := exec.Command("rbd", args...)
	err := rbdSendCmd.Run()
	if err != nil {
		return err
	}

	logger.Debugf(`Dumped RBD storage volume "%s" to "%s"`, sourceVolumeName, file)
	return nil
}
func (s *storageCeph) cephRBDVolumeDumpToFile(sourceVolumeName string, file string) error {
	logger.Debugf(`Dumping RBD storage volume "%s" to "%s"`, sourceVolumeName, file)

	args := []string{
		"export",
		"--id", s.UserName,
		"--cluster", s.ClusterName,
		sourceVolumeName,
		file,
	}

	rbdSendCmd := exec.Command("rbd", args...)
	err := rbdSendCmd.Run()
	if err != nil {
		return err
	}

	logger.Debugf(`Dumped RBD storage volume "%s" to "%s"`, sourceVolumeName, file)
	return nil
}
// copyWithSnapshots creates a non-sparse copy of a container including its
// snapshots
// This does not introduce a dependency relation between the source RBD storage
// volume and the target RBD storage volume.