Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-21898

ThinBackup can not restore ZIP saved in in Linux onto a Windows Machine

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • thinbackup-plugin
    • None
    • Archive saved by ThinBackup v1.7.4 in Linux Server
      Archive failed to restore on ThinBackup v1.7.4 in Windows 2008 Server
      Jenkins version 1.551

    Description

      Log file contains the following:

      Caught exception evaluating: it.availableBackups in /jenkins/thinBackup/restoreOptions. Reason: java.lang.reflect.InvocationTargetException
      java.lang.reflect.InvocationTargetException
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      <details omitted for clarity>
      Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
      at java.lang.String.substring(String.java:1911)
      at org.jvnet.hudson.plugins.thinbackup.backup.BackupSet.initializeFromZipFile(BackupSet.java:129)
      at org.jvnet.hudson.plugins.thinbackup.backup.BackupSet.initialize(BackupSet.java:93)
      at org.jvnet.hudson.plugins.thinbackup.backup.BackupSet.<init>(BackupSet.java:79)
      at org.jvnet.hudson.plugins.thinbackup.utils.Utils.getValidBackupSetsFromZips(Utils.java:352)
      at org.jvnet.hudson.plugins.thinbackup.utils.Utils.getValidBackupSets(Utils.java:371)
      at org.jvnet.hudson.plugins.thinbackup.utils.Utils.getBackupsAsDates(Utils.java:284)
      at org.jvnet.hudson.plugins.thinbackup.ThinBackupMgmtLink.getAvailableBackups(ThinBackupMgmtLink.java:159)
      ... 129 more

      Looking at source I see

      tmpName = tmpName.substring(0, tmpName.indexOf(File.separator));

      I suspect File.separator is the Windows character, but the version used to save the archive is the Linux version.

      Attachments

        Activity

          People

            tofuatjava Thomas F├╝rer
            timefly John Smith
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: