Skip to content

Commit 79d0e21

Browse files
author
Steve Martinelli
committed
Command doc: backup
Change-Id: Iecd4dbddea637bd6540d94b37253a9ba434c9db3
1 parent 55b8540 commit 79d0e21

3 files changed

Lines changed: 116 additions & 12 deletions

File tree

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
======
2+
backup
3+
======
4+
5+
Volume v1
6+
7+
backup create
8+
-------------
9+
10+
Create new backup
11+
12+
.. program:: backup create
13+
.. code:: bash
14+
15+
os backup create
16+
[--container <container>]
17+
[--name <name>]
18+
[--description <description>]
19+
<volume>
20+
21+
.. option:: --container <container>
22+
23+
Optional backup container name
24+
25+
.. option:: --name <name>
26+
27+
Name of the backup
28+
29+
.. option:: --description <description>
30+
31+
Description of the backup
32+
33+
.. _backup_create-backup:
34+
.. describe:: <volume>
35+
36+
Volume to backup (name or ID)
37+
38+
backup delete
39+
-------------
40+
41+
Delete backup(s)
42+
43+
.. program:: backup delete
44+
.. code:: bash
45+
46+
os backup delete
47+
<backup> [<backup> ...]
48+
49+
.. _backup_delete-backup:
50+
.. describe:: <backup>
51+
52+
Backup(s) to delete (ID only)
53+
54+
backup list
55+
-----------
56+
57+
List backups
58+
59+
.. program:: backup list
60+
.. code:: bash
61+
62+
os backup list
63+
64+
.. _backup_list-backup:
65+
.. option:: --long
66+
67+
List additional fields in output
68+
69+
backup restore
70+
--------------
71+
72+
Restore backup
73+
74+
.. program:: backup restore
75+
.. code:: bash
76+
77+
os backup restore
78+
<backup>
79+
<volume>
80+
81+
.. _backup_restore-backup:
82+
.. describe:: <backup>
83+
84+
Backup to restore (ID only)
85+
86+
.. describe:: <volume>
87+
88+
Volume to restore to (name or ID)
89+
90+
backup show
91+
-----------
92+
93+
Display backup details
94+
95+
.. program:: backup show
96+
.. code:: bash
97+
98+
os backup show
99+
<backup>
100+
101+
.. _backup_show-backup:
102+
.. describe:: <backup>
103+
104+
Backup to display (ID only)

‎doc/source/commands.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ referring to both Compute and Volume quotas.
7272
* ``access token``: Identity - long-lived OAuth-based token
7373
* ``availability zone``: (**Compute**) a logical partition of hosts or volume services
7474
* ``aggregate``: (**Compute**) a grouping of servers
75-
* ``backup``: Volume - a volume copy
75+
* ``backup``: (**Volume**) a volume copy
7676
* ``catalog``: (**Identity**) service catalog
7777
* ``console log``: (**Compute**) server console text dump
7878
* ``console url``: (**Compute**) server remote console URL

‎openstackclient/volume/v1/backup.py‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828

2929
class CreateBackup(show.ShowOne):
30-
"""Create backup command"""
30+
"""Create new backup"""
3131

3232
log = logging.getLogger(__name__ + '.CreateBackup')
3333

@@ -36,13 +36,13 @@ def get_parser(self, prog_name):
3636
parser.add_argument(
3737
'volume',
3838
metavar='<volume>',
39-
help='The name or ID of the volume to backup',
39+
help='Volume to backup (name or ID)',
4040
)
4141
parser.add_argument(
4242
'--container',
4343
metavar='<container>',
4444
required=False,
45-
help='Optional backup container name.',
45+
help='Optional backup container name',
4646
)
4747
parser.add_argument(
4848
'--name',
@@ -84,7 +84,7 @@ def get_parser(self, prog_name):
8484
'backups',
8585
metavar='<backup>',
8686
nargs="+",
87-
help='Backup(s) to delete (name or ID)',
87+
help='Backup(s) to delete (ID only)',
8888
)
8989
return parser
9090

@@ -99,7 +99,7 @@ def take_action(self, parsed_args):
9999

100100

101101
class ListBackup(lister.Lister):
102-
"""List backup command"""
102+
"""List backups"""
103103

104104
log = logging.getLogger(__name__ + '.ListBackup')
105105

@@ -156,7 +156,7 @@ def _format_volume_id(volume_id):
156156

157157

158158
class RestoreBackup(command.Command):
159-
"""Restore backup command"""
159+
"""Restore backup"""
160160

161161
log = logging.getLogger(__name__ + '.RestoreBackup')
162162

@@ -165,11 +165,11 @@ def get_parser(self, prog_name):
165165
parser.add_argument(
166166
'backup',
167167
metavar='<backup>',
168-
help='ID of backup to restore')
168+
help='Backup to restore (ID only)')
169169
parser.add_argument(
170170
'volume',
171-
metavar='<dest-volume>',
172-
help='ID of volume to restore to')
171+
metavar='<volume>',
172+
help='Volume to restore to (name or ID)')
173173
return parser
174174

175175
def take_action(self, parsed_args):
@@ -184,7 +184,7 @@ def take_action(self, parsed_args):
184184

185185

186186
class ShowBackup(show.ShowOne):
187-
"""Show backup command"""
187+
"""Display backup details"""
188188

189189
log = logging.getLogger(__name__ + '.ShowBackup')
190190

@@ -193,7 +193,7 @@ def get_parser(self, prog_name):
193193
parser.add_argument(
194194
'backup',
195195
metavar='<backup>',
196-
help='Name or ID of backup to display')
196+
help='Backup to display (ID only)')
197197
return parser
198198

199199
def take_action(self, parsed_args):

0 commit comments

Comments
 (0)