HEX
Server: Apache/2.4.65 (Ubuntu)
System: Linux ielts-store-v2 6.8.0-1036-gcp #38~22.04.1-Ubuntu SMP Thu Aug 14 01:19:18 UTC 2025 x86_64
User: root (0)
PHP: 7.2.34-54+ubuntu20.04.1+deb.sury.org+1
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
Upload Files
File: //snap/google-cloud-cli/396/help/man/man1/gcloud_artifacts_docker_upgrade_migrate.1
.TH "GCLOUD_ARTIFACTS_DOCKER_UPGRADE_MIGRATE" 1



.SH "NAME"
.HP
gcloud artifacts docker upgrade migrate \- migrate projects from Container Registry to Artifact Registry



.SH "SYNOPSIS"
.HP
\f5gcloud artifacts docker upgrade migrate\fR [\fB\-\-canary\-reads\fR=\fIPERCENT\fR] [\fB\-\-copy\-only\fR] [\fB\-\-from\-gcr\fR=\fIGCR_HOST\fR/\fIPROJECT_ID\fR] [\fB\-\-input\-iam\-policy\-dir\fR=\fIDIRECTORY\fR] [\fB\-\-last\-uploaded\-versions\fR=\fIN\fR] [\fB\-\-max\-threads\fR=\fIMAX_THREADS\fR;\ default=8] [\fB\-\-output\-iam\-policy\-dir\fR=\fIDIRECTORY\fR] [\fB\-\-pkg\-dev\-location\fR=\fIPKG_DEV_LOCATION\fR] [\fB\-\-projects\fR=\fIPROJECTS\fR] [\fB\-\-recent\-images\fR=\fINUM_DAYS\fR] [\fB\-\-skip\-iam\-update\fR] [\fB\-\-skip\-pre\-copy\fR] [\fB\-\-to\-pkg\-dev\fR=\fIPROJECT_ID\fR/\fIREPOSITORY_ID\fR] [\fB\-\-no\-use\-analyze\-iam\fR] [\fIGCLOUD_WIDE_FLAG\ ...\fR]



.SH "DESCRIPTION"

Migrate projects from Container Registry to Artifact Registry



.SH "EXAMPLES"

To migrate a project \f5my\-project\fR using gcr.io repositories:

.RS 2m
$ gcloud artifacts docker upgrade migrate \-\-projects=my\-project
.RE

To migrate several projects using gcr.io repositories:

.RS 2m
$ gcloud artifacts docker upgrade migrate \e
   \-\-projects=my\-project1,my\-project2,my\-project3
.RE

To migrate a project using pkg.dev repositories:

.RS 2m
$ gcloud artifacts docker upgrade migrate \e
   \-\-from\-gcr=gcr.io/project1 \-\-to\-pkg\-dev=project2/repo_name
.RE



.SH "FLAGS"

.RS 2m
.TP 2m
\fB\-\-canary\-reads\fR=\fIPERCENT\fR

Send only a percent of reads to Artifact Registry. The rest of reads and all
writes are sent to Container Registry.

.TP 2m
\fB\-\-copy\-only\fR

Only perform image copying

.TP 2m
\fB\-\-from\-gcr\fR=\fIGCR_HOST\fR/\fIPROJECT_ID\fR

Container Registry host + project to copy from. This flag is only used when
migrating to pkg.dev repos. Example: gcr.io/my\-project

.TP 2m
\fB\-\-input\-iam\-policy\-dir\fR=\fIDIRECTORY\fR

During the IAM update step, the tool applies all iam policies in the given
directory.

.TP 2m
\fB\-\-last\-uploaded\-versions\fR=\fIN\fR

Only copy the N most recently uploaded versions of each image. More than N
images may be copied if new images are uploaded during migration.

.TP 2m
\fB\-\-max\-threads\fR=\fIMAX_THREADS\fR; default=8

Max number of images to copy simultaneously. Consider quota usage when
increasing this

.TP 2m
\fB\-\-output\-iam\-policy\-dir\fR=\fIDIRECTORY\fR

Outputs Artifact Registry\-equivalent bindings to this directory during IAM
update step and then exits the tool. After any neccesary modifications are made,
the tool can be rerun with \-\-input\-iam\-policy\-dir to continue migration
with the generated bindings.

.TP 2m
\fB\-\-pkg\-dev\-location\fR=\fIPKG_DEV_LOCATION\fR

The location of the pkg\-dev repository you are migrating to. If not specified,
migration is always done to the same multi\-region as GCR. Setting this flag can
cause cross\-regional copying and lead to billing charges.

.TP 2m
\fB\-\-projects\fR=\fIPROJECTS\fR

Comma seperated list of Container Registry projects to migrate to Artifact
Registry gcr.io repositories.

.TP 2m
\fB\-\-recent\-images\fR=\fINUM_DAYS\fR

Only copy images pulled or pushed in the last NUM_DAYS days. NUM_DAYS must be
between 30 and 90 inclusive.

.TP 2m
\fB\-\-skip\-iam\-update\fR

Migrate without changing iam\-policy. Users without Artifact Registry
permissions will not have access to migrated images.

.TP 2m
\fB\-\-skip\-pre\-copy\fR

Skip the initial copy of recent images before enabling redirection.

.TP 2m
\fB\-\-to\-pkg\-dev\fR=\fIPROJECT_ID\fR/\fIREPOSITORY_ID\fR

Artifact Registry pkg.dev project ID and repository ID to copy to. Example:
my\-project/my\-repo

.TP 2m
\fB\-\-use\-analyze\-iam\fR

Use analyzeIAMPolicy to get IAM bindings. If false, tooling iterates through IAM
bindings itself, which is slower, but doesn't require anlayzeIAMPolicy quota.
Enabled by default, use \fB\-\-no\-use\-analyze\-iam\fR to disable.


.RE
.sp

.SH "GCLOUD WIDE FLAGS"

These flags are available to all commands: \-\-access\-token\-file, \-\-account,
\-\-billing\-project, \-\-configuration, \-\-flags\-file, \-\-flatten,
\-\-format, \-\-help, \-\-impersonate\-service\-account, \-\-log\-http,
\-\-project, \-\-quiet, \-\-trace\-token, \-\-user\-output\-enabled,
\-\-verbosity.

Run \fB$ gcloud help\fR for details.



.SH "API REFERENCE"

This command uses the \fBartifactregistry/v1\fR API. The full documentation for
this API can be found at: https://cloud.google.com/artifacts/docs/