End migration
yb-voyager end migration
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
Usage: yb-voyager end migration [ <arguments> ... ]
Arguments
The valid arguments for end migration are described in the following table:
| Argument | Description/valid options |
|---|---|
| --backup‑data‑files | Back up snapshot data files. Accepted parameters: true, false, yes, no, 0, 1 |
| --backup‑log‑files | Back up yb-voyager log files for the current migration. Accepted parameters: true, false, yes, no, 0, 1 |
| ‑‑backup‑schema‑files | Back up migration schema files. Accepted parameters: true, false, yes, no, 0, 1 |
| ‑‑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 |
| -e, --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. |
| --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. |
| -h, --help | Command line help for end migration. |
| -y, --yes | Answer yes to all prompts during the export schema operation. Default: false |
Example
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