Back to Yugabyte Db

End migration

docs/content/stable/yugabyte-voyager/reference/end-migration.md

2026.1.0.0-b252.4 KB
Original Source

Cleans up all the migration-related information and metadata stored in the export directory (export-dir) and databases (source, target, and source-replica). The command also provides an option to back up the schema, data, migration reports, and log files.

Syntax

text
Usage: yb-voyager end migration [ <arguments> ... ]

Arguments

The valid arguments for end migration are described in the following table:

{{<table>}}

<div style="width:120px">CLI flag</div>Config file parameterDescription

| --backup-schema-files |

yaml
end-migration:
  backup-schema-files:

| Back up migration schema files. Accepted parameters: true, false, yes, no, 0, 1 |

| --backup-data-files |

yaml
end-migration:
  backup-data-files:

| Back up snapshot data files. Accepted parameters: true, false, yes, no, 0, 1 |

| --backup-log-files |

yaml
end-migration:
  backup-log-files:

|Back up yb-voyager log files for the current migration. Accepted parameters: true, false, yes, no, 0, 1 |

| --save-migration-reports |

yaml
end-migration:
  save-migration-reports:

| Saves all the reports generated in the migration workflow (analyze-schema report, export data status output, import data status output, or get data-migration-report). Accepted parameters: true, false, yes, no, 0, 1 |

| --backup-dir |

yaml
end-migration:
  backup-dir:

|Directory where the schema, data, logs, and reports are backed up. Note: Mandatory if any of the following flags are set to true or yes or 1: --backup-data-files, --backup-log-files, --backup-schema-files, --save-migration-reports. |

| -e, --export-dir |

yaml{.nocopy}
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. |

| -h, --help | — | Command line help for import data to source-replica. | | -y, --yes | — | Answer yes to all prompts during the migration. Default: false |

{{</table>}}

Example

Configuration file:

sh
yb-voyager end migration --config-file <path-to-config-file>

CLI:

sh
yb-voyager end migration --export-dir /dir/export-dir \
        --backup-log-files true \
        --backup-data-files true \
        --backup-schema-files true \
        --save-migration-reports true \
        --backup-dir /dir/backup-dir