© 1997-1998 Gilbert ROBERT
This document describes:
The Unix Backup Tool (UBT) is a tool written in Tcl/Tk and using
Expect to control the interactive commands like dump.
It allows to define automatically from templates descriptions the files
system list to backup, and with a nice interface to change the options
and follow the backup progress.
Screen Shot of the UBT main interface
(Size: 68 Kbytes)
The motivation for UBT arose, as software often does, from frustration.
My first impulse was to search the web for an existing backup tool, but
the softwares I found, was either commercial or do not correspond to my
- A simple and nice graphic interface to configure and follow the
- Create automatically the machines and file systems list to backup.
- Perform a full backup on tapes but also an incremental backup
with no special human action.
- Allow to limit the file system list with restriction like
backup all FS with /export/home prefix.
- Perform tape action.
- Detect unreachable machines and do not block the backup process.
I have no much time to improve it, but I think It can be the basis for
new features and enhancements. Thus this freeware is available with the
Gnu licence and it's recommended to
send your comments, feedback and changes to the author.
The new versions obtained
with the changes will be available as soon as possible.
Please mention the date and the ralease number of the sources you used.
This tool has been tested on the Unix machines with Solaris 2.*, SunOs,
and Linux 2.*
The most recent version of the package is titled UBT1.3, and can be
retrieved in UNIX standard packaging format:
How to install the package
When you get the package type the following commands:
You obtain a directory UBT1.3 with executables and
- Go into the target directory and copy the distribution:
- Uncompress the package: gunzip UBT1.3.tar.gz
- Untar the package : tar xvf UBT1.3.tar
- go to bin directory, change the UBTHOME variable corresponding to your
- type make; and make install
- ubtool, (expectk script)
it's the main program.
- ubtoolcron, (expect script)
It's a ubtool lighted version, to be used online (for an
incremental backup called from cron program ...).
- ubt.cnf, (perl script)
This perl script builds automaticaly the list of file systems.
It performs the definition of mounted file systems of each
machine given in the arguments. The machdf command is called
and restrictions can be done if needed.
- machdf, (shell script)
This shell script tests with ping if the machine is reachable
and execute an uname -r command on the target machine.
If this command failed because you don't have the right permissions,
an error message is sent back.
- wrapg, (shell script)
This shell script has to be reachable from all the machines to be
backuped. It allows to execute a command with a redirection of the
standard error into the standard output. The status allows to
get back an error message if an error occured. Expect can
use this information to print it out in the backup console.
- UBTdefault.tcl, the defaults to be redefine if necessary.
- ubtbackup.tcl, the main part starting the backup command.
- ubtconfig.tcl, sub-routines to configure the backup.
- ubtcopyright.tcl, the copyright file.
- ubtmain.tcl, the main routine, with the nice interface.
- ubtmt.tcl, sub-routines to execute magnetic tape control.
- ubtoptions.tcl, open the options window interface.
- ubtrestore.tcl, sub-routines to restore files.
- ubtutils.tcl, util sub-routines
- ubtwarning.tcl, open a warning message.
ubtwarningcron.tcl: Libraries for the incremental backup ubtoolcron.
- data.tpl.full, A template file for full backup.
- data.tpl.home, A template file for home partitions
- data.tpl.extern, A template file for extern machines
- data.tpl.solaris-full, A template file for Solaris
type machine to backup.
- data.tpl.sunos-full, A template file for SunOs
type machine to backup.
- data.incr, A template file for the incremental backup. It's
the argument to give to ubtoolcron program.
- The icons used in the interface.
- The directory to put the backup log files.
You need to have installed:
Now, you need to configure your template files and adapt the global
variables to your site.
The package has been tested with Perl5.001.
The main distribution point for Perl is the
Comprehensive Perl Archive Network, or CPAN.
Tcl and Tk
The package has been tested with Tcl7.4 and Tk4.0.
You could have some problems with earlier version.
The package has been tested with Expect5.19.0.
You could have some problems with earlier version.
For that read the next section.
Edit the bin/Makefile file, and change what has to be changed.
Change in lib/UBTdefault.tcl the global definitions, to adapt them
to your site and needs.
In the bin directory type make. This will change the differents path.
Install the wrapg on all the different system to be
backuped (in principle /usr/local/bin). You probably need to
be super-user to execute this command.
- rcp ./bin/wrapg $SolarisServer:/usr/local/bin
- rcp ./bin/wrapg $SunOSServer:/usr/local/bin
- On each different operating system, create a link
/usr/local/bin/ubtdump to the dump program.
You probably need to be super-user to execute this command :
- on Solaris:
ln -s /usr/sbin/ufsdump /usr/local/bin/ubtdump
- on SunOs:
ln -s /usr/etc/dump /usr/local/bin/ubtdump
- Edit the template files
Go into the data directory and change the template files.
In the interface, the backup type list is dynamically contructed from
the name (the suffix) of the template files present in this directory.
Example: data.tpl.full will correspond to the
Consequently change or create the template files you want to use and
The fields must be separated by TAB character.
| Options || Comments
|| The machine list to backup
|| This is a file-system filter. If the file system name match this
option, it will be selected |
Ex: /export/home or home.
- To match all file-system use the !all item.
- To match all file-system excepted:
|| The path of tape control executable.
|| The options of the tape control program. Ex: "-f"|
|| The action the be execute after the backup has been performed:
|| The action the be execute before the backup.|
|| The operator to execute the commands|
|| The machine to do the backup|
|| The options of dump program.|
|0ubsdf 126 18000 54000
|| time in seconds to wait between backup|
||Define the device of the tape installed on the $mach_todo_backup|
|| The path of the local backup program|
|| The path of the remote backup program|
|| The path of the remote shell program|
|| The path of the mail program|
|| User to be contacted when the backup is done|
|$USER environment variable
- Execute the backtool command.
- In the interface select the type of the backup you want to perform.
- type Configuration in the menu, and wait for the
- Check and Save the configuration
- the commands options.
- the name of the log file.
- when the backup has to be launched.
- the machines and file-systems list. This window is writable and
It's possible to add,delete or modify these informations.
- type Run command.
If the time to launch the backup is not now, a window is opened
and indicates your choice.
The output of the command is printing in the log window, and in the
right part the two jauges indicate the backup proportion of success and
- The backup log is saved in the file you mentionned in the option
window. But you can save the full output of dump with the Save Log
button in the right corner of the main window.
- Read and Edit the file data.incr in the data directory.
- Add the following line in your crontab
0 1 * * 2-6 /usr/local/pck/backup/UBT1.3/bin/ubtoolcron data.incr >
- or just type ubtoolcron data.incr
- The tape_name field indicates the suffix of the log file.
- Abort the backup process is not efficient.
- The mail report is only send by the cron backup.
- A documentation worthy of the name (Sorry for my rough english, but you
can certainly help me ;-) )
- The lock file can caused some troubles. Just delete the file:
data/.lock. This file is setted to prevent the incremental and a full
backup to work simultaneously, but sometimes, depenting of the end of the full
backup, this file is not deleted.
UBT - Unix Backup Tool
Copyright © 1997-1998 Gilbert ROBERT
@version 1.3 Released 07-27-98
This package is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
A copy of the GNU Library General Public License is also available
on the world-wide-web at the
Please don't hesitate to contact me if you have any suggestions or