AASyc

   Other Topics

© Copyright Robert Vasvari, 1993-2008.

The Sync Definition Panel


Define a Sync

The first task is to define a Source->Destination(Target) folder pair. AASync can have local or remote folders for both source and destination, except that one of them must be local, as Remote-to-Remote sync is not supported.

  • Define a local source or target: - Either drop a file from the Finder into the icon well, or click "Set Local Source (or Destination)" to bring up the file picker panel. Select a folder and click OK!
  • Define a remote source or target: - Either drop a file from the Finder into the icon well, or click "Set Remote Source (or Destination)" to bring up the Remote Folder panel.



On this panel, enter the protocol, host, user, password and the full path of the remote folder. If you copied the path of a remote folder from another app try pasting it into the host/URL field. If it is a full URL (so it looks something like ftp://somehost/some/path), then the user and path fields do not have to be filled, since the URL contains them. If there is a username in the URL, fill the password field with the corresponding password if there is one. If there is no URL, then fill all fields with the definition of how to get to that remote folder, what protocol, host, the full path, and the username/password for the remote login. Do not forget to properly set the protocol button because most hosts accept only one protocol, either FTP or SFTP.
Use the Browse button to browse and find the remote folder path *after* you properly set the protocol and all the host/user/pass data. AASync will login using this data and let you browse the filesystem of the remote host, even create a new folder.

IMPORTANT: if your host uses character encoding other than UTF-8 (like some japanese hosts use SHIFT-JIS, for instance), be sure to find and set that encoding on the bottom of the Sync Definition Panel before you start browsing. Otherwise, the filenames may not appear correctly in the browser.

Once you are done browsing or enter a path, an OK click will close the login panel or the remote path browser, we are back at the Sync Definition Panel. The url that was just set will appear in a URL format. Source or target folder can be defined the same way.
One of the folders must be local, as Remote-to-Remote sync is not supported. Set various options (see below for explanation), then click "Save" to save the folder pair. At this point you are ready to run a sync operation.


Sync Modes

It is extremely important for the user to fully understand how the different modes work, to make sure whatever happens is exactly what the user expects. Different modes are optimal for different sync situations, so please read carefully and select the right one for each sync definition.

  • Auto Mode

    For most LTL or LTR sync ops this is the best and least time-consuming option. During the first run, the Phase 1 (Source Database) sync operations is run to create the Source Database. Then, a Phase 2 sync is run to establish a synchronized target folder. Subsequently, only a Phase 1 sync is run to detect changes. Use this mode if you are sure the target folder is not changed by somebody else, and you have tested the fact that changed files are actually uploaded without errors. This mode is recommended for most website maintenance and backup operations. Auto mode is always a one pass operation.
  • Source Database Only

    Same as the Auto Mode, but only Phase 1 sync is performed, period. This mode is good for testing the sync setup. This mode is always a one pass operation.
  • Source-Destination Comparison Only

    In this mode only Phase 2 sync is performed, comparing the source and target files. This very useful for LTL sync if the folders are big.
  • Source Database then Source-Destination Comparison

    This is the recommended mode if the folders are not too big, so it is not too expensive to run both phases. This the most accurate way to sync, using the advantages of both phases.
  • Mirror Mode

    In this mode, Phase 1 then Phase 2 sync is performed, then spurious files in the target folder will be deleted to make the target folder look exactly like the source. This means that if delete a file in the source folder, it will also be deleted in the target. Also, files in the target that are newer (this should not normally occur) will also be overwritten. By default this options is off, meaning that you are in the archive mode, deleted files are left in the target, only modified files are overwritten. BE VERY CAREFUL WITH THIS OPTION! Since it deletes files, it is generally not recommended, only after careful evaluation of whether or not it is necessary.

Exclusions and Scheduling:

  • Sync Scheduling
  • Sync Exclusions

  • File Content Checking:

    First off, why is this option needed? File Content Checking is the best way to tell if a file has changed. It is done by running a checksum on the file. One drawback, however, is that checksums, especially on large files, can take a long time. It is not always necessary, since if there is reliable metadata such as size and modification date, then it can be determined without the checksum if the file has been modified. It is very rare that a file's contents could change without changes in the size and mod date. In FTP the metadata is not reliable because the server tends to trash mod dates, but cheksums are not available in FTP anyway. Checksums can best be used in situations where the user feels that some changes might be ignored in local or remote syncs involving SFTP ocnnections. The File Content Checking options are:
    • Automatic - means AASync will determine whether File Content Checking is necessary. This is the default setting. In this case, LTL syncs do not do checksum because it is not necessary, RTL or LTR sync will do checksums if the SFTP protocol is used.
    • Always - checksums always computed wherever available.
    • Never - checksums are not used at all.

    Logging:

    • No Logging - with this setting, AASync will not save any logs of the sync it performs. If you do not really care what AASync does in the background use this setting.
    • Sync events only This is the default setting. AASync will log sync events, such as new files changed files, deleted files etc. Will not show actual commands, returns or other debug info. Ths is the best setting if you want to be able to look back later when a particular file has appeared, changed, etc...
    • Sync events + Commands - All sync events are logged (see above) plus all commands and returns. This setting should be used to diagnose problems. It will generate huge logs and slow down the sync process, so use with care. Once problems are resolved, one of the above settings should be used.

    Other Options:

    • Character Encoding Access to hosts with Non ASCII character sets (SHIFT JIS, etc..): In order to ensure that AASync will work properly with files whose names contain non-ascii characters, be sure to set the character set of the host properly in the Site Preferences for that host. What encoding to use? Ask the system administrator of the site...
    • One Pass Only By default sync operation will keep going as long as there are changes detected. So if there are changes, the sync engine will take two complete passes using one the sync modes described above. In the first pass changes are detected and flushed, in the normal case the second pass should find no more changes and the sync will report a success. This does not always work so well, especially if one make a synced backup of a large home directory while logged on. In this case some files always keep changing during the sync, so potentially the sync would never finish. For these cases this option can be turned on, causing the sync engine to quit after the first pass, whether there are changes or not. If the sync is scheduled, or the mode is set to Phase 1 only, then this setting is ignored and only a single pass is performed.
    • Preview Mode If this button os checked, the changes are detected and listed in the transcript, but no actions are performed, the state or either source or target are not changed at all. This option is NOT SAVED! You must turn it on before each sync op.
    • Preview Mode If this button os checked, the changes are detected and listed in the transcript, but no actions are performed, the state or either source or target are not changed at all. This option is NOT SAVED! You must turn it on before each sync op.

    Global Firewall Options:

    The AASync/Preferences menu will bring up the preferences panel. On the firewall tab the user can enter the proxy/firewall scheme information. There are many firewall schemes out there AASync tries to support the most used ones. Currently, SOCKS (4 and 5) and the common FTP Firewall Toolkit schemes are supported. Please be sure to follow your system administrator's guidance in how to fill out the fields on this tab. The proxy information may be sparse depending on your site's particular setup, the only field that is mandatory is the proxy server, as it is required for all firewall schemes.

    Normally, AASync will try SSL/TLS first on FTP sites, it it is not supported, the sync will use regular (non-secure) FTP. If this causes problems, it can be turned off on this panel. Same stands for Passive FTP, it is recommended that users try that first. Most users do not need to change the default settings here which are ON for both SSL and Passive FTP. NOTE: these settings are global, they will effect all FTP sites you connect to! Also, FTP-SSL sites do not use the firewall proxy settings!

    Success Or Failure.. Be sure not to change the source folder during the backup, or the sync may report a failure. In many cases permission problems will cause the sync to fail, especially in Local-to-Remote sync ops. Make sure the source of the sync is writable!