Herein is a script which can synchronize/update/transfer files on two Linux-based computers via a floppy. (Note that this is similar to net_xfer available in the October 1999 issue of SysAdmin magazine, but uses a floppy approach instead.)

Important note: Although I am willing to explain how these programs and scripts work, I am not willing to write programs for you (unless, of course, you pay me a great deal :-). All this software is provided as-is and it is your responsibility to modify it to your liking.

To use:

  1. Obtain and then install afio (I use version 2.4.2) and rsync (I use version 1.6.3).
  2. % mkdir $HOME/trash
  3. Under C-shell:
    % setenv TRASHDIR $HOME/trash
    or under Bash:
    $ export TRASHDIR=$HOME/trash
    (Obviously, you can use any name you wish for TRASHDIR other than $HOME/trash.)
  4. Under C-shell:
    % setenv PLATFORM ""
    or under Bash:
    $ export PLATFORM=""
  5. On your "work" system (the other system), under C-shell:
    % setenv WHERE work
    or under Bash:
    $ export WHERE=work
  6. On your "home" system (your system), under C-shell:
    % setenv WHERE home
    or under Bash:
    $ export WHERE=home
    It is important that $WHERE be set regardless. Otherwise, fdbackup will not know how to act.
  7. % mkdir $HOME/work
    % mkdir $HOME/home
  8. (Optional) Set up an alias for mv. Under C-shell:
    % alias mv "mv -q"
    or under Bash:
    % alias mv="mv -q"
    This is essentially a way of doing "noclobber" with mv. This can be useful.
  9. Put rm, mv, timeon, and timeout in your path after compiling them (hopefully, "make rm mv timeon timeout" will work). It is important that the rm and mv provided are in your path before the default versions (usually located in /bin) and that you use them always. (You can test whether you are getting the right ones by doing "which rm" and "which mv".) If you do not use the provided rm and mv, you will not gain the benefits of files being moved/renamed and removed identically. (A file $TRASHDIR/rmmv_trail.out is generated which records all this information. This file is accessed in fdbackup.) All files removed with rm are moved to $TRASHDIR. It is probably worthwhile to delete the files and directories in there occassionally. (I have a script which will delete files in there based on access and modification times of the files; if you would like me to make this available, please tell me.)
  10. Modify fdbackup and fdbackup.aux (both in the bin directory) to suit your needs. Points of note:
  11. Use fdbackup. With no arguments, it both reads and writes to a floppy. fdbackup with 1 argument will do read; with 2 arguments, a write. Note that if you do not use the enclosed rm program, any synchronized files are subject to being deleted forever!!

Here is the software: robertutils.tar.gz

Note: I also have a wrapper for "gzip" and "gunzip" which puts info into $TRASHDIR/rmmv_trail.out. I may make it available if there is demand. Please ask.

Robert's Scripts

Date Last Modified: Thu Feb 15 16:02:50 UTC 2007