Dear all,
I've just finished installing and configuring 2 BitBucket Server instances on the very same host.
I have both working perfectly integrated with Jira and Confluence. Each Bitbucket instance has its own Jira and its own Confluence instances.
Behind all instances I have MySQL with 6 databases (2 Jira's, 2 Confluence's and 2 Bitbucket's).
I have configured local backups for both Jira's and both Confluence's without any major issue (mysqldump into an .sql file)
But when I faced Bitbucket I found there are 3 methods to get the backups done. Due to my constrains, I chose "DIY backup" and adapted it to MySQL following several tips (including this one ).
Since I'm having 2 instances, I split the script usually called "bitbucket.diy-backup.vars.sh" into two new scripts called "bitbucket.diy-backup.vars_INSTANCE1.sh" and ""bitbucket.diy-backup.vars_INSTANCE2.sh"
To allow using these files, I've modified the script called "bitbucket.diy-backup.sh" by commenting one line and adding the following code:
case "$1" in
INSTANCE1)
source "${SCRIPT_DIR}/common.sh" INSTANCE1
;;
INSTANCE2)
source "${SCRIPT_DIR}/common.sh" INSTANCE2
;;
*)
echo "Usage: $0 { INSTANCE1 | INSTANCE2 }
;;
esac
#source "${SCRIPT_DIR}/common.sh"
And consequently, I've modified the file common.sh to get this under consideration:
case "$1" in
INSTANCE1)
BACKUP_VARS_FILE=${BACKUP_VARS_FILE:-"${SCRIPT_DIR}"/bitbucket.diy-backup.vars_INSTANCE1.sh}
source "${SCRIPT_DIR}/common.sh" INSTANCE1
;;
INSTANCE2)
BACKUP_VARS_FILE=${BACKUP_VARS_FILE:-"${SCRIPT_DIR}"/bitbucket.diy-backup.vars_INSTANCE2.sh}
;;
*)
echo "Usage: $0 { INSTANCE1 | INSTANCE2 }
;;
esac
# BACKUP_VARS_FILE=${BACKUP_VARS_FILE:-"${SCRIPT_DIR}"/bitbucket.diy-backup.vars.sh}
All these "magic" is working perfectly ... but one detail: the size of the backups are increasing every time the backup is run ... and its mixing backups from INSTANCE1 into INSTANCE2 folder:
root@localhost: /backup/bitbucket_INSTANCE1/backup-archives # du -sh *
729M bitbucket-INSTANCE2_20190305-063002.tar.gz
2,2G bitbucket-INSTANCE2_20190305-125802.tar.gz
So I'm running out of disk, and I wish to know what might be wrong here.
Is there any bitbucket-instances-interaction playing here in the background?
Any help over there?
Thanks and warm regards