ubBackup

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, eg limiting the number of backup days, it is recommended to create a small bash script in /usr/local/app and symbolically link that to /etc/cron.daily.

ubBackup backs up into the directory /ubBackup. If this directory doesn’t exist ubBackup will create. WARNING: backups can get big over time. It is recommended that /ubBackup be created manually as a symbolic link to a large enough backup device. The permissions should be drwx—— and it should be owned by root.

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 a directory for the backup date is created to hold the backup. eg a backup date 1 December 1970 would have the date 19701201 and application source would be stored in /ubBackup/_APPS/19701201/

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)