taBackup v1.03

taBackup is a simple backup program. Define file sets or write small scripts to backup your internal disk to a CF-disk, to synchronise two folders, or to perform other stunningly complex tasks.

Read the "Known Problems & Limitations" section. As the main task of this program is copying files, some malfunction could possibly involve accidental deletion of your data. In any case, I cannot be made responsible for any damage, data loss, or whatsoever unintended consequence caused by this program.

Copyright (C) 1999-2001, Thomas Link <thomas.link@a1.net>

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program 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 General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Or download the GNU-License from:
www.gnu.org/copyleft/gpl.html

Installation

Download the latest distribution from: members.a1.net/t.link/taBackup.html

Handheld: Decompress the zip archive. Copy the sis-file to your Psion or, assuming that you have Psiwin or a similar program installed, connect your Psion to your desktop computer. Now doubleclick on the sis-file.

Emulator: Start the emulator. Doubleclick on the sis-file. Replace the contained opx files with their Intel counterparts, as using the ARM versions of these OPX files with the emulator will result in an error. Download the proper versions of the included OPX files from Symbian's (Sysram1.opx, Systinfo.opx, Alarm.opx: www.symbian.com), and Neuon's (nListBox.opx: www.neuon.com) web sites. Restart the emulator.

Settings

You have to define file sets or scripts, first. Therefore, you have to edit the configuration file. Press ctrl+f, choose "Config" from the button bar, or "Configure filesets" from the menu. Search the help file for the section "Configuration file" to find out how to define file sets.

On the main screen, tap onto the text area or press the enter key to bring up the main dialog. In case you just want to play around a little bit, choose "Preview" from the "Action" menu.

Note:
The names of these options, e.g. 'run faster', are suboptimal. I know.

Action: modes of operation

Mode: modes of copying files (A to B)

Backup Set: select a file set or script as defined in the configuration file

Pattern: restrict a backup set using pattern matching:
? matches any single character
* matches any group of characters.

Keep versions: number of older versions you want to keep. As long as you don't have a really large CF-disk, change its value only for specific scripts using the set-command. If you reduce the number of versions you want to keep, superfluous files are deleted. This behaviour can be changed by setting the appropriate option -- see the "Options" section.

Log level: Determines how detailed the log should be. As long as no problems occur, choose level 2.

Catalog, Image

Every file copying action is registered in the catalog. You can review this catalog and restore files from the backup disk.

An "image" is basically the same as a catalog, with the exception that only the files present during the last run are registered. The image is stored in the destination directory.

Both features have to be enabled by selecting the appropriate option -- "Build Catalog" or "Build Image" -- in the preference dialog.

The find command in the browse dialog supports simple pattern matching using the "*"-wildcard.

Tip:
Cross-check: use this option in conjunction with "Build catalogs" in order to check for anomalies.

Configuration file

Please be aware that your definitions are not checked for sanity. If you do something wrong, the program either -- likely -- ignores your input or -- possible -- crashes.

Backup configuration file: use this option to backup "config.txt" and "taBackup.ini" to a backup directory. In case of total data loss copy these files back to "c:\System\Apps\taBackup\". The backup directory is the same as for configuration files, the catalog, images etc.

Example configuration file:

[fileset]
Word Documents
*
C:\**HOME\
D:\Backup\**HOME\
type=Word

[fileset]
ini-Files (System)
*.ini
C:\System\
D:\Backup\System\

[script]
Cleanup
del C:\System\Temp\*
del C:\System\Wtldata\Cache.wtd

[exclude]
C:\System\Temp\*
C:\System\Wtldata\*

[uid]
taBackup=268457420

Backup Sets

Example entry:

[fileset]
Standard Folder
*.doc
C:\**HOME\
D:\Backup\**HOME\
type=Word

Exclude Files

Example entry:

[exclude]
C:\System\Temp\*
C:\System\Wtldata\*
*\_viminfo

Options

The following options can be defined in the configuration file:

Example entry:

[options]
www=web
editor = taBackup
escape = on

Virtual Paths

Note:
This feature is experimental.

What is this good for? I have experienced some incompatibilities between Epoc32 and Windows 98 in handling CF-disks. Use this feature for those subdirectories on your CF-card -- do not declare the whole d: drive as a virtual path -- you want to access from different computers.

In the "virtual paths" section of your configuration file you can map virtual paths onto real paths. This sounds better than it actually is, as, at the moment, you can only transform long filenames to shorter ones without blanks.

Each line in the "virtual paths" section defines a virtual path. The syntax is: "protocol:format:path". The conversion information is stored in "c:\System\Apps\taBackup\DirTable.~D~". You can backup this file to the same folder as your catalog. If you "lose" or delete this file, you could run into problems.

It should be possible to reconstruct this file, but this is not implemented at the moment. In addition, there is no way to delete old entries. This means that, if you change the format, the former filename is possibly used nevertheless. I have to think about what to do with files that vanished mysteriously, i.e. without taBackup's intervention.

