AminetAminet
Search:
84782 packages online
About
Recent
Browse
Search
Upload
Setup
Services

util/cli/mirror.lha

Mirror:Random
Showing: m68k-amigaos iconppc-amigaos iconppc-morphos iconi386-aros iconi386-amithlon iconppc-warpup iconppc-powerup icongeneric icon
No screenshot available
Short:Mirror drives, homepages, etc.. (v1.4)
Author:"Sönke Tesch" soenke at kino-fahrplan.de
Uploader:
Type:util/cli
Architecture:m68k-amigaos
Date:2001-05-20
Download:util/cli/mirror.lha - View contents
Readme:util/cli/mirror.readme
Downloads:628

mirror is a small Shell command that creates or updates exact copies of a
directory.
It basically does the same "delete backup_dir all" plus "copy source_dir
backup_dir all clone" would do, however mirror is way faster since it only
touches the files that have been modified or deleted in the source location,
instead of copying the entire directory.
In addition, mirror copies links as links, i.e. not creating a new file on
each link it encounters like copy will do.


mirror comes with an install script and translations for half of Europe :)


I originally wrote this tool to update the files on my Internet site at
kino-fahrplan.de: the server is mounted as Amiga drive with FTPMount (a
fine piece of software also available from Aminet), but instead of copying
(and probably deleting) everything by hand from my local work directory to
the server it can now be done with just one call of mirror.

Took me a some days to notice that this tool is also useful to create
backups of my harddisk and keep them up-to-date. With just 10k it's
probably the smallest backup application available :)


Short explanation of the arguments:
--------------------------------------------------------------------------------
SOURCE/A,DESTINATION/A,NODELETE/S,NOUPDATE/S,NOCOPY/S,IGNOREDATE/S,IGNORECOMMENT/S,
IGNOREFLAGS/S,IGNOREALL/S,QUIET/S,VERBOSE/S,LOG/K

  SOURCE/A      = Name of directory to move files from.
  DESTINATION/A = Name of directory to move files to.

  These options control what to do with files in DESTINATION:
  NODELETE/S    = Do not delete files that do not exist in SOURCE.
  NOUPDATE/S    = Do not copy files that have been modified in SOURCE.
  NOCOPY/S      = Do not copy new files from SOURCE.

  If any of the following is set, mirror will not compare and not copy
  that file/directory attribute.
  IGNOREDATE/S    = Do not care about dates.
  IGNORECOMMENT/S =     "        "    comments.
  IGNOREFLAGS/S   =     "        "    protection flags.
  IGNOREALL/S     = IGNOREDATE+IGNORECOMMENT+IGNOREFLAGS

  QUIET/S       = Do not print any status information at all.
  VERBOSE/S     = Keep status information visible.

Press Ctrl-C to stop mirror completely.
Press Ctrl-E to stop work in the current directory.
Press Ctrl-F in QUIET-mode to view current status line.

mirror returns 5 on any modifications, else 0.
--------------------------------------------------------------------------------

This help text is also available by entering "mirror ?" and, at the prompt,
entering another "?".


- A note on IGNORE...:
  mirror usually compares files by testing if date and size match. In FTPMount'ed
  directories it is not possible to set file attributes like date and comment.
  Since this may cause some confusion you can ask mirror to skip checks on the
  file date, flags and/or comment and only look after the file sizes.
  IGNOREALL is a shortcut for IGNOREDATE, IGNORECOMMENT and IGNOREFLAGS

- A note on delete- or write-protected files:
  mirror does not care about the protection bits! If there is something to
  delete in the destination because it does not exist in the source anymore,
  mirror _will_ delete it. Same applies to write-protection.
  Try NODELETE and/or NOUPDATE if you want to be on the safe side.

- A note on links:
  If it's not possible to create a link in the destination directory, mirror
  will simply copy the source file instead.


If you have any comments or find bugs, please drop me a line: my address is
<soenke@kino-fahrplan.de>.



Known bugs and "Things that look like bugs but aren't"
======================================================

Errors with FTPMount'ed volumes:
  - "invalid object lock" and/or "packet request type unknown"

    These errors are displayed after mirror tried to set the date, flags
    or comment of a file or directory that exists on an FTPMount'ed volume.
    The reason is simply that FTPMount does not support these actions.
    However, these errors only apply to the setting of the file attributes,
    the file has at that point already been copied.

    You should use the IGNORE-arguments if working with FTPMount'ed directories.

    See also: History paragraph for 1.1.

  - "object not found"
    If an ftp-server is not mounted upon access to a file it sometimes returns
    "object not found". Upon the second access to the same file it's there.
    This behaviour seems to confuse mirror somehow and I didn't yet find out
    where exactly the problem is. Unfortunalty mirror then runs crazy on
    sub-directories and copies some files to sys: instead of the destination.
    If you get a DOS-error 24 (no idea what that means, it's returned by
    DOS), you know it'll suck :]

    You should better have your FTP volumes connected before mirror'ing.


Hard links in RAM disk:
  The RAM disk has a bug regarding hard links. If you create a link and then
  write something to the original file, the link turns into a real file with
  the old contents of the original.




History
=======

1.4 14.5.2001 public Aminet release
- Serious bug in the procedure that copies hard linked directories caused
  mirror to crash.
- In some cases the destination directory was not unlocked upon copying links.
- Double attribute cloning produced wierd errors ("unknown dos-packet").
- Directory names on status lines were not correctly aligned.

1.3
- Only copied attributes (comment, protection, date) of directories, not files.
- Directory is always the one of the last change in that directory. mirror first
  copied the date and then copied the objects in that directory, so in the end
  the destination directory date was not the one of the source but of the last
  copied object in the destination.

1.2   4.1.2001 Beta release
- New file locking mechanism added to 1.1 prevented mirror from copying files
  to FTPMount'ed drives. FTPMount always returned "object in use".

1.1   3.1.2001 Translator release
- Copies hard links as links, not as files.
- Added IGNORECOMMENT and IGNOREFLAGS and changed behaviour of IGNOREDATE to
  help work with FTPMount.
- mirror now creates real clones, including file protection bits and comments.
- Minor speed-ups here and there.

1.0 30.12.2000 Translator release


Contents of util/cli/mirror.lha
 PERMSSN    UID  GID    PACKED    SIZE  RATIO     CRC       STAMP          NAME
---------- ----------- ------- ------- ------ ---------- ------------ -------------
[generic]                  563    1011  55.7% -lh5- 3971 Jan 31  2001 ato.readme
[generic]                 3757    6284  59.8% -lh5- c884 May 14  2001 ato.readme.info
[generic]                  826    1620  51.0% -lh5- 1fe9 Feb 24  2001 catalogs/bosanski/mirror.catalog
[generic]                  992    1992  49.8% -lh5- b3b4 Feb 24  2001 catalogs/catalàmirror.catalog
[generic]                  939    1902  49.4% -lh5- 22e8 Feb 24  2001 catalogs/deutsch/mirror.catalog
[generic]                  943    1858  50.8% -lh5- 12a6 Feb 24  2001 catalogs/español/mirror.catalog
[generic]                 1063    2320  45.8% -lh5- 69e6 Feb 24  2001 catalogs/français/mirror.catalog
[generic]                  880    1838  47.9% -lh5- 1817 Mar  4  2001 catalogs/italiano/mirror.catalog
[generic]                  956    1856  51.5% -lh5- 1600 Feb 24  2001 catalogs/polski/mirror.catalog
[generic]                  901    1638  55.0% -lh5- d2a3 Feb 24  2001 catalogs/russian/mirror.catalog
[generic]                  929    1916  48.5% -lh5- 302d Feb 24  2001 catalogs/slovensko/mirror.catalog
[generic]                 1505    5483  27.4% -lh5- cef4 May 14  2001 Install mirror
[generic]                 5202   10712  48.6% -lh5- fd56 May 14  2001 mirror
[generic]                 2671    6333  42.2% -lh5- e013 May 14  2001 mirror.readme
[generic]                 3757    6284  59.8% -lh5- c884 May 14  2001 mirror.readme.info
[generic]                 1825    2659  68.6% -lh5- 10b4 May 14  2001 Install mirror.info
---------- ----------- ------- ------- ------ ---------- ------------ -------------
 Total        16 files   27709   55706  49.7%            May 19  2001
Page generated in 0.02 seconds
Aminet © 1992-2024 Urban Müller and the Aminet team. Aminet contact address: <aminetaminet net>