archive changes reference

yb-voyager archive changes

The archive changes command limits the disk space used by the locally queued CDC events. After the changes from the local queue are applied on the target YugabyteDB database (and source-replica database), they are eligible for deletion. The command gives an option to archive the changes before deleting by moving them to another directory.

Note that even if some changes are applied to the target databases, locally queued CDC events are deleted only after the disk use exceeds 70%.

Syntax

Usage: yb-voyager archive changes [ <arguments> ... ]

Arguments

The following table lists the valid CLI flags and parameters for archive changes command.

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

CLI flag
Config file parameter Description
--delete-changes-without-archiving
archive-changes:
  delete-changes-without-archiving:
Delete the imported changes without archiving them. Note that the changes are deleted from the export directory only after disk utilisation exceeds 70%.
Default: false
Accepted parameters: true, false, yes, no, 0, 1
--fs-utilization-threshold
archive-changes:
  fs-utilization-threshold:
Disk utilization threshold in percentage.
Default: 70
--move-to
archive-changes:
  move-to:
Path to the directory where the imported change events are to be moved to. Note that the changes are deleted from the export directory only after the disk use exceeds 70%.
-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.
--send-diagnostics
send-diagnostics:
Enable or disable sending diagnostics information to Yugabyte.
Default: true
Accepted parameters: true, false, yes, no, 0, 1
-h, --help Command line help for archive changes.
-y, --yes Answer yes to all prompts during migration.
Default: false

Examples

Configuration file:

yb-voyager archive changes --config-file <path-to-config-file>

CLI:

Example to delete changes without archiving them to another destination is as follows:

yb-voyager archive changes --export-dir /dir/export-dir --delete-changes-without-archiving true

Example to archive changes from the export directory to another destination is as follows:

yb-voyager archive changes --export-dir /dir/export-dir --move-to /dir/archived-changes-dir