Protocol: At the moment there is only one protocol available, which is "local".

Format: The elements of the format string are separated by commas. Valid options are:

Tip:
Think about the format you want to use first. It is not a good idea to change it later on.

Path: Paths must not be enclosed in quotes, even if they contain special characters.

Example entry:

[virtual paths]
local:nb,fmt8.3:d:\Backup\Transfer\
local:fmt20.5:d:\Backup\Exchange\

Conversion table: In each subdirectory a file named "_tbBckp.~D~" is created. This is a plain text file containing information about the virtual filename, the real filename, the modification date (as seconds passed since 1.1.1970 adjusted to time zone and summer time, i.e. according to Greenwich Mean Time). It shouldn't be too difficult to write a small script to convert short filenames to their actual ones (ironically called virtual filenames).

Note:
If you manually add a file to a directory that is defined as a virtual path, you will also have to edit the corresponding "_tBckp.~D~" file. Otherwise the file will be invisible to taBackup. Set the date value to 0 (zero).
Note:
For removing or changing a single entry, you will have to edit _tBckp.~D~ as well as c:\System\Apps\taBackup\DirTable.~D~. The latter one is a data file, which can be edited using programs like PsiDat by Kevin Millican.

Example _tBckp.~D~ file:

#!taBackupConvertXDT
xdt-timestamp=987539512
xdt-version=1
xdt-data:
Test 1.txt*Test_1.txt*971629558
New File*New_File*0

Script Files

Scripts

Scripts contain a series of shell/CLI/DOS like commands. I guess there a better programs around for writing batch scripts, but this didn't keep me from doing my own stuff. Be aware of the fact that most of this is anything else but carefully tested.

Example entry:

[script]
Example script
bak C:\Startup\ D:\Backup\Startup\
sync C:\System\ HD:PsionBackup:System: *.ini
cp "C:\Startup\Test 1" D:\Backup\Startup\Test_1
del "C:\Startup\Test 1"
if exist * del C:\config.txt
if not exist * md C:\Startup\
if days03 * del C:\config.txt
for c:\bat\* d:; c:\download\* d: \\ if days03 * cp **1 **2
set 1 1
label x
print **v01
add 1 1
if < **v01 10 goto x

[script]
test 1
for C:\OPL\* \\ call "test 2" **1

[script]
test 2
print **a1

UIDs

In your configuration file you can define UIDs, in order to determine the owner of a file. These UIDs are appended to the "File Type" menu.

Example entry:

[uid]
taBackup=268457420

Commands

Commands to manipulate slots

FOR

IF

known tests:

Slots

A slot or register is a rather simple mechanism to store data for later retrieval. All slots are global. If you want to do something that can't be done this way, implement it as an external opl command.

Example entry:

[script]
test 1
set$ 1 abc
add 1 1
print **v01 = 4
set$ 1 abc
add$ 1 1
print **v01 = abc1
add 1 0
print v01: **v01 = 4
set 1 1+2
print v01: **v01 = 3
add 1 1+2
print v01: **v01 = 6
set 2 **v01 + 2
print v02: **v02 = 8
set$ 2 **v01 + 2
print v02: **v02 = 6 + 2
eval 2
print v02: **v02 = 8
for C:\OPL\* \\ call "test 2" **1

[script]
test 2
print **a1

External programs

When speaking about connections from taBackup to external programs, I refer to the possibility of (1) calling OPL-procedures from within a taBackup script, and of (2) calling taBackup from some other program. The first one is achieved using the "OPL" or the "OPLF" command. The second can be made easier by using command line switches. In a command line perspective, the syntax for calling taBackup is:

taBackup [path to a taBackup file|option ...]

where "option" is one of the following:

Which is stupid, as any script of file set name is a valid command. If the argument contains a slash ("/"), the whole argument has to be enclosed in single quotes.

External commands (OPL, OPLF) or scripts (LOAD) are searched in the following directories:

  1. **external (as defined in the "Options" section)
  2. c:\System\Apps\taBackup
  3. !:\System\Apps\taBackup (on the disk where taBackup was installed)

For calling taBackup from an OPL program, adapt the following example:

include "system.oxh"
proc test:
local thread&
thread& = runapp&:("OPL", "/call=Test /cmd='print /0' /cmd=pause 0", "Rc:\System\Apps\taBackup\taBackup.app", 0)
endp

DOS, Mac, Unix

The program is aware of different file naming conventions. At the moment, this feature is 100% useless. Nevertheless, possible future uses would be: making a backup to a Mac or Unix computer, to a ftp server etc. EpocSync already does synchronisation via ftp. Thus, I don't think that I will implement any of these features.

Example entry:

[fileset]
Backup to Mac
*
C:\Dokumente\
HD:PsionBackup:Dokumente:

[fileset]
Backup to Unix
*
C:\Dokumente\
~/PsionBackup/Dokumente/

Known Problems, Limitations, and Unexpected Behaviour

Version History