Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

DIY Bitbucket Backup exits with warnings due to gc.log

Vitalii Djiguir January 30, 2019

Hello Experts,

I have modified sample DIY Backup scripts to work with Microsoft Azure Backup Service (MARS). The issue I am getting is that when MARS is running a backup (while Bictbucket is in maintenance mode) it encounters issues with gc.log and sometimes peeled-tags files across various repositories. 

These files are accessible well after a backup is complete and they are reported as 0kb, however, when I open a file with a text editor I can see some contents (few lines) and then kb size is updated since a flush is triggered.

At the end of the backup MARS reports a warning and logs a list of files with DATA FAILURE 0x80070002, most of which are due to gc.log. 

Since Bitbucket 5+ has implemented its own garbage collection as per this article (https://confluence.atlassian.com/bitbucketserverkb/how-to-perform-a-manual-garbage-collection-on-a-repository-867194296.html), I am hoping someone can shed some light into this issue and how to avoid it.

We are running Bitbucket Server v5.16.0.

3 answers

0 votes
John Smith June 2, 2020

Did you ever get an answer to this @Vitalii Djiguir ?

@Ana Retamal We are also experiencing Azure file backups completing with errors - those errors being some repositories gc.log files under home\shared\data\repositories\#\app-info\gc.log -

Questions:

1) Can this be safely ignored ?

2) Can I delete these files ? 

3) Can i tell the backup not to try to backup gc.log files ? 

4) Are these files important ?

 

Thanks

Vitalii Djiguir June 2, 2020

Unfortunately no, but we have run like that for a while over a year with seemingly no ill-effects. Because it isn't a big issue (at least for now) I haven't spent any time focusing on it.

Like John Smith likes this
John Smith June 2, 2020

Thanks alot for your quick reply and information @Vitalii Djiguir , much appreciated.

0 votes
Vitalii Djiguir February 1, 2019

Hi Ana,

I am actually not looking for help with the script itself. It is more to do with an access to gc.log files. Once I place Bitbucket into maintenance mode, as per your standard script, I activate and run Microsoft Azure Backup which performs a DB backup as well as an incremental backup of Stash Home directory. Here are the steps from Microsoft site describing the backup process.

  1. To set up the scenario, you download and install the Microsoft Azure Recovery Services (MARS) agent on the machine, select what to back up, when backups will run, and how long they'll be kept in Azure.
  2. The initial backup runs in accordance with your backup settings.
  3. The MARS agent uses the Windows Volume Shadow Copy (VSS) service to take a point-in-time snapshot of the volumes selected for backup.
    • The MARS agent only uses the Windows System Write to capture the snapshot.
    • The agent doesn't use any application VSS writers and thus doesn't capture app-consistent snapshots.
  4. After taking the snapshot with VSS, the MARS agent creates a VHD in the cache folder you specified when you configured the backup, and stores checksums for each data blocks.
  5. Incremental backups run in accordance with the schedule you specify, unless you run an ad-hoc backup.
  6. In incremental backups, changed files are identified and a new VHD is created. It's compressed and encrypted, and sent to the vault.
  7. After the incremental backup finishes, the new VHD is merged with the VHD created after the initial replication, providing the latest state to be used for comparison for ongoing backup.

So, when step 3 is executed (snapshot is taken) the process encounters warnings when accessing gc.log files. Since gc.log files are manged by Bitbucket (since v5) I am reaching out to Atlassian to see what can be done here. Is there some maintenance to be performed on the affected repos?

Thanks,

Vitalii

Vitalii Djiguir February 6, 2019

deleted

0 votes
Ana Retamal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 1, 2019

 

Hi Vitalii,

Atlassian does not support modified versions of the script, and we can't guarantee that will work, so anything we do now will be on a best effort basis. 

To better understand why are you getting those errors, can you share what kind of modifications you made to the script? Also, what are the issues reported by the tool?

Let us know!
Ana

Vitalii Djiguir February 6, 2019

I was replying to you and managed to reply to myself... re-posting my reply here...

Hi Ana,

I am not sure how this was marked as an accepted answer, I guess I might have clicked it by accident. 

Whatever I have posted in my previous post was a clarification to my original post and an attempt to answer the questions you have raised.

Thanks,

Vitalii

Vitalii Djiguir February 11, 2019

Suggested UI improvement:

Your color coding scheme for the Accept/Accepted answer buttons is counter-intuitive. Granted, I should read what it says but a green button with a checkbox should mean the answer was accepted and a white button with green border should prompt user to accept the answer. 

Can anyone reply to let me know this question is still being looked at?

Thanks,

Vitalii

Vitalii Djiguir February 13, 2019

Bump

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events