►
From YouTube: GitLab Container Registry Database Migration Demo
Description
This video is a companion video for this quick-start guide: https://gitlab.com/gitlab-org/container-registry/-/blob/master/docs-gitlab/database-quick-start.md
This feature is in beta, so please be sure to visit the feedback issue before attempting to migrate to the metadata database: https://gitlab.com/gitlab-org/gitlab/-/issues/423459
A
A
Let's
run
through
a
few
things,
this
migration
process
is
available,
starting
from
gitlab
16.4
and
higher.
It's
a
beta
feature.
If
you
do
want
to
run
this
migration
yourself
be
sure
to
create
a
backup
of
the
Registries
object.
Storage,
if
you
do
migrate,
successfully
run
with
the
database
and
find
that,
for
whatever
reason
it
isn't
for
you
will
need
to
take
the
registry
offline,
restore
from
the
backup
disable
the
database
before
bringing
the
registry
back
online.
It's
not
enough
to
Simply
disable.
The
database
in
the
registry
configuration.
A
All
untagged
images
are
automatically
removed
when
running
with
the
database.
This
is
good.
It's
a
key
feature
of
the
database
metadata,
but
be
sure
that
you
cease
running
offline
garbage
collection,
if
that's
part
of
your
maintenance
routine,
be
sure
to
update
your
workflows
and
documentation
and
look
out
for
any
cron
jobs
that
might
periodically
schedule
this
automatically.
The
offline
garbage
collector
is
not
compatible
with
the
database
metadata
and
can
lead
to
data
inconsistency
if
it's
used
after
the
migration.
A
A
Your
import
process
will
take
longer
than
you
see
in
this
video
we're
just
using
a
small
amount
of
data
to
walk
through
the
steps
without
loading.
The
runtime
of
this
video
also
we're
using
the
three-step
import
process,
and
this
helps
mitigate
downtime
at
the
cost
of
needing
to
do
a
bit
more
configuration
and
a
bit
more
process
But.
Ultimately,
this
is
a
good
approach
for
Registries
that
are
very
large
or
have
very
critical.
Uptime
needs.
A
A
A
The
important
thing
for
this
guide
is
that
we
have
enabled
set
defaults
right
now
and
that
all
of
the
connection
information
is
correct.
The
tools
that
we
use
to
migrate,
the
database
we'll
read
from
this
configuration.
So
we
know
if
these
tools
work
that
we
have
configured
this
section
properly
even
before
we
turn
enabled
to
true
and
have
the
registry
look
at
this
configuration
and
start
with
the
database.
A
A
Okay,
so
we
are
seeing
that
we
are
adding
migrations
or
applying
migrations
rather,
and
that
this
was
successful
if
the
configuration
we
put
on
the
registry
was
false
in
some
way.
If
it
was
incorrect,
this
command,
we
could
expect
to
fail
if
the
connection
information
was
not
correct.
So
this
is
a
good
sign
already.
A
A
And
this
is
going
to
set
us
up
for
step
two
when
we
run
this
we're
going
to
do
as
much
of
the
migration
as
we
can,
while
still
maintaining
incoming
rights
during
this
process
for
step
two,
we
will
need
to
take
the
registry
into
read-only
mode
and
then
for
step
three.
We
can
go
back
and
receive
rights,
but
we'll
talk
more
about
that
during
the
steps.
A
The
text
is
a
little
large
for
this
YouTube
video
for
the
amount
of
text
that
comes
out
of
this
band,
but
we
can
see
that
we've
completed
and
it
took
us
about
six
seconds.
A
A
A
A
Now
we
have
the
last
step
which
can
be
run
while
the
database
is
rewrite,
and
that
is
just
to
make
sure
that
all
of
the
common
blob
storage
that
the
registry
is
accounted
for.
So
if
you
had
any
blobs
that
were
ready
to
be
garbage
collected
steps,
one
and
two
just
don't
pick
them
up
to
expedite
the
process
step
three
just
goes
through
and
ensures
that
the
offline
garbage
the
online
garbage
collector
rather
can
operate
as
it's
expected
to
and
fully
see
all
of
registry
storage.