---
title: "analyze schema reference"
url: "https://docs.yugabyte.com/stable/yugabyte-voyager/reference/schema-migration/analyze-schema/"
---

# analyze schema reference

YugabyteDB Voyager analyze schema reference

yb-voyager analyze schema

[Analyse the PostgreSQL schema](/stable/yugabyte-voyager/migrate/migrate-steps/#analyze-schema "Analyse the PostgreSQL schema") dumped in the export schema step.

## Syntax

```sh
yb-voyager analyze-schema [ <arguments> ... ]
```

### Arguments

The following table lists the valid CLI flags and parameters for `analyze-schema` command.

When run at the same time, flags take precedence over configuration flag settings.

CLI flag

Config file parameter Description 

--output-format

```yaml
analyze-schema:
  output-format:
```

Format for the status report. One of `html`, `txt`, `json`, or `xml`. If not provided, reports are generated in both `json` and `html` formats by default. 

--target-db-version

```yaml
analyze-schema:
  target-db-version:
```

Specifies the target version of YugabyteDB in the format `A.B.C.D`.  
Default: latest stable version 

-e, --export-dir

```yaml
export-dir:
```

Path to the export directory. This directory is a workspace used to store exported schema DDL files, export data files, migration state, and a log file. 

--send-diagnostics

```yaml
send-diagnostics:
```

Enable or disable sending [diagnostics](/stable/yugabyte-voyager/reference/diagnostics-report/ "diagnostics") information to Yugabyte.  
Default: true  
Accepted parameters: true, false, yes, no, 0, 1 

-l, --log-level

```yaml
log-level:
```

Log level for yb-voyager.  
Accepted values: trace, debug, info, warn, error, fatal, panic  
Default: info 

--log-max-size-mb

```yaml
log-max-size-mb:
```

Maximum size in MB of a yb-voyager log file before it is rotated. Also applies to the Debezium log file during live migration.  
Default: 200 

--log-max-backups

```yaml
log-max-backups:
```

Maximum number of rotated log files to retain. Older files are deleted. Use -1 to retain all rotated log files.  
Default: 10 

-h, --help — Command line help. 

-y, --yes — Answer yes to all prompts during the export schema operation.  
Default: false  
Accepted parameters: true, false, yes, no, 0, 1 

-c, --config-file — Path to a [configuration file](/stable/yugabyte-voyager/reference/configuration-file "configuration file").

### Example

Configuration file:

```sh
yb-voyager analyze-schema --config-file <path-to-config-file>
```

CLI:

```sh
yb-voyager analyze-schema --export-dir /dir/export-dir --output-format txt
```
