Can't backup and restore a S3 blob


#1

Assume you have a Docker Registry in a NXRM installation using a S3 blob.

In order to backup the blob, I could either use versioning or copy the content to a new bucket as specified in Prepare a Backup. Assume I’m going for the second option, that is, I have now a second bucket with the content of the original bucket.

Later on, two scenarios may happen:

  • New NXRM installation: whether there are software issues or just trying a new version in staging, in the event of installing a new NXRM, if I create a blob using the backup bucket and then a hosted docker registry repository using this blob, the data will not show up.
  • Something happened to the data and need to restore from the blob: as the repo’s blob can’t be changed, I delete the repo and create it right again. It doesn’t matter whether I use the same bucket or the backup bucket, the data will not show up.

I’ve tried to run the following tasks:

  • Repair - Reconcile component database from blob store
  • Repair - Rebuild repository search
  • Repair - Rebuild repository browse

Neither did anything.
Also tried to rebuild the repository index, no luck either.

So, how’s the process to backup and restore a docker registry using the S3 blob store?

EDIT:

I have tried bucket versioning too. It doesn’t work either. I restore the bucket to a previous version yet NXRM still shows the most recent content.


#2

Ok, the issue was that the databases weren’t restored properly.

They files from restore-from-backup do not overwrite the original files, so they need to be removed.


#3

Ayo,

Could you please elaborate on what do you did for this? I am running into the same issue. I am using the same bucket and trying to restore in another nexus instance and see if the data is restored. Data is not showing up.


#4

Assuming this is Nexus 3. I think ayo meant that he/she did not remove the required directories in sonatype-work\nexus3\db directory.

Take a look at Backup and Restore and Restore Exported Databases