Recommended Maintenance for Self Hosted/DCE customers

Recommended Maintenance for Self Hosted/DCE customers

Hello,

the following is VERY highly recommended actions for maintenance of your Bacula4 Self Hosted/DCE edition install

1) Perform a FULL pgSQL Vacuum process once per month. As of Jan 9th 2017, Bacula4 will be contacting each Self Hosted/DCE customer to perform a major version upgrade (this particular upgrade needs to be done by us manually vs using the self service upgrade process in customers admin interface). During this upgrade, we will be performing a full pgSQL vacuum process for all existing customers and will be implementing the cron to run this process automatically.  No action is required on the customers part. All FUTURE installs and deployments will have this configured and setup automatically during the deploy process. During the full vacuum process (15th of each month starting between 1-2 AM EST), customers can expect to see some database locks and "hanging" type of behaviour for a few hours intermittently until the vacuum process completes.

2) Customers ARE VERY HIGHLY RECOMMENDED TO BACKUP THEIR PGSQL DB on both their WEB GUI server and their Director server. Ideally, pgSQL is dumped to an external location and not on the same disk array as the production environment.  Please note, without backups of these databases, it will be impossible to restore your application in case of physical loss of arrays to the director or GUI service

https://www.postgresql.org/docs/9.1/static/app-pgdump.html

We have created a dump and export script to help customers with this process
Below is a catalog/DB backup script. It saves DB dumps to the CIFS share.

save file as "Catalog-backup.sh.txt" (no quotes) - plain text in your favourite text editor

#!/bin/bash

##########################################
### Clusterlogics
### Clusterlogics pgsql catalog DB backup script
##########################################


##########################################################
### Backup server CIFS share info where to place backup
##########################################################

SERVER="HOSTNAME/IP"
USER="CIFS share username"
PASSWORD="CIFS share password"
SHARE="share"


########################################################
###### pg_dump binary full path
########################################################

PG_DUMP="/usr/pgsql-9.1/bin/pg_dump"


########################################################

echo "================================================================="
echo "================================================================="
echo "Staring bacula catalog backup `date +%c`"

WORKING=`/bin/ps auxfww | /bin/grep "dump " | /bin/grep -v "grep" | wc -l`
    if [ $WORKING != 0 ]; then
        echo "[`date`] Backup is already running. CAN'T RUN this backup !!!!  `date`"
        exit 1
    fi


echo "[`date`] Mounting backup share"
  MOUNTED=`/bin/mount | /bin/grep "backup" | grep -v "grep" | wc -l`
    if  [ $MOUNTED = "0" ]; then
         /bin/mount -t cifs -o username="$USER",password="$PASSWORD" //"$SERVER"/"$SHARE" /mnt/backup || exit 1
        echo "[`date`] Backup share mounted"
    else
        echo "[`date`] Backup network share already mounted ..."
    fi

  /bin/df

  [ ! -d /mnt/backup/new ] && /bin/mkdir /mnt/backup/new

  /bin/chown postgres.postgres /mnt/backup/new

echo "[`date`] Backing up /opt/bacula"
  /bin/tar czf /mnt/backup/new/opt_bacula.tgz /opt/bacula
echo "[`date`] Backing up /home/baculauidev "
  /bin/tar czf /mnt/backup/new/home_baculauidev.tgz /home/baculauidev
echo "[`date`] Starting DB export"
  /bin/su -l postgres -c "$PG_DUMP -c -Z 2 -f /mnt/backup/new/bacula.sql.`/bin/date +%s`.gz bacula " || exit 1
echo "[`date`] DB export sucessfully completed"
  /bin/touch /mnt/backup/new/COMPLETED
echo "[`date`] Rotating backup"
  [ ! -d /mnt/backup/`date +%A` ] && mkdir /mnt/backup/`date +%A`
  /bin/rm -f /mnt/backup/`date +%A`/*
  /bin/mv /mnt/backup/new/* /mnt/backup/`date +%A`/

  /bin/umount /mnt/backup

echo "[`date`] Backup sucessfully completed "

echo "================================================================="
echo "================================================================="

exit 0



OTHER INSTRUCTIONS
-Script should be placed in the secure file accessible only for root, like
/root/Scripts/Catalog-backup.sh
-because it has backup share access hose details need to be entered in
the script during its install
-the corresponding root crontab record can as follows to backup up the catalog pgsql DB nightly
5 23 * * * /root/Scripts/Catalog-backup.sh >> /root/Scripts/backup.log  2>&1

NOTES
-customers will multiple directors can choose to use the above pgsql backup process on their installs - OR - they can backup each director + catalog to the other respective director and catalog using our GUI
-WITHOUT THE APPROPRIATE PGSQL BACKUP ON YOUR INSTALL, IF YOU LOSE YOUR DIRECTOR SERVER AND CATALOG DATA, YOU WILL NOT BE ABLE TO RECOVER YOUR INSTALL AND WILL NEED TO REINSTALL FROM SCRATCH. WITH THE AVAILABLE PGSQL BACKUPS (AS OUTLINED ABOVE) YOUR INSTALL CAN BE EASILY RECOVERED IN CASE OF DISASTER
    • Related Articles

    • Licensing How To (DCE/Self Hosted)

      With the DCE/Self Hosted edition, licensing is controlled via your accounts.bacula4.com portal 1) log into https://accounts.bacula4.com and manage your DCE/Self Hosted Service 2) upgrade/downgrade at section below, and set license numbers to what you ...
    • Self Hosted - basic configuration notes and requirements

      The Self Hosted Solution allows customers to install our platform on their own infrastructure within their own facilities/locations. The purpose of deploying our solution in this capacity is: 1) adhere to our "open" standards concepts, allowing the ...
    • DCE/Self Hosted Installs - New Linux BMR and Progressive Full Backups launched - EOL Legacy BMR March 31st 2016

      Bacula4 is pleased to announce 2 new Key Features for our DCE/Self Hosted customers. New Linux ReaR BMR PLEASE NOTE - Legacy BMR will be EOL March 31st 2016 and will be completely removed from your installs Action Required - Please enter the wizard ...
    • Recommended Partitioning for the Director and Web Roles

      Below is the recommended partitioning for the Bacula4Hosts Datacenter Edition (DCE) director and web roles.  Please keep in mind that this partitioning scheme works well for most customers, but some environments may require more specialized ...
    • Storage Daemon (SD) Recommended Hardware Recommendations

      Note: We will continue to update this documentation as time goes on and we work with customers on their specific environments. If you have any questions about your specific environment, please do not hesitate to contact us. Thank you! Hardware CPU: ...