2

When backing up a database in CockroachDB the number of rows/index_entries/bytes written are included in the output:

   job_id       |  status   | fraction_completed |  rows   | index_entries |    bytes
---------------------+-----------+--------------------+---------+---------------+--------------

  903515943941406094 | succeeded |                  1 | 100000 |       200000 | 4194304

When restoring the same backup the number of the same metrics are reported:

   job_id       |  status   | fraction_completed |  rows   | index_entries |    bytes
---------------------+-----------+--------------------+---------+---------------+--------------

  803515943941406094 | succeeded |                  1 | 99999 |       199999 | 4194200

What causes the difference between the two and is all my data restored?

Faizan Qazi
  • 101
  • 2

1 Answers1

2

A couple of things impact the metrics you are observing, the backup phase may make a copy of specific system tables for metadata, which are not directly restored from the backup image. The configurations from these system tables are applied to your restored database, but they don't count toward the reported metrics for rows / index_entries.

So a relatively small delta between the two values is not unusual in full/backup restore scenarios and not out of the ordinary.

Faizan Qazi
  • 101
  • 2