[JIRA] [thinBackup] (JENKINS-18866) Symlink prevens backup from ThinBackup

125 views
Skip to first unread message

jaytee1@hotmail.com (JIRA)

unread,
Jun 11, 2015, 11:34:01 AM6/11/15
to jenkinsc...@googlegroups.com
Jack T commented on Bug JENKINS-18866
 
Re: Symlink prevens backup from ThinBackup

I am running into this issue with thinBackup 1.7.4 is not saving all the symbolic links in Windows 2008. The lastFailedBuild, lastUnstableBuild and lastUnsuccessfulBuild symbolic links are retained but the ones pointing to the build directories are not kept. For those build directories it copies the contents of the symbolic links but doesn't keep the symbolic link itself. This is fine if you restore the backup to the original location, but if you try to change paths it causes issues.

Not a big issue, but it took me some time to figure out why all my backups had wrong dates and times. My workaround is to use xcopy with the /B switch to keeps all the symbolic links.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265)
Atlassian logo

piotr.krukowiecki@parasoft.com (JIRA)

unread,
Mar 2, 2018, 3:45:03 AM3/2/18
to jenkinsc...@googlegroups.com

Same issue.

Additionally, this causes ThinBackup to not delete backups set ("Max number of backup sets" option ignored). This filled our build server disks (40 GB of ThinBackup logs).

That is, we have set limited number of backups set to be kept. But it seems the backup sets are not deleted. When I click "Backup Now", a new backup folder is created (for example "FULL-2018-03-02_09-26"), but old folders are not deleted. In Jenkins logs I can see following:

Cannot perform a backup. Please be sure jenkins/hudson has write privileges in the configured backup path '/tmp/jenkins_backup'. java.io.FileNotFoundException: /var/lib/jenkins/jobs/Reference Tests - Run Defragmentation/lastSuccessful (No such file or directory) at java.io.FileInputStream.open0(Native Method) at java.io.FileInputStream.open(FileInputStream.java:195) at java.io.FileInputStream.<init>(FileInputStream.java:138) at org.apache.commons.io.FileUtils.doCopyFile(FileUtils.java:1138) at org.apache.commons.io.FileUtils.doCopyDirectory(FileUtils.java:1428) at org.apache.commons.io.FileUtils.doCopyDirectory(FileUtils.java:1426) 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.backupAdditionalFiles(HudsonBackup.java:289) at org.jvnet.hudson.plugins.thinbackup.backup.HudsonBackup.backup(HudsonBackup.java:171) at org.jvnet.hudson.plugins.thinbackup.ThinBackupPeriodicWork.backupNow(ThinBackupPeriodicWork.java:89) 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:748)

The "/var/lib/jenkins/jobs/Reference Tests - Run Defragmentation/lastSuccessful" is a link to non-existing file (because the job was not run yet, or simply the builds were deleted).

After deleting all links to non-existing files, running ThinBackup didn't result in any exceptions in Jenkins log, and old backup sets were deleted ("Max number of backup sets" honored).

 

 

 

 

 

 

 

This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
Atlassian logo

piotr.krukowiecki@parasoft.com (JIRA)

unread,
Mar 2, 2018, 4:03:02 AM3/2/18
to jenkinsc...@googlegroups.com
Piotr Krukowiecki edited a comment on Bug JENKINS-18866
Same issue.

*Additionally, this causes ThinBackup to not delete backups set ("Max number of backup sets" option ignored). This filled our build server disks (40 GB of ThinBackup logs).*


That is, we have set limited number of backups set to be kept. But it seems the backup sets are not deleted. When I click "Backup Now", a new backup folder is created (for example "FULL-2018-03-02_09-26"), but old folders are not deleted. In Jenkins logs I can see following:
{quote}Cannot perform a backup. Please be sure jenkins/hudson has write privileges in the configured backup path '/tmp/jenkins_backup'. java.io.FileNotFoundException: /var/lib/jenkins/jobs/Reference Tests - Run Defragmentation/lastSuccessful (No such file or directory) at java.io.FileInputStream.open0(Native Method) at java.io.FileInputStream.open(FileInputStream.java:195) at java.io.FileInputStream.<init>(FileInputStream.java:138) at org.apache.commons.io.FileUtils.doCopyFile(FileUtils.java:1138) at org.apache.commons.io.FileUtils.doCopyDirectory(FileUtils.java:1428) at org.apache.commons.io.FileUtils.doCopyDirectory(FileUtils.java:1426) 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.backupAdditionalFiles(HudsonBackup.java:289) at org.jvnet.hudson.plugins.thinbackup.backup.HudsonBackup.backup(HudsonBackup.java:171) at org.jvnet.hudson.plugins.thinbackup.ThinBackupPeriodicWork.backupNow(ThinBackupPeriodicWork.java:89) 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:748)
{quote}

The "/var/lib/jenkins/jobs/Reference Tests - Run Defragmentation/lastSuccessful" is a link to non-existing file (because the job was not run yet, or simply the builds were deleted).

After deleting all links to non-existing files, running ThinBackup didn't result in any exceptions in Jenkins log, and old backup sets were deleted ("Max number of backup sets" honored).

  *Also, it looks like the created backup is not complete (backup process stops when exception is thrown?)*

Due to this, I am increasing priority to Critical, as backup process is unreliable, and   the broken links are common / normal in jenkins.

 

 

 

 

 

piotr.krukowiecki@parasoft.com (JIRA)

unread,
Mar 2, 2018, 4:03:02 AM3/2/18
to jenkinsc...@googlegroups.com

jglick@cloudbees.com (JIRA)

unread,
Aug 21, 2019, 9:47:02 AM8/21/19
to jenkinsc...@googlegroups.com
Jesse Glick commented on Bug JENKINS-18866
 
Re: Symlink prevens backup from ThinBackup

Probably obsolete as of JENKINS-37862. (No new build symlinks are created or updated. See the upgrade guide; existing symlinks are not removed automatically.)

This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

weiss.helene@web.de (JIRA)

unread,
Oct 31, 2019, 8:43:04 AM10/31/19
to jenkinsc...@googlegroups.com
Helene W updated an issue
 
Change By: Helene W
Priority: Critical Blocker
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

weiss.helene@web.de (JIRA)

unread,
Oct 31, 2019, 8:49:02 AM10/31/19
to jenkinsc...@googlegroups.com
Helene W commented on Bug JENKINS-18866
 
Re: Symlink prevens backup from ThinBackup

Hi,

I have the same issue that Piotr Krukowiecki described.

All of our backups are corrupt due to errors like this:

Cannot perform a backup. Please be sure jenkins/hudson has write privileges in the configured backup path 'E:\JBackup'.
java.io.IOException: Failed to list contents of E:\Jenkins\jobs\Experiments\jobs\Company\jobs\RollingBuildRerun\jobs\Rerun_Rolling_Build_param\lastSuccessful

 

This also causes that the moving of old backups to ZIP files is not performed.

 

I'm setting this bug to Blocker as the plugin is simply not usable if it does not create a backup.

 

System data:

Windows Server 2008 R2 SP1

Jenkins version 2.195

ThinBackup Plugin version 1.9

 

 

Reply all
Reply to author
Forward
0 new messages