Skip to content

Conversation

@skozina
Copy link
Contributor

@skozina skozina commented Aug 12, 2025

Add the same checks in CreateCustomVolumeFromBackup() like we have in CreateCustomVolumeFromISO().
This changes the error message in case the volume already exists from:

# lxc storage volume import default backup2.tar.gz backup
Error: Create custom volume from backup: Error inserting volume "backup" for project "default" in pool "default" of type "custom" into database "UNIQUE constraint failed: index 'storage_volumes_unique_storage_pool_id_node_id_project_id_name_type'"

to

# lxc storage volume import default backup2.tar.gz backup
Error: Create custom volume from backup: Cannot create volume, already exists on target storage

@tomponline tomponline merged commit 781428d into canonical:main Aug 12, 2025
30 of 31 checks passed
@tomponline
Copy link
Member

Thanks!

@skozina skozina deleted the backup-volexists branch August 13, 2025 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants