java.io.IOException: Could not create backup directory. Backup cannot be performed.

Jenkins JIRA | Iain Buclaw | 3 years ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    When the thinBackup is configured to backup to a directory outside of Jenkins home (/var/lib/jenkins) causes the backup to fail with a a wrong error, as per below log dump. Checked permissions, and the jenkins user does have write access to the directory. Mounting the directory to ie: /var/lib/jenkins/backups using --bind, and changing the backup directory from /var/backups/jenkins to /var/lib/jenkins/backups and the backup succeeds. --- 13-Mar-2014 17:24:40 org.jvnet.hudson.plugins.thinbackup.ThinBackupMgmtLink doBackupManual INFO: Starting manual backup. 13-Mar-2014 17:24:40 org.jvnet.hudson.plugins.thinbackup.ThinBackupPeriodicWork backupNow WARNING: Do not wait until jenkins/hudson is idle to perform backup. This could cause corrupt backups. 13-Mar-2014 17:24:40 org.jvnet.hudson.plugins.thinbackup.backup.HudsonBackup <init> INFO: No previous full backup found, thus creating one. 13-Mar-2014 17:24:40 org.jvnet.hudson.plugins.thinbackup.backup.HudsonBackup backup SEVERE: Could not create backup directory. Backup cannot be performed. 13-Mar-2014 17:24:40 org.jvnet.hudson.plugins.thinbackup.ThinBackupPeriodicWork backupNow SEVERE: Cannot perform a backup. Please be sure jenkins/hudson has write privileges in the configured backup path 'var/backups/jenkins'. java.io.IOException: Could not create backup directory. Backup cannot be performed. at org.jvnet.hudson.plugins.thinbackup.backup.HudsonBackup.backup(HudsonBackup.java:137) 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:679) 13-Mar-2014 17:24:57 org.jvnet.hudson.plugins.thinbackup.ThinBackupMgmtLink doBackupManual INFO: Starting manual backup. 13-Mar-2014 17:24:57 org.jvnet.hudson.plugins.thinbackup.ThinBackupPeriodicWork backupNow WARNING: Do not wait until jenkins/hudson is idle to perform backup. This could cause corrupt backups. 13-Mar-2014 17:24:57 org.jvnet.hudson.plugins.thinbackup.backup.HudsonBackup <init> INFO: No previous full backup found, thus creating one. 13-Mar-2014 17:24:57 org.jvnet.hudson.plugins.thinbackup.backup.HudsonBackup backup SEVERE: Could not create backup directory. Backup cannot be performed. 13-Mar-2014 17:24:57 org.jvnet.hudson.plugins.thinbackup.ThinBackupPeriodicWork backupNow SEVERE: Cannot perform a backup. Please be sure jenkins/hudson has write privileges in the configured backup path '/var/backups/jenkins'. java.io.IOException: Could not create backup directory. Backup cannot be performed. at org.jvnet.hudson.plugins.thinbackup.backup.HudsonBackup.backup(HudsonBackup.java:137) 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:679)

    Jenkins JIRA | 3 years ago | Iain Buclaw
    java.io.IOException: Could not create backup directory. Backup cannot be performed.
  2. 0

    When the thinBackup is configured to backup to a directory outside of Jenkins home (/var/lib/jenkins) causes the backup to fail with a a wrong error, as per below log dump. Checked permissions, and the jenkins user does have write access to the directory. Mounting the directory to ie: /var/lib/jenkins/backups using --bind, and changing the backup directory from /var/backups/jenkins to /var/lib/jenkins/backups and the backup succeeds. --- 13-Mar-2014 17:24:40 org.jvnet.hudson.plugins.thinbackup.ThinBackupMgmtLink doBackupManual INFO: Starting manual backup. 13-Mar-2014 17:24:40 org.jvnet.hudson.plugins.thinbackup.ThinBackupPeriodicWork backupNow WARNING: Do not wait until jenkins/hudson is idle to perform backup. This could cause corrupt backups. 13-Mar-2014 17:24:40 org.jvnet.hudson.plugins.thinbackup.backup.HudsonBackup <init> INFO: No previous full backup found, thus creating one. 13-Mar-2014 17:24:40 org.jvnet.hudson.plugins.thinbackup.backup.HudsonBackup backup SEVERE: Could not create backup directory. Backup cannot be performed. 13-Mar-2014 17:24:40 org.jvnet.hudson.plugins.thinbackup.ThinBackupPeriodicWork backupNow SEVERE: Cannot perform a backup. Please be sure jenkins/hudson has write privileges in the configured backup path 'var/backups/jenkins'. java.io.IOException: Could not create backup directory. Backup cannot be performed. at org.jvnet.hudson.plugins.thinbackup.backup.HudsonBackup.backup(HudsonBackup.java:137) 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:679) 13-Mar-2014 17:24:57 org.jvnet.hudson.plugins.thinbackup.ThinBackupMgmtLink doBackupManual INFO: Starting manual backup. 13-Mar-2014 17:24:57 org.jvnet.hudson.plugins.thinbackup.ThinBackupPeriodicWork backupNow WARNING: Do not wait until jenkins/hudson is idle to perform backup. This could cause corrupt backups. 13-Mar-2014 17:24:57 org.jvnet.hudson.plugins.thinbackup.backup.HudsonBackup <init> INFO: No previous full backup found, thus creating one. 13-Mar-2014 17:24:57 org.jvnet.hudson.plugins.thinbackup.backup.HudsonBackup backup SEVERE: Could not create backup directory. Backup cannot be performed. 13-Mar-2014 17:24:57 org.jvnet.hudson.plugins.thinbackup.ThinBackupPeriodicWork backupNow SEVERE: Cannot perform a backup. Please be sure jenkins/hudson has write privileges in the configured backup path '/var/backups/jenkins'. java.io.IOException: Could not create backup directory. Backup cannot be performed. at org.jvnet.hudson.plugins.thinbackup.backup.HudsonBackup.backup(HudsonBackup.java:137) 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:679)

    Jenkins JIRA | 3 years ago | Iain Buclaw
    java.io.IOException: Could not create backup directory. Backup cannot be performed.

    Root Cause Analysis

    1. java.io.IOException

      Could not create backup directory. Backup cannot be performed.

      at org.jvnet.hudson.plugins.thinbackup.backup.HudsonBackup.backup()
    2. org.jvnet.hudson
      AsyncPeriodicWork$1.run
      1. org.jvnet.hudson.plugins.thinbackup.backup.HudsonBackup.backup(HudsonBackup.java:137)
      2. org.jvnet.hudson.plugins.thinbackup.ThinBackupPeriodicWork.backupNow(ThinBackupPeriodicWork.java:87)
      3. org.jvnet.hudson.plugins.thinbackup.ThinBackupMgmtLink$1.execute(ThinBackupMgmtLink.java:76)
      4. org.jvnet.hudson.plugins.thinbackup.hudson.model.AsyncPeriodicWork$1.run(AsyncPeriodicWork.java:53)
      4 frames
    3. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:679)
      1 frame