// Module included in the following assemblies:
//
// * backup_and_restore/application_backup_and_restore/troubleshooting.adoc

:_mod-docs-content-type: REFERENCE
[id="oadp-debugging-oc-cli_{context}"]
= Debugging Velero resources with the OpenShift CLI tool

You can debug a failed backup or restore by checking Velero custom resources (CRs) and the `Velero` pod log with the OpenShift CLI tool.

[discrete]
[id="oc-velero-cr_{context}"]
== Velero CRs

Use the `oc describe` command to retrieve a summary of warnings and errors associated with a `Backup` or `Restore` CR:

[source,terminal]
----
$ oc describe <velero_cr> <cr_name>
----

[discrete]
[id="oc-velero-pod-logs_{context}"]
== Velero pod logs

Use the `oc logs` command to retrieve the `Velero` pod logs:

[source,terminal]
----
$ oc logs pod/<velero>
----

[discrete]
[id="oc-velero-debug-logs_{context}"]
== Velero pod debug logs

You can specify the Velero log level in the `DataProtectionApplication` resource as shown in the following example.

[NOTE]
====
This option is available starting from OADP 1.0.3.
====

[source,yaml]
----
apiVersion: oadp.openshift.io/v1alpha1
kind: DataProtectionApplication
metadata:
  name: velero-sample
spec:
  configuration:
    velero:
      logLevel: warning
----

The following `logLevel` values are available:

* `trace`
* `debug`
* `info`
* `warning`
* `error`
* `fatal`
* `panic`

It is recommended to use the `info` `logLevel` value for most logs.
