Debian Codegraph @

doc/source/cli/details.rst

raw
1 ============================================================================
2 Backup, Restore, and Disaster Recovery service (freezer) command-line client
3 ============================================================================
4
5 The freezer client is the command-line interface (CLI) for the
6 Backup, Restore, and Disaster Recovery service (freezer) API
7 and its extensions.
8
9 This chapter documents :command:`freezer` version ``1.7.1``.
10
11 For help on a specific :command:`freezer` command, enter:
12
13 .. code-block:: console
14
15 $ freezer help COMMAND
16
17 .. _freezer_command_usage:
18
19 freezer usage
20 ~~~~~~~~~~~~~
21
22 .. code-block:: console
23
24 usage: freezer [--version] [-v | -q] [--log-file LOG_FILE] [-h] [--debug]
25 [--os-auth-url OS_AUTH_URL] [--os-backup-url OS_BACKUP_URL]
26 [--os-backup-api-version OS_BACKUP_API_VERSION]
27 [--os-endpoint-type OS_ENDPOINT_TYPE]
28 [--os-password OS_PASSWORD] [--os-username OS_USERNAME]
29 [--os-token OS_TOKEN]
30 [--os-project-domain-name OS_PROJECT_DOMAIN_NAME]
31 [--os-project-domain-id OS_PROJECT_DOMAIN_ID]
32 [--os-project-name OS_PROJECT_NAME]
33 [--os-region-name OS_REGION_NAME]
34 [--os-project-id OS_PROJECT_ID]
35 [--os-user-domain-name OS_USER_DOMAIN_NAME]
36 [--os-user-domain-id OS_USER_DOMAIN_ID] [-k]
37 [--os-cacert OS_CACERT] [--os-cert OS_CERT]
38
39 .. _freezer_command_options:
40
41 freezer optional arguments
42 ~~~~~~~~~~~~~~~~~~~~~~~~~~
43
44 ``--version``
45 show program's version number and exit
46
47 ``-v, --verbose``
48 Increase verbosity of output. Can be repeated.
49
50 ``-q, --quiet``
51 Suppress output except warnings and errors.
52
53 ``--log-file LOG_FILE``
54 Specify a file to log output. Disabled by default.
55
56 ``-h, --help``
57 Show help message and exit.
58
59 ``--debug``
60 Show tracebacks on errors.
61
62 ``--os-auth-url OS_AUTH_URL``
63 Specify identity endpoint
64
65 ``--os-backup-url OS_BACKUP_URL``
66 Specify the Freezer backup service endpoint to use
67
68 ``--os-backup-api-version OS_BACKUP_API_VERSION``
69 Backup API version: 1 or 2
70
71 ``--os-endpoint-type OS_ENDPOINT_TYPE``
72 Endpoint type to select. Valid endpoint types:
73 "public" or "publicURL", "internal" or "internalURL",
74 "admin" or "adminURL"
75
76 ``--os-password OS_PASSWORD``
77 Password used for authentication with the OpenStack
78 Identity service
79
80 ``--os-username OS_USERNAME``
81 Name used for authentication with the OpenStack
82 Identity service
83
84 ``--os-token OS_TOKEN``
85 Specify an existing token to use instead of retrieving
86 one via authentication
87
88 ``--os-project-domain-name OS_PROJECT_DOMAIN_NAME``
89 Domain name containing project
90
91 ``--os-project-domain-id OS_PROJECT_DOMAIN_ID``
92 OpenStack project domain ID. Defaults to
93 ``env[OS_PROJECT_ID]``.
94
95 ``--os-project-name OS_PROJECT_NAME``
96 Project name to scope to
97
98 ``--os-region-name OS_REGION_NAME``
99 Specify the region to use
100
101 ``--os-project-id OS_PROJECT_ID``
102 Project to request authorization on
103
104 ``--os-user-domain-name OS_USER_DOMAIN_NAME``
105 User domain name
106
107 ``--os-user-domain-id OS_USER_DOMAIN_ID``
108 OpenStack user domain ID. Defaults to
109 ``env[OS_USER_DOMAIN_ID]``.
110
111 ``-k, --insecure``
112 use python-freezerclient with insecure connections
113
114 ``--os-cacert OS_CACERT``
115 Path of CA TLS certificate(s) used to verify the
116 remote server's certificate. Without this option
117 freezer looks for the default system CA certificates.
118
119 ``--os-cert OS_CERT``
120 Path of CERT TLS certificate(s) used to verify the
121 remote server's certificate.1
122
123 .. _freezer_action-create:
124
125 freezer action-create
126 ---------------------
127
128 .. code-block:: console
129
130 usage: freezer action-create [-h] --file FILE
131
132 Create an action from a file
133
134 **Optional arguments:**
135
136 ``-h, --help``
137 show this help message and exit
138
139 ``--file FILE``
140 Path to json file with the action
141
142 .. _freezer_action-delete:
143
144 freezer action-delete
145 ---------------------
146
147 .. code-block:: console
148
149 usage: freezer action-delete [-h] action_id
150
151 Delete an action from the api
152
153 **Positional arguments:**
154
155 ``action_id``
156 ID of the action
157
158 **Optional arguments:**
159
160 ``-h, --help``
161 show this help message and exit
162
163 .. _freezer_action-list:
164
165 freezer action-list
166 -------------------
167
168 .. code-block:: console
169
170 usage: freezer action-list [-h] [-f {csv,html,json,table,value,yaml}]
171 [-c COLUMN] [--max-width <integer>] [--fit-width]
172 [--print-empty] [--noindent]
173 [--quote {all,minimal,none,nonnumeric}]
174 [--limit LIMIT] [--offset OFFSET] [--search SEARCH]
175
176 List all actions for your user
177
178 **Optional arguments:**
179
180 ``-h, --help``
181 show this help message and exit
182
183 ``--limit LIMIT``
184 Specify a limit for search query
185
186 ``--offset OFFSET``
187
188 ``--search SEARCH``
189 Define a filter for the query.
190
191 If the storage of freezer-api is a ``Sqlalchemy`` database, the search option
192 must be a list of {key, value}, and it can be converted to json,
193 otherwise, search option will not work, querying all records. as follows:
194 * '[{"max_retries": 10}]'
195 * '[{"max_retries": 10}, {"mode": "nova"}]'
196 ``Note``:
197 If all key-values of the list are found in this tuple, it will be
198 filtered in, otherwise filtered out.
199
200 If the storage of freezer-api is an ``elasticsearch`` database, the search
201 option can be the same as above, or it can be a string that it isn't
202 {key, value}. plsease reference elasticsearch https://www.elastic.co/guide/en/elasticsearch/reference/current/search.html
203 as follows:
204 * '[{"max_retries": 10}]'
205 * '[{"max_retries": 10}, {"mode": "nova"}]'
206 * '["5e37946b10dc42dbb6ca3338501da2c7"]'
207
208 .. _freezer_action-show:
209
210 freezer action-show
211 -------------------
212
213 .. code-block:: console
214
215 usage: freezer action-show [-h] [-f {html,json,shell,table,value,yaml}]
216 [-c COLUMN] [--max-width <integer>] [--fit-width]
217 [--print-empty] [--noindent] [--prefix PREFIX]
218 action_id
219
220 Show a single action
221
222 **Positional arguments:**
223
224 ``action_id``
225 ID of the action
226
227 **Optional arguments:**
228
229 ``-h, --help``
230 show this help message and exit
231
232 .. _freezer_action-update:
233
234 freezer action-update
235 ---------------------
236
237 .. code-block:: console
238
239 usage: freezer action-update [-h] action_id file
240
241 Update an action from a file
242
243 **Positional arguments:**
244
245 ``action_id``
246 ID of the session
247
248 ``file``
249 Path to json file with the action
250
251 **Optional arguments:**
252
253 ``-h, --help``
254 show this help message and exit
255
256 .. _freezer_backup-delete:
257
258 freezer backup-delete
259 ---------------------
260
261 .. code-block:: console
262
263 usage: freezer backup-delete [-h] backup_uuid
264
265 Delete a backup from the api
266
267 **Positional arguments:**
268
269 ``backup_uuid``
270 UUID of the backup
271
272 **Optional arguments:**
273
274 ``-h, --help``
275 show this help message and exit
276
277 .. _freezer_backup-list:
278
279 freezer backup-list
280 -------------------
281
282 .. code-block:: console
283
284 usage: freezer backup-list [-h] [-f {csv,html,json,table,value,yaml}]
285 [-c COLUMN] [--max-width <integer>] [--fit-width]
286 [--print-empty] [--noindent]
287 [--quote {all,minimal,none,nonnumeric}]
288 [--limit LIMIT] [--offset OFFSET] [--search SEARCH]
289
290 List all backups for your user
291
292 **Optional arguments:**
293
294 ``-h, --help``
295 show this help message and exit
296
297 ``--limit LIMIT``
298 Specify a limit for search query
299
300 ``--offset OFFSET``
301
302 ``--search SEARCH``
303 Define a filter for the query. See ``freezer action-list``
304
305 .. _freezer_backup-show:
306
307 freezer backup-show
308 -------------------
309
310 .. code-block:: console
311
312 usage: freezer backup-show [-h] [-f {html,json,shell,table,value,yaml}]
313 [-c COLUMN] [--max-width <integer>] [--fit-width]
314 [--print-empty] [--noindent] [--prefix PREFIX]
315 backup_uuid
316
317 Show the metadata of a single backup
318
319 **Positional arguments:**
320
321 ``backup_uuid``
322 ID of the backup
323
324 **Optional arguments:**
325
326 ``-h, --help``
327 show this help message and exit
328
329 .. _freezer_client-delete:
330
331 freezer client-delete
332 ---------------------
333
334 .. code-block:: console
335
336 usage: freezer client-delete [-h] client_id
337
338 Delete a client from the api
339
340 **Positional arguments:**
341
342 ``client_id``
343 ID of the client
344
345 **Optional arguments:**
346
347 ``-h, --help``
348 show this help message and exit
349
350 .. _freezer_client-list:
351
352 freezer client-list
353 -------------------
354
355 .. code-block:: console
356
357 usage: freezer client-list [-h] [-f {csv,html,json,table,value,yaml}]
358 [-c COLUMN] [--max-width <integer>] [--fit-width]
359 [--print-empty] [--noindent]
360 [--quote {all,minimal,none,nonnumeric}]
361 [--limit LIMIT] [--offset OFFSET] [--search SEARCH]
362
363 List of clients registered in the api
364
365 **Optional arguments:**
366
367 ``-h, --help``
368 show this help message and exit
369
370 ``--limit LIMIT``
371 Specify a limit for search query
372
373 ``--offset OFFSET``
374
375 ``--search SEARCH``
376 Define a filter for the query. See ``freezer action-list``
377
378 .. _freezer_client-register:
379
380 freezer client-register
381 -----------------------
382
383 .. code-block:: console
384
385 usage: freezer client-register [-h] --file FILE
386
387 Register a new client
388
389 **Optional arguments:**
390
391 ``-h, --help``
392 show this help message and exit
393
394 ``--file FILE``
395 Path to json file with the client
396
397 .. _freezer_client-show:
398
399 freezer client-show
400 -------------------
401
402 .. code-block:: console
403
404 usage: freezer client-show [-h] [-f {html,json,shell,table,value,yaml}]
405 [-c COLUMN] [--max-width <integer>] [--fit-width]
406 [--print-empty] [--noindent] [--prefix PREFIX]
407 client_id
408
409 Show a single client
410
411 **Positional arguments:**
412
413 ``client_id``
414 ID of the client
415
416 **Optional arguments:**
417
418 ``-h, --help``
419 show this help message and exit
420
421 .. _freezer_job-abort:
422
423 freezer job-abort
424 -----------------
425
426 .. code-block:: console
427
428 usage: freezer job-abort [-h] job_id
429
430 Abort a running job
431
432 **Positional arguments:**
433
434 ``job_id``
435 ID of the job
436
437 **Optional arguments:**
438
439 ``-h, --help``
440 show this help message and exit
441
442 .. _freezer_job-create:
443
444 freezer job-create
445 ------------------
446
447 .. code-block:: console
448
449 usage: freezer job-create [-h] --file FILE --client CLIENT_ID
450
451 Create a new job from a file
452
453 **Optional arguments:**
454
455 ``-h, --help``
456 show this help message and exit
457
458 ``--file FILE``
459 Path to json file with the job
460
461 ``--client CLIENT_ID, -C``
462 CLIENT_ID
463 Select a client for this job
464
465 .. _freezer_job-delete:
466
467 freezer job-delete
468 ------------------
469
470 .. code-block:: console
471
472 usage: freezer job-delete [-h] job_id
473
474 Delete a job from the api
475
476 **Positional arguments:**
477
478 ``job_id``
479 ID of the job
480
481 **Optional arguments:**
482
483 ``-h, --help``
484 show this help message and exit
485
486 .. _freezer_job-get:
487
488 freezer job-get
489 ---------------
490
491 .. code-block:: console
492
493 usage: freezer job-get [-h] [--no-format] job_id
494
495 Download a job as a json file
496
497 **Positional arguments:**
498
499 ``job_id``
500 ID of the job
501
502 **Optional arguments:**
503
504 ``-h, --help``
505 show this help message and exit
506
507 ``--no-format``
508 Return a job in json without pretty print
509
510 .. _freezer_job-list:
511
512 freezer job-list
513 ----------------
514
515 .. code-block:: console
516
517 usage: freezer job-list [-h] [-f {csv,html,json,table,value,yaml}] [-c COLUMN]
518 [--max-width <integer>] [--fit-width] [--print-empty]
519 [--noindent] [--quote {all,minimal,none,nonnumeric}]
520 [--limit LIMIT] [--offset OFFSET] [--search SEARCH]
521 [--client CLIENT_ID]
522
523 List all the jobs for your user
524
525 **Optional arguments:**
526
527 ``-h, --help``
528 show this help message and exit
529
530 ``--limit LIMIT``
531 Specify a limit for search query
532
533 ``--offset OFFSET``
534
535 ``--search SEARCH``
536 Define a filter for the query. See ``freezer action-list``
537
538 ``--client CLIENT_ID, -C``
539 CLIENT_ID
540 Get jobs for a specific client
541
542 .. _freezer_job-show:
543
544 freezer job-show
545 ----------------
546
547 .. code-block:: console
548
549 usage: freezer job-show [-h] [-f {html,json,shell,table,value,yaml}]
550 [-c COLUMN] [--max-width <integer>] [--fit-width]
551 [--print-empty] [--noindent] [--prefix PREFIX]
552 job_id
553
554 Show a single job
555
556 **Positional arguments:**
557
558 ``job_id``
559 ID of the job
560
561 **Optional arguments:**
562
563 ``-h, --help``
564 show this help message and exit
565
566 .. _freezer_job-start:
567
568 freezer job-start
569 -----------------
570
571 .. code-block:: console
572
573 usage: freezer job-start [-h] job_id
574
575 Send a start signal for a job
576
577 **Positional arguments:**
578
579 ``job_id``
580 ID of the job
581
582 **Optional arguments:**
583
584 ``-h, --help``
585 show this help message and exit
586
587 .. _freezer_job-stop:
588
589 freezer job-stop
590 ----------------
591
592 .. code-block:: console
593
594 usage: freezer job-stop [-h] job_id
595
596 Send a stop signal for a job
597
598 **Positional arguments:**
599
600 ``job_id``
601 ID of the job
602
603 **Optional arguments:**
604
605 ``-h, --help``
606 show this help message and exit
607
608 .. _freezer_job-update:
609
610 freezer job-update
611 ------------------
612
613 .. code-block:: console
614
615 usage: freezer job-update [-h] job_id file
616
617 Update a job from a file
618
619 **Positional arguments:**
620
621 ``job_id``
622 ID of the job
623
624 ``file``
625 Path to json file with the job
626
627 **Optional arguments:**
628
629 ``-h, --help``
630 show this help message and exit
631
632 .. _freezer_session-add-job:
633
634 freezer session-add-job
635 -----------------------
636
637 .. code-block:: console
638
639 usage: freezer session-add-job [-h] --session-id SESSION_ID --job-id JOB_ID
640
641 Add a job to a session
642
643 **Optional arguments:**
644
645 ``-h, --help``
646 show this help message and exit
647
648 ``--session-id SESSION_ID``
649 ID of the session
650
651 ``--job-id JOB_ID``
652 ID of the job to add
653
654 .. _freezer_session-create:
655
656 freezer session-create
657 ----------------------
658
659 .. code-block:: console
660
661 usage: freezer session-create [-h] --file FILE
662
663 Create a session from a file
664
665 **Optional arguments:**
666
667 ``-h, --help``
668 show this help message and exit
669
670 ``--file FILE``
671 Path to json file with the job
672
673 .. _freezer_session-delete:
674
675 freezer session-delete
676 ----------------------
677
678 .. code-block:: console
679
680 usage: freezer session-delete [-h] session_id
681
682 Delete a session
683
684 **Positional arguments:**
685
686 ``session_id``
687 ID of the session
688
689 **Optional arguments:**
690
691 ``-h, --help``
692 show this help message and exit
693
694 .. _freezer_session-list:
695
696 freezer session-list
697 --------------------
698
699 .. code-block:: console
700
701 usage: freezer session-list [-h] [-f {csv,html,json,table,value,yaml}]
702 [-c COLUMN] [--max-width <integer>] [--fit-width]
703 [--print-empty] [--noindent]
704 [--quote {all,minimal,none,nonnumeric}]
705 [--limit LIMIT] [--offset OFFSET]
706 [--search SEARCH]
707
708 List all the sessions for your user
709
710 **Optional arguments:**
711
712 ``-h, --help``
713 show this help message and exit
714
715 ``--limit LIMIT``
716 Specify a limit for search query
717
718 ``--offset OFFSET``
719
720 ``--search SEARCH``
721 Define a filter for the query. See ``freezer action-list``
722
723 .. _freezer_session-remove-job:
724
725 freezer session-remove-job
726 --------------------------
727
728 .. code-block:: console
729
730 usage: freezer session-remove-job [-h] --session-id SESSION_ID --job-id JOB_ID
731
732 Remove a job from a session
733
734 **Optional arguments:**
735
736 ``-h, --help``
737 show this help message and exit
738
739 ``--session-id SESSION_ID``
740 ID of the session
741
742 ``--job-id JOB_ID``
743 ID of the job to add
744
745 .. _freezer_session-show:
746
747 freezer session-show
748 --------------------
749
750 .. code-block:: console
751
752 usage: freezer session-show [-h] [-f {html,json,shell,table,value,yaml}]
753 [-c COLUMN] [--max-width <integer>] [--fit-width]
754 [--print-empty] [--noindent] [--prefix PREFIX]
755 session_id
756
757 Show a single session
758
759 **Positional arguments:**
760
761 ``session_id``
762 ID of the session
763
764 **Optional arguments:**
765
766 ``-h, --help``
767 show this help message and exit
768
769 .. _freezer_session-start:
770
771 freezer session-start
772 ---------------------
773
774 .. code-block:: console
775
776 usage: freezer session-start [-h] --session-id SESSION_ID --job-id JOB_ID
777 --job-tag JOB_TAG
778
779 Start a session
780
781 **Optional arguments:**
782
783 ``-h, --help``
784 show this help message and exit
785
786 ``--session-id SESSION_ID``
787 ID of the session
788
789 ``--job-id JOB_ID``
790 ID of the job
791
792 ``--job-tag JOB_TAG``
793 Job tag value
794
795 .. _freezer_session-update:
796
797 freezer session-update
798 ----------------------
799
800 .. code-block:: console
801
802 usage: freezer session-update [-h] session_id file
803
804 Update a session from a file
805
806 **Positional arguments:**
807
808 ``session_id``
809 ID of the session
810
811 ``file``
812 Path to json file with the session
813
814 **Optional arguments:**
815
816 ``-h, --help``
817 show this help message and exit
818