Executable for Windows: TwinDisk.exe
TwinDisk monitors the directories and files selected by user, with or without subdirectories, depending on configuration file. Certain events in the monitored directories lead to the “twin” events in the backup directory. The list of these events is shown below:
Twin directory (back up) can be kept on the local disk, on the shared disk located on another computer, or, with assistance of a command-line application such as SFTP, on a remote computer.
TwinDisk requires a configuration file. The configuration file must contain a special section for each directory that the user wants to back up. Here is a section of configuration file for one directory being backed up on a local or shared disk:
[directory]
local = c:\Distr\order\ ;local directory to
back up
twin = x:\Distr\order\ ;backup directory
sublevels = 2 ;>=1 = recursive, 0 = not
recursive
file = *.doc ;wildcards
file = *.pdf
file = *.xls
Here is a section of configuration file for backup via SFTP:
[directory]
local = c:\Distr\projects\ ; local directory to
back up
local_alt =
c:/Distr/projects/ ; the same directory, but in unix notation (sftp requires
that)
twin = distr/projects/ ; backup directory (on remote computer)
sublevels = 2 ;>=1 = recursive, 0 = not
recursive
file = *.doc ; wildcards
file = *.pdf
file = *.xls
file = credit_card_numbers.txt ; this will
back up only files with this name
file = *.htm
file = *.html
cp = chmod 744 "%t%f";put
"%a%f" "%t%f" ; copy command
update = put "%a%f"
"%t%f" ;
update command
rm = rename "%t%f"
"%t%f.deleted" ; remove
command (see notes)
mv = rename "%t%o"
"%t%f" ; move
command
mkdir = mkdir "%t%f" ; make directory
command
rmdir = rmdir "%t%f" ; remove directory
command
lsfile = ls "%t%f" ; list file command
run = c:\cygwin\bin\sftp
user@remote_comp ; system command to
run sftp on your computer
prompt = sftp> ; sftp prompt
Notes:
The configuration file can contain several such sections, one per directory that you want to back up. Use wildcards to select only the types of files or individual files that you actually want to back up from each directory. Of course you can use “file = *” and back everything up, but that creates unnecessary load on your processor and network.
If a section for a certain directory does not contain commands (cp, update, rm, mv, mkdir, rmdir, lsfile, run), it is regarded as a section for local or shared disk backup. If these commands are present, TwinDisk will try to use them to back up your files via a command-line application. The second example shows commands that will allow TwinDisk to use SFTP to back up your files on remote computer. If you would like to use some other application, its commands will have to be programmed into configuration file. Let me know if you need help with that.
Please note that in the example for SFTP backup, “remove” command will not actually remove the backup file or directory, but just rename it by adding “.deleted” to its name. This feature can be used to protect valuable files and directories from accidental deletion. If you delete such file or directory on your local disk, it will still be available in the backup. If you would like to actually delete backup files when the original files are deleted, replace that line with this:
rm = rm “%t%f”
Special symbols in configuration file commands:
|
Symbol |
Description |
Substituted with |
|
%t |
Twin directory |
Twin |
|
%a |
Alternative name for local directory |
local_alt |
|
%f |
File name |
Actual file name to back up |
|
%o |
Old file name |
File name before the file was renamed |
Comments in configuration file are allowed only as separate line, starting with semicolon (;). In the examples above, the comments are illegal – please remove them before using these examples.
Although TwinDisk can theoretically use many command-line applications to copy files into backup, it has been tested only with local and shared disks, and with OpenSSH SFTP program available in Cygwin installation.

Since most of the Unix and Linux systems have SSH server from some version of OpenSSH, it makes sense to use OpenSSH SFTP to access such computers and use them as backup server. On Windows platform, the simplest way to install OpenSSH is to use Cygwin.
Instructions:
c:\cygwin\bin\ssh
user@remote_comp
where c:\cygwin\bin\ssh is path on your computer to SSH and SFTP applications, remote_comp is your backup computer, and user is your username on it.