amazon-web-servicesnexusnexus3n3dr

Get entire backup of Nexus OSS 3 of data and binaries


I have configured Nexus OSS 3 on Amazon Linux ec2 instance. I want to take periodical backup of database and store the backups in S3 bucket. In order to do that I mounted the S3 bucket on my Linux instance. I created a scheduled export task on Nexus 3. After running the task I see that 5 different .bak files created locally and synced to S3 bucket as well BUT the size of the .bak file are so small. Where as the size of the blob-store is 250 GB, the size of .bak file is only 45 MB (component). The other 4 .bak files are even smaller. I wonder if the Nexus’s schedule export job actually exporting the blob store at all or not? If not, how to include the entire data, binaries and configurations?

One additional information is, I have added a separate AWS EBS volume of 1 TB and mounted on Linux (/data), and moved the nexus sonatype-work folder to that location, and updated the nexus.vmoptions file with new location: -Dkaraf.data=/data/sonatype-work/nexus3

The nexus OSS 3 repository manager working properly with this setup.


Solution

  • The backup task just backs up the databases, backup of blob storage needs to be done outside of Nexus Repo.

    For s3, the AWS Command Line Interface (CLI) provides an s3 sync command that you can invoke periodically to perform this:

    http://docs.aws.amazon.com/cli/latest/reference/s3/sync.html

    There are also a number of third party tools that can perform this task.

    If you need to do a restore from backup, restore the s3 volume from your backup, and restore the databases as described here:

    https://help.sonatype.com/display/NXRM3/Restore+Exported+Databases

    Then go to "system/tasks" in the administration UI and schedule and run a "Repair - Reconcile component database from blob store" task to fix up any discrepancies between blob storage and the database.