docs/content/stable/yugabyte-voyager/reference/end-migration.md
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.
Usage: yb-voyager end migration [ <arguments> ... ]
The valid arguments for end migration are described in the following table:
{{<table>}}
| <div style="width:120px">CLI flag</div> | Config file parameter | Description |
|---|
| --backup-schema-files |
end-migration:
backup-schema-files:
| Back up migration schema files. Accepted parameters: true, false, yes, no, 0, 1 |
| --backup-data-files |
end-migration:
backup-data-files:
| Back up snapshot data files. Accepted parameters: true, false, yes, no, 0, 1 |
| --backup-log-files |
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 |
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 |
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 |
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>}}
Configuration file:
yb-voyager end migration --config-file <path-to-config-file>
CLI:
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