Documentation menu

Version 1.8.0-community

CLI Reference

Every GoArchive command and option.

goarchive <command> [flags]

Commands

CommandDescription
archiveCopy data to the destination, then remove it from the source
copy-onlyCopy data to the destination without removing anything
purgeRemove data from the source without copying it
dry-runPreview a job, including estimated row counts
validateCheck the configuration and the environment
planDisplay table relationships and processing order
list-jobsList the jobs defined in a configuration file
versionShow version information

Global flags

Available on every command.

FlagDescriptionDefault
-c, --config <path>Configuration file to readarchiver.yaml
--log-level <level>debug, info, warn, or errorfrom configuration
--log-format <format>json or textfrom configuration
--skip-verifySkip verification after copyingoff

Batch sizes and pacing are set in the configuration file rather than on the command line, so that a file holding several jobs can give each the settings it needs.

archive

Copies data to the destination, verifies it, and removes it from the source.

goarchive archive -c archiver.yaml --job archive_old_orders
FlagDescription
-j, --job <name>The job to run
--forceProceed when a previous run left a stale lock, after confirming that run has ended
--force-triggersProceed when source tables have deletion triggers
--skip-validate-preflightSkip the environment checks that normally run first

See Archiving Data .

copy-only

Copies data to the destination and leaves the source untouched.

goarchive copy-only -c archiver.yaml --job archive_old_orders
FlagDescription
-j, --job <name>The job to run
--forceProceed when a previous run left a stale lock
--skip-validate-preflightSkip the environment checks that normally run first

See Copying Without Deleting .

purge

Removes data from the source without copying it.

goarchive purge -c archiver.yaml --job archive_old_orders
FlagDescription
-j, --job <name>The job to run
--forceProceed when a previous run left a stale lock
--force-triggersProceed when source tables have deletion triggers
--skip-validate-preflightSkip the environment checks that normally run first

See Purging Data .

dry-run

Previews a job without changing anything.

goarchive dry-run -c archiver.yaml --job archive_old_orders
FlagDescription
-j, --job <name>The job to preview

Reports the filter, the rows each table would contribute, and whether the configured batch size fits the destination’s limits.

validate

Checks the configuration and both servers.

goarchive validate -c archiver.yaml
goarchive validate -c archiver.yaml --job archive_old_orders
FlagDescription
-j, --job <name>Check one job instead of all
--force-triggersTreat deletion triggers as acceptable

Without --job, every job in the file is checked.

plan

Displays the relationship tree and processing order.

goarchive plan -c archiver.yaml --job archive_old_orders
FlagDescription
-j, --job <name>The job to display

Reads the configuration and table structure only.

list-jobs

Lists the jobs a configuration file defines.

goarchive list-jobs -c archiver.yaml

version

Shows version and build information.

goarchive version

Exit status

StatusMeaning
0Completed successfully
1Did not complete β€” the message explains why