---
title: "archive changes reference"
url: "https://docs.yugabyte.com/stable/yugabyte-voyager/reference/cutover-archive/archive-changes/"
---

# archive changes reference

YugabyteDB Voyager 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.

You can either choose to delete the segments or archive them to a separate location.

## Syntax

```text
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 

--fs-utilization-threshold

```yaml
archive-changes:
  fs-utilization-threshold:
```

Disk use threshold (in percent) for the export directory. Used only with `--policy delete`.  
Default: 70 

--policy

```yaml
archive-changes:
  policy:
```

Specifies how to handle processed segments: `delete` or `archive`. 

--archive-dir

```yaml
archive-changes:
  archive-dir: 
```

Path to an existing directory to copy processed segments into before they are removed from the export directory.  
Required when policy is `archive`. 

-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 for archive changes. 

-y, --yes — Answer yes to all prompts during migration.  
Default: false 

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

### Examples

Configuration file:

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

CLI:

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

```sh
yb-voyager archive changes --export-dir /dir/export-dir --policy delete
```

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

```sh
yb-voyager archive changes --export-dir /dir/export-dir --policy archive --archive-dir /dir/archive-dir
```
