File Time/Size - Backup Utilities

In the course of my work, I often make changes across a large set of files.

This leads to a bit of a problem doing backups. There are several options:

1   Use some sort of cool/fancy backup program which mananges diffences.
    This can work ok, but I treat backups as VERY imporant data to be able
    to access later, and most of these program save their backups in an
    undocumented proprietary format.  Good luck recovering anything if for
    any reason the backup program "decides" it can't restore it.
    
2   Backup the entire set
    This works well for small sets of files, but leads to a lot of storage
    for backups (and duplication of data) of large sets of files.
    I often make many small changes across a the entire file system, so this
    approach doesn't always work well for me.

3   Remember where you have made changes and only backup those files.
    I don't trust my memory - I might have made "little tweaks" to some files
    I wasn't originally planning to change.
    "DIR" can help, but going thorough a directory listing for a large tree
    can be tedious, and unless you are backing up every day, knowning which
    dates "matter" can be tricky.

4   Record File Times/Sizes when you are about make a backup. Compare with
    the recording made with the previous backup to know exactly what has
    changed.
    Only downside to this approach is that DIR listings are big, and comparing
    to the previous one is not always easy as the listing may be rearrnged.

These tools makes #3 easy!

RFTS will make a recording of all file timestamps and sizes in a directory
path (which may be very large - up to 65536 files).
    .FTS file format:
      1 byte    - Length or source path
      ?bytes    - Source path (no zero term).
        1byte   - Number of characters to add to filename
        1byte   - Number of characters from Previous name which are also
                  at the start of this name (should be 0 for first entry)
        4bytes  - Timestamp of file
        4bytes  - Size of file
            Should still work for files >4294967295 bytes unless
            new size is different and has the same lower 32 bits.
        ?bytes  - Character to add to filename (no zero term).
        .. Repeated for each file ..
    run: RFTS           with no arguments for a summary of command syntax.

CFTS will compare two such recordings reporting and files differences:
    N1: File does not appear in recording #1
    N2: File does not appear in recording #2
    ?D: Files have different sizes and/or timestamps
    run: CFTS           with no arguments for a summary of command syntax.

DFTS is a very simple utility which displays the .FTS file produced by
    in readable form.
    run: DFTS           with no arguments for a summary of command syntax.

FTSBK will read the report produced by CFTS and copy the changed files to a
    location with an index of what goes where.  You can then compress/archive
    just this location to backup the changed files only.
    run: FTSBK          with no arguments for a summary of command syntax.

FTSBR will display/restore the backup set created by FTSBK
    run: FTSBR /?       for a summary of command syntax.


FTSMV will "move" a .FTS file to indicate that it came from a different
    place. Useful to restore/check directory structures that you have moved.
    run: FTSMV  with no arguments for a summary of command syntax.

Here are some sample commands I use to backup a couple of large directories
on my C: drive to my removable E: backup drive using temporary storage on R:
    Note, this is using the DVM/Windows versions of the tools, just remove
    "dvm " if you are using the DOS versions.

    rem ; First record the File Time/Size information
    dvm rfts R:\DDS  R:\DDS
    dvm rfts R:\Dave R:\Dave

    rem ; Then create R:\FTS.TXT with information on what has changed
    rem ; It is assumed that you saved the peopr set of .FTS files to E:\FTS
    dvm cfts E:\FTS\DDS  R:\DDS  -S "W=R:\FTS.TXT"
    dvm cfts E:\FTS\Dave R:\Dave -S "W=+R:\FTS.TXT"

    -- When backing up:
        rem ; Create a directory and copy in the changed files
        mkdir R:\BK
        dvm ftsbk R:\FTS C:\ R:\BK

        rem ; Backup is complete, make a copy on E: drive
        copy R:\*.FTS E:\FTS
        rem ; also archive R:\BK and copy to E:

    -- When restoring a backup:
        rem ; dearchive it, for this example it's back in R:\BK
        dvm ftsbr r:\BK -y

Limitations of these tools:

Total pathnames are limited to 255 bytes.
    Never a problem for me, and I think it's been very rare that I've seen
    any third-party names which are this long.
    *The DOS versions of the tools are limited to DOS 8.3 names.

Maximum of 65536 files.
    Almost never a problem, but if you do run into it, just make smaller
    .FTS files of subdirectories.

Dave Dunfield   -   https://dunfield.themindfactory.com
       Download and see my product CATALOG.
