Bug 1267683

Summary: cinder command is missing "backup-export" and "backup-import" commands
Product: Red Hat OpenStack Reporter: Lars Kellogg-Stedman <lars>
Component: python-cinderclientAssignee: Eric Harney <eharney>
Status: CLOSED NOTABUG QA Contact: nlevinki <nlevinki>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0 (Kilo)CC: eharney, jruzicka, jschluet, yeylon
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-09-30 16:37:22 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Lars Kellogg-Stedman 2015-09-30 16:27:51 UTC
Description of problem:

The "cinder" client in RHEL-OSP 7 does not appear to have the "backup-export" and "backup-import" commands, which  makes it impossible to use cinder's backup/restore feature to recover from the loss of an openstack database, and it makes it impossible to use cinder backup/restore to transfer a cinder volume between openstack environments.

Version-Release number of selected component (if applicable):

python-cinderclient-1.2.1-1.el7ost.noarch


How reproducible:

cinder backup-export 

# /usr/bin/cinder backup-export 4818703d-2caa-44b6-8b9c-8097595e21d7
[....]
error: argument <subcommand>: invalid choice: u'backup-export'

Expected behavior:

# /usr/bin/cinder backup-export 4818703d-2caa-44b6-8b9c-8097595e21d7
+----------------+------------------------------------------------------------------------------+
|    Property    |                                    Value                                     |
+----------------+------------------------------------------------------------------------------+
| backup_service |                         cinder.backup.drivers.swift                          |
|   backup_url   | eyJzdGF0dXMiOiAiYXZhaWxhYmxlIiwgIm9iamVjdF9jb3VudCI6IDIyLCAiZGVsZXRlZF9hdCI6 |
|                | IG51bGwsICJzZXJ2aWNlX21ldGFkYXRhIjogInZvbHVtZV9kYjg1MWMxNS1lMTc4LTQxYWQtYjI3 |
|                | MS05NGRkYzhiMjBhMmYvMjAxNTA5MzAxNjE4NDEvYXpfbm92YV9iYWNrdXBfNDgxODcwM2QtMmNh |
|                | YS00NGI2LThiOWMtODA5NzU5NWUyMWQ3IiwgInVzZXJfaWQiOiAiOGUxZDlmZjNmMzYxNDZiNzgw |
|                | NGRkYTU2ODQyMzQxNjMiLCAic2VydmljZSI6ICJjaW5kZXIuYmFja3VwLmRyaXZlcnMuc3dpZnQi |
|                | LCAiYXZhaWxhYmlsaXR5X3pvbmUiOiAibm92YSIsICJkZWxldGVkIjogZmFsc2UsICJjcmVhdGVk |
|                | X2F0IjogIjIwMTUtMDktMzBUMTY6MTg6NDAuMDAwMDAwIiwgInVwZGF0ZWRfYXQiOiAiMjAxNS0w |
|                | OS0zMFQxNjoxOTowMi4wMDAwMDAiLCAiZGlzcGxheV9kZXNjcmlwdGlvbiI6IG51bGwsICJwYXJl |
|                | bnRfaWQiOiBudWxsLCAiaG9zdCI6ICJpYm0taHMyMi0wNC5yaHRzLmVuZy5icnEucmVkaGF0LmNv |
|                | bSIsICJjb250YWluZXIiOiAidm9sdW1lc19iYWNrdXAiLCAidm9sdW1lX2lkIjogImRiODUxYzE1 |
|                | LWUxNzgtNDFhZC1iMjcxLTk0ZGRjOGIyMGEyZiIsICJkaXNwbGF5X25hbWUiOiBudWxsLCAiZmFp |
|                | bF9yZWFzb24iOiBudWxsLCAicHJvamVjdF9pZCI6ICI5Y2U4ZDg3NGI3NzU0MzEyOTZhMWVkN2Yx |
|                | ZTUyMjc0YyIsICJpZCI6ICI0ODE4NzAzZC0yY2FhLTQ0YjYtOGI5Yy04MDk3NTk1ZTIxZDciLCAi |
|                |                                 c2l6ZSI6IDF9                                 |
|                |                                                                              |
+----------------+------------------------------------------------------------------------------+

Comment 2 Eric Harney 2015-09-30 16:30:07 UTC
These commands were only added to the v2 client, so you'll have to use something like

# OS_VOLUME_API_VERSION=2 cinder backup-export ...

Comment 3 Lars Kellogg-Stedman 2015-09-30 16:37:22 UTC
Well, never mind.  While our earlier docs don't mention, our RHEL OSP-7 docs, such as https://access.redhat.com/documentation/en/red-hat-enterprise-linux-openstack-platform/version-7/red-hat-enterprise-linux-openstack-platform-7-command-line-interface-reference/chapter-4-block-storage-command-line-client, mention that you need to specify --os-volume-api-version=2 in order to use the backup-{import,export} commands.