- Nexus’ blobstores are stored in a Google Persistent Disk (PD) accessible by
- A file used to trigger backups is also stored in the same PD.
- A task configured in Nexus periodically dumps a backup of the Nexus database to the same PD.
- Another task, configured in Nexus, signals that a backup is occurring by touching the trigger file.
nexus-backupwatches the trigger file and, whenever the trigger file is touched, starts the blobstore backup procedure.
nexus-backupfetches the Nexus database dump and blobstore backup files from the PD.
nexus-backupuploads the backup to a pre-configured Cloud Storage bucket.
- A recovery procedure may be conducted by copying a backup to a PD attached to Nexus. Nexus will pick the backup and restore it automatically upon restart.
Worthy of note, whenever a lock file has been present for more than 12 hours (probably meaning a failed backup), the lock file is removed so that further backups can happen.
Nexus lifecycle management & usage
We rely on Kubernetes (GKE) to deploy and manage the lifecycle of our Nexus set-up. We have open-sourced detailed instructions on how we do it, including disaster-recovery, and how our developers use it.
Also, we are currently working on an Helm chart for it, which should be made available real soon.
This story was provided by the DevOps team at travel audience