You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: backup_and_restore/application_backup_and_restore/backing_up_and_restoring/backing-up-applications.adoc
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ toc::[]
8
8
9
9
You back up applications by creating a xref:../../../backup_and_restore/application_backup_and_restore/backing_up_and_restoring/backing-up-applications.adoc#oadp-creating-backup-cr_backing-up-applications[`Backup`] custom resource (CR).
10
10
11
-
The `Backup` CR backs up Kubernetes resources and internal images by saving them as an archive file on S3 object storage.
11
+
The `Backup` CR creates backup files for Kubernetes resources and internal images, on S3 object storage, and snapshots for persistent volumes (PVs), if the cloud provider uses a native snapshot API or the xref:../../../backup_and_restore/application_backup_and_restore/backing_up_and_restoring/backing-up-applications.adoc#oadp-backing-up-pvs-csi_backing-up-applications[Container Storage Interface (CSI)] to create snapshots, such as OpenShift Container Storage 4. For more information, see xref:../../../storage/container_storage_interface/persistent-storage-csi-snapshots.adoc#persistent-storage-csi-snapshots[CSI volume snapshots].
12
12
13
13
:FeatureName: The `CloudStorage` API for S3 storage
You can debug Velero custom resources (CRs) by using the xref:../../backup_and_restore/application_backup_and_restore/troubleshooting.adoc#oadp-debugging-oc-cli_oadp-troubleshooting[OpenShift CLI tool] or the xref:../../backup_and_restore/application_backup_and_restore/troubleshooting.adoc#migration-debugging-velero-resources_oadp-troubleshooting[Velero CLI tool]. The Velero CLI tool provides more detailed logs and information.
14
+
15
+
You can check xref:../../backup_and_restore/application_backup_and_restore/troubleshooting.adoc#oadp-installation-issues_oadp-troubleshooting[installation issues], xref:../../backup_and_restore/application_backup_and_restore/troubleshooting.adoc#oadp-backup-restore-cr-issues_oadp-troubleshooting[backup and restore CR issues], and xref:../../backup_and_restore/application_backup_and_restore/troubleshooting.adoc#oadp-restic-issues_oadp-troubleshooting[Restic issues].
16
+
17
+
You can collect logs, CR information, and Prometheus metric data by using the xref:../../backup_and_restore/application_backup_and_restore/troubleshooting.adoc#migration-using-must-gather_oadp-troubleshooting[`must-gather` tool].
= Using the Velero CLI to debug Backup and Restore CRs
8
+
= Debugging Velero resources with the Velero CLI tool
8
9
9
-
You can debug the `Backup` and `Restore` custom resources (CRs) and partial migration failures with the Velero command line interface (CLI). The Velero CLI runs in the `velero` pod.
10
+
You can debug `Backup` and `Restore` custom resources (CRs) and retrieve logs with the Velero CLI tool.
10
11
12
+
The Velero CLI tool provides more detailed information than the OpenShift CLI tool.
13
+
14
+
[discrete]
11
15
[id="velero-command-syntax_{context}"]
12
-
== Velero command syntax
16
+
== Syntax
17
+
18
+
Use the `oc exec` command to run a Velero CLI command:
13
19
14
-
Velero CLI commands use the following syntax:
15
-
[source,terminal]
20
+
[source,terminal,subs="attributes+"]
16
21
----
17
-
$ oc exec $(oc get pods -n openshift-migration -o name | grep velero) -- ./velero <resource> <command> <resource_id>
22
+
$ oc exec $(oc get pods -n {namespace} -o name | grep velero) \
You can collect logs, metrics, and information about {MTC-short} custom resources by using the `must-gather` tool.
11
+
You can collect logs, metrics, and information about {local-product} custom resources by using the `must-gather` tool.
13
12
14
13
The `must-gather` data must be attached to all customer cases.
15
14
15
+
ifdef::troubleshooting-3-4,troubleshooting-mtc[]
16
16
You can collect data for a one-hour or a 24-hour period and view the data with the Prometheus console.
17
+
endif::[]
18
+
ifdef::oadp-troubleshooting[]
19
+
You can run the `must-gather` tool with the following data collection options:
20
+
21
+
* Full `must-gather` data collection collects Prometheus metrics, pod logs, and Velero CR information for all namespaces where the OADP Operator is installed.
22
+
* Essential `must-gather` data collection collects pod logs and Velero CR information for a specific duration of time, for example, one hour or 24 hours. Prometheus metrics and duplicate logs are not included.
23
+
* `must-gather` data collection with timeout. Data collection can take a long time if there are many failed `Backup` CRs. You can improve performance by setting a timeout value.
24
+
* Prometheus metrics data dump downloads an archive file containing the metrics data collected by Prometheus.
25
+
endif::[]
17
26
18
27
.Prerequisites
19
28
@@ -23,29 +32,70 @@ You can collect data for a one-hour or a 24-hour period and view the data with t
23
32
.Procedure
24
33
25
34
. Navigate to the directory where you want to store the `must-gather` data.
26
-
. Run the `oc adm must-gather` command:
27
-
28
-
* To gather data for the past hour:
35
+
. Run the `oc adm must-gather` command for one of the following data collection options:
36
+
37
+
ifdef::troubleshooting-3-4,troubleshooting-mtc[]
38
+
* To collect data for the past hour:
39
+
endif::[]
40
+
ifdef::oadp-troubleshooting[]
41
+
* Full `must-gather` data collection, including Prometheus metrics:
The data is saved as `/must-gather/must-gather.tar.gz`. You can upload this file to a support case on the link:https://access.redhat.com/[Red Hat Customer Portal].
49
+
The data is saved as `must-gather/must-gather.tar.gz`. You can upload this file to a support case on the link:https://access.redhat.com/[Red Hat Customer Portal].
36
50
37
-
* To gather data for the past 24 hours:
51
+
ifdef::oadp-troubleshooting[]
52
+
* Essential `must-gather` data collection, without Prometheus metrics, for a specific time duration:
53
+
+
54
+
[source,terminal,subs="attributes+"]
55
+
----
56
+
$ oc adm must-gather --image={must-gather} \
57
+
-- /usr/bin/gather_<time>_essential <1>
58
+
----
59
+
<1> Specify the time in hours. Allowed values are `1h`, `6h`, `24h`, `72h`, or `all`, for example, `gather_1h_essential` or `gather_all_essential`.
0 commit comments