Backup client doesn't exclude STASH_HOME/shared/.lock from backup

XMLWordPrintable

      The backup client reports the following error:

      2014-08-02 02:00:44,927 ERROR  (53%) Error writing tar file entry: The process cannot access the file because another process has locked a portion of the file
      java.io.IOException: The process cannot access the file because another process has locked a portion of the file
      	at java.io.FileInputStream.readBytes(Native Method) ~[na:1.7.0_60]
      	at java.io.FileInputStream.read(FileInputStream.java:272) ~[na:1.7.0_60]
      	... 13 more frames available in the log file
      2014-08-02 02:00:44,973 ERROR  (53%) Failed to close tar file entry: entry 'shared/.lock' closed at '0' before the '15' bytes specified in the header were written
      java.io.IOException: entry 'shared/.lock' closed at '0' before the '15' bytes specified in the header were written
      	at org.apache.commons.compress.archivers.tar.TarArchiveOutputStream.closeArchiveEntry(TarArchiveOutputStream.java:363) ~[commons-compress-1.5.jar:1.5]
      	at com.atlassian.stash.internal.backup.client.extensions.TarExtensions.withEntry(TarExtensions.groovy:31) ~[stash-backup-core-1.3.0.jar:na]
      	... 9 more frames available in the log file
      

      This .lock file is created and held by Stash itself to prevent multiple instances from running with this shared-home. The .lock file should have been excluded from the backup, but hasn't been included in the default excludes list.

      As a workaround, add the following line to your backup-config.properties:

      stash.home.excludes=**/.lock
      

            Assignee:
            Michael Studman (Inactive)
            Reporter:
            Michael Heemskerk (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: