Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-5132

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

    XMLWordPrintable

Details

    Description

      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
      

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: