Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-24315

Renaming restore-from-backup directory causes DB backup task failure

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: New
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Database, Scheduled Tasks
    • Labels:
    • Notability:
      3

      Description

      REPRODUCE STEPS

      1. Rename the "restore-from-backup" directory under sonatypeWork directory.
      2. Start database backup task

      EXPECTED BEHAVIOUR

      Renaming a restore directory shouldn't stop taking a backup.

      ACTUAL BEHAVIOUR

      Due to the validation introduced in NEXUS-14493, not having "restore-from-backup" directory causes the task error with below Exception:

      2020-06-23 07:24:33,265+0000 ERROR [quartz-12-thread-18] node-nxrm-ha1.standalone.localdomain *SYSTEM org.sonatype.nexus.internal.backup.orient.DatabaseBackupTask - Failed to run task 'Admin - Export databases for backup'
      org.sonatype.goodies.common.MultipleFailures$MultipleFailuresException: 3 failures
              at org.sonatype.goodies.common.MultipleFailures.maybePropagate(MultipleFailures.java:95)
              at org.sonatype.goodies.common.MultipleFailures.maybePropagate(MultipleFailures.java:103)
              at org.sonatype.nexus.internal.backup.orient.DatabaseBackupTask.execute(DatabaseBackupTask.java:122)
              at org.sonatype.nexus.scheduling.TaskSupport.call(TaskSupport.java:100)
              at org.sonatype.nexus.quartz.internal.task.QuartzTaskJob.doExecute(QuartzTaskJob.java:143)
              at org.sonatype.nexus.quartz.internal.task.QuartzTaskJob.execute(QuartzTaskJob.java:106)
              at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
              at org.sonatype.nexus.quartz.internal.QuartzThreadPool.lambda$0(QuartzThreadPool.java:145)
              at org.sonatype.nexus.thread.internal.MDCAwareRunnable.run(MDCAwareRunnable.java:40)
              at org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnable.java:120)
              at org.apache.shiro.subject.support.SubjectRunnable.run(SubjectRunnable.java:108)
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
              at java.util.concurrent.FutureTask.run(FutureTask.java:266)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
              at java.lang.Thread.run(Thread.java:748)
              Suppressed: java.lang.RuntimeException: database backup of config to location: /var/tmp/share/sonatype/backups/ please check filesystem permissions and that the location exists
                      at org.sonatype.nexus.internal.backup.orient.DatabaseBackupTask.execute(DatabaseBackupTask.java:112)
                      ... 13 common frames omitted
              Caused by: java.nio.file.NoSuchFileException: /opt/sonatype/nexus-3.23.0/sonatype-work/nexus3/restore-from-backup
                      at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
                      at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
                      at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
                      at sun.nio.fs.UnixFileSystemProvider.isSameFile(UnixFileSystemProvider.java:332)
                      at java.nio.file.Files.isSameFile(Files.java:1504)
                      at org.sonatype.nexus.orient.internal.DatabaseRestorerImpl.isRestoreFromLocation(DatabaseRestorerImpl.java:102)
                      at org.sonatype.nexus.internal.backup.orient.DatabaseBackupImpl.checkTarget(DatabaseBackupImpl.java:83)
                      at org.sonatype.nexus.internal.backup.orient.DatabaseBackupImpl.fullBackup(DatabaseBackupImpl.java:74)
                      at org.sonatype.nexus.internal.backup.orient.DatabaseBackupTask.execute(DatabaseBackupTask.java:106)
                      ... 13 common frames omitted
                     ... (snip) ...
      

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            hosako Hajime Osako
            Last Updated By:
            Rich Seddon Rich Seddon
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Date of First Response:

                tigCommentSecurity.panel-title