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

thinBackup fails to backup "domain\user" folders under $JENKINS_HOME/users

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Blocker
    • Resolution: Not A Defect
    • Component/s: thinbackup-plugin
    • Labels:
      None
    • Environment:
      Jenkins 2.7.4
      thinBackup 1.7.4
    • Similar Issues:

      Description

      some of our users are connected with LDAP credentials (jenkins connected to active directory).
      thinBackup manual backup fails to backup when there is a "domain\username" folder under the $JENKINS_HOME/users folder.
      Despite what the error message below is suggesting - this is NOT a permissions issue since it was able to create folders for other users which are not of the form "domain\username".

      Here is the system log (note I replaced the actual domain and user names with domain\username - the rest of the log is untouched):

      Nov 07, 2016 11:00:12 AM INFO org.jvnet.hudson.plugins.thinbackup.ThinBackupMgmtLink doBackupManual
      Starting manual backup.
      Nov 07, 2016 11:00:13 AM INFO org.jvnet.hudson.plugins.thinbackup.backup.HudsonBackup backupJobsDirectory
      Found 22 jobs to back up.
      Nov 07, 2016 11:01:03 AM SEVERE org.jvnet.hudson.plugins.thinbackup.ThinBackupPeriodicWork backupNow
      Cannot perform a backup. Please be sure jenkins/hudson has write privileges in the configured backup path '/var/lib/jenkins_backup_mnt'.
      java.io.IOException: Destination '/var/lib/jenkins_backup_mnt/FULL-2016-11-07_11-00/users/domain\username' directory cannot be created
      at org.apache.commons.io.FileUtils.doCopyDirectory(FileUtils.java:1416)
      at org.apache.commons.io.FileUtils.doCopyDirectory(FileUtils.java:1426)
      at org.apache.commons.io.FileUtils.copyDirectory(FileUtils.java:1389)
      at org.apache.commons.io.FileUtils.copyDirectory(FileUtils.java:1310)
      at org.jvnet.hudson.plugins.thinbackup.backup.HudsonBackup.backupRootFolder(HudsonBackup.java:337)
      at org.jvnet.hudson.plugins.thinbackup.backup.HudsonBackup.backup(HudsonBackup.java:143)
      at org.jvnet.hudson.plugins.thinbackup.ThinBackupPeriodicWork.backupNow(ThinBackupPeriodicWork.java:87)
      at org.jvnet.hudson.plugins.thinbackup.ThinBackupMgmtLink$1.execute(ThinBackupMgmtLink.java:76)
      at org.jvnet.hudson.plugins.thinbackup.hudson.model.AsyncPeriodicWork$1.run(AsyncPeriodicWork.java:53)
      at java.lang.Thread.run(Thread.java:745)

        Attachments

          Activity

          Hide
          tofuatjava Thomas Fürer added a comment -

          looks like that the path is incorrect reagrding the separators. the separator between domain and name is probably interpreted like a path separator.

          Show
          tofuatjava Thomas Fürer added a comment - looks like that the path is incorrect reagrding the separators. the separator between domain and name is probably interpreted like a path separator.
          Hide
          pyrocks Mor L added a comment -

          It just hit me that its probably my bad... The jenkins backup folder is actually a mount to... a windows share (cifs), and in windows folders cannot contain \.
          I will very tomorrow and if a backup to linux is successful I will close this.
          I wonder though how it works when jenkins is running on windows, and whether there is a workaround which would still allow me to backup to a network share

          Show
          pyrocks Mor L added a comment - It just hit me that its probably my bad... The jenkins backup folder is actually a mount to... a windows share (cifs), and in windows folders cannot contain \. I will very tomorrow and if a backup to linux is successful I will close this. I wonder though how it works when jenkins is running on windows, and whether there is a workaround which would still allow me to backup to a network share
          Hide
          tofuatjava Thomas Fürer added a comment -

          added an issue at apache.org common-io project
          IO-517

          Show
          tofuatjava Thomas Fürer added a comment - added an issue at apache.org common-io project IO-517
          Hide
          pyrocks Mor L added a comment -

          Hi,

          If I change the backup directory to a local directory instead of the mount the backup completes successfully.
          I guess you can close this issue, sorry for the trouble.

          Regards,
          Mor

          Show
          pyrocks Mor L added a comment - Hi, If I change the backup directory to a local directory instead of the mount the backup completes successfully. I guess you can close this issue, sorry for the trouble. Regards, Mor

            People

            • Assignee:
              tofuatjava Thomas Fürer
              Reporter:
              pyrocks Mor L
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: