UNIBASE

ubBackup: How to backup a Unibase application

NAME

ubBackup – backup Unibase applications and user data

SYNOPSIS

ubBackup {--app <application>} {--customer <customer>} {--days <days of backups to retain (default 14)>} {--extra <extra directories to backup>} {--remote <remote rsync offsite>} {--verbose}

DESCRIPTION

ubBackup is used to backup Unibase applications and should be used daily.

To set up a daily backup put ubBackup as a command in /etc/cron.daily. The simplest way to do this is symbolically link it to the directory.

For more complex cases, such as limiting the number of backup days, create a small bash script in /usr/local/app and symbolically link it to /etc/cron.daily.

ubBackup stores backups in the /ubBackup directory. If this directory doesn’t exist, ubBackup will create it. WARNING: Backups can grow large over time. To manage backup size effectively, manually create the /ubBackup directory as a symbolic link to an adequate backup device, set its permissions to drwx------, and ensure root owns

The directory structure below /ubBackup is:

_APPS – backups of application source code

<customers> – backups of customer data. This is stored as .Agz, .num, and .seq files produced by ubTableDump. Directories in /data/<customer>/<application> are backed up as tar.gz files, except for tmp which is cleared.

app – /usr/local/app/*.[dk]* backed up as <date>.tar.gz

extra – extra backups from –extra flag

In each of these directories, ubBackup creates a directory named with the backup date format YYYYMMDD. This directory holds the backup. For example, a backup date of 1 December 1970 creates the directory 19701201, and ubBackup stores application source in /ubBackup/_APPS/19701201/.1201/

FLAGS

–appSpecify application to backup.
Default is all applications
–customerSpecify customer to backup.
Default is all customers. Note this might overwrite an existing backup.
–daysNumber of days of backups to retain.
Default is 14
–extraExtra customer directories to backup.
This is a comma separated list. Each directory is specified in two parts:
<full path name>:<tar name>
eg /home:HOME,root:ROOT
The extra directories are backed up to /ubBackup/extra/<date>
–remotersync remote user and location for offsite backup.
eg ec2-user@<backup server>:/backup
–verboseubBackup normally works silently. If you want to see the progress of ubBackup use –verbose.
Either way the backup progress is logged in the system log (/var/log/messages or journalctl)

Verified by MonsterInsights