Dependencies

Starting from version 2.5, sync items can be dependent on each other. In the Advanced tab of a sync item’s setting, you may add a dependency by selecting the “+” button in the respective text field or by typing a sync item’s title.

When starting a sync item which has one or more dependencies that haven’t been run yet (i.e. they have no green badge), those will be run first. As soon as all dependencies are completed successfully, the sync item will start running. If a dependency encounters some errors or is canceled, the sync item will be delayed until the dependency is completed.

You may create dependency chains, as long as they are not circular. For example, sync item A can depend on B which in turn can depend on C, but C cannot depend on A since it would create a circular dependency. Sync items causing a circular chain are automatically disabled in the dependencies menu.

How to deal with sync errors

It can happen from time to time that a sync reports an error. There can be various reasons for such errors (file permissions are the most popular one). Unless the error is due to the source or the destination being disconnected, the sync will try to continue until the end.

It is always recommended to have a look at the error log, which can be opened from the context menu when right-clicking the sync item. The error log provides information about which files caused the error.

For two-way sync items, after seeing an error it is strongly recommended to sync again by carefully going through the confirmation dialog and making sure that no file that resides only on one side is going to be added or removed because of the previous error.

Export sync items

Starting from version 2.2, the sync items can be exported, so that you can reimport them at any later time, on any Mac. Exported sync items will be saved as a file with the “.sync” extension.

To export all sync items at once, simply select the “Export” menu item from the status bar menu. You’ll then be asked for the location where you want to save the file. To export only the selected sync items, just drag them onto your Desktop or a Finder window, and the save file will be automatically created.

To import the sync items from a previously exported file, you can either double-click it or drag it into the main window. You’ll then be asked to confirm the sources and destinations of all imported sync items, so that their locations can be securely stored.

 

Enable logging

Starting from version 2.2, SyncTime can output a log so that you can closely track what it is doing. This is especially useful for debugging purposes. At the moment, log messages are output only during the scan phase (i.e. the initial comparison between source and destination).

To enable logging, please follow these steps:

  1. Open a Terminal window. You can find the Terminal inside “/Applications/Utilities”.
  2. Right-click the SyncTime app symbol (you’ll find it inside the Applications folder) and select “Show package contents” to navigate inside the application package.
  3. Drag the file “Contents/MacOS/SyncTime” to the Terminal window.
  4. In the Terminal, type “-log” and press Enter. SyncTime will open as usual.

You’ll notice that when starting a sync, a lot of messages will appear in the Terminal. These can also be inspected from the Console, which you find again inside “/Applications/Utilities”.

Sync types

In the Advanced tab of a sync item’s settings, you can choose between 3 different sync types.

  • One-way sync: only the destination (which acts as a backup) is changed. This is the default sync type. Files that already exist on the destination are overwritten according to the mode chosen in the Destination tab of the settings, and missing files are always copied.
  • Two-way sync: merge source and destination. Files that are only on one side are copied if they have been modified* after the last sync or deleted if if “Remove files not on source” is enabled and they have been modified before the last sync: this way, deleted files are not going to be restored with the next sync (except for the first sync, where all files are treated as if they were new). Please note that no merging is done inside the files themselves (i.e. unless you chose “Don’t change the destination file” as overwrite policy, if changes were made on both the source and the destination file, one of them will be overwritten).
  • One-way move: only the destination (which acts as mailbox) is changed. As soon as a file has been successfully copied to the destination, it gets removed from the source. The option “Remove files not on source” has no effect.

Please note that source and destination will be compared each time a sync is run (in particular, each time the app is launched).

*If the file is indexed by Spotlight and the “date added” attribute is available and indicates a date later than the last sync date, the file will be copied even if it wasn’t modified after the last sync. Since this attribute is not always available, caution is always recommended when moving or renaming files managed by two-way syncs. If it isn’t available and you want to add a file that has been modified before the last sync, you’ll have to copy it manually or add it while the sync item is running in background, otherwise it could be erroneously deleted. Starting from version 2.4, you can also move a file to be deleted to the copy list and vice versa from the context menu in the confirmation window.

Action after all syncs have completed

Starting from version 1.1.4, you can define whether your Mac should go to sleep or shut down after all syncs have completed (requires macOS 10.8 or newer). Starting from version 2.4.5, you can define arbitrary scripts to be executed after all syncs have completed.

To enable the menu items in the status bar menu, please follow these instructions:

  1. Open the AppleScript Editor (located in the folder /Applications/Utilities).
  2. Create appropriate Applescripts by copying the codes given below into the Editor and saving them, for example, on the Desktop. Starting from version 2.4.5, you may create your own scripts with arbitrary filenames.
  3. Move the newly created files into the “~/Library/Application Scripts/org.desairem.uSync” folder (i.e., “/Users/yourusername/Library/Application Scripts/org.desairem.uSync”). You can navigate to the Library folder by opening a Finder window, selecting the menu Go To and, while pressing the ALT/OPT key, selecting the menu item Library.
  4. The menu item corresponding to the file you’ve just created is now enabled.

Codes

The sleep script has to be a file named “sleep.scpt” with the following line of code:

tell application "System Events" to sleep

The shut down script has to be a file named “shutdown.scpt” with the following line of code:

tell application "System Events" to shut down

Synchronize in background

Starting from version 1.1, you can enable the option “Once synced, keep synchronized in background” in the Advanced tab of a sync item’s settings. After the sync has been run as usual, files will be automatically transferred as soon as they are created or modified on the source (or removed, if the option “Remove files not on source” is enabled). For a two-way sync, this also applies for the destination.

A background sync will run indefinitely and cannot be restarted until canceling it from the context menu. Canceling a background sync will stop it from monitoring future changes.

Please note that after restarting the app, a sync will compare the whole source and destination again before monitoring for changes in background. While the changes for this first sync have to be confirmed by default (but they can also be skipped), background changes are always done without confirmation.

Please note that changes on a volume can only be detected when they are performed from the local Mac. This functionality is based on a macOS feature that works best when performing file operations inside the Finder and document-based apps. Some Terminal commands such as touch and copy will not trigger background syncing.

Removing files that are excluded or not on source

The option “Remove files not on source”, which you can find you can find in the Destination tab in the sync item’s settings, behaves differently depending on the sync type.

  • One-way sync: all files/directories that are not on the source (anymore) and are not excluded will be removed. You can choose to remove excluded files, too, by checking the option “Remove excluded files”.
  • Two-way sync: a file that exists on either the source or the destination will be removed only if its modification date is older than the last sync and it is not excluded (please read more about how single files are compared in two-way syncs). If a sync is run for the first time, no file will be removed. The option “Remove excluded files” will remove excluded files from both the source and the destination.
  • One-way move: because all successfully copied files will be removed from the source, no file will be removed from the destination. Only the option “Remove excluded files” will be considered.

Exclude files

You can set each sync item to exclude specific files. Excluded files are simply ignored: they are neither copied nor removed (unless the option “Remove excluded files” is enabled).

In the Exclude tab of a sync item’s settings you will find the following options:

  • Exclude hidden files: files or directories which start with a dot are hidden in the Finder. It is a good idea to exclude them, since they are usually not needed by the user and are created automatically by whatever app uses them. For example, .DS_STORE files are created by the Finder when opening a directory and the operating system could possibly be confused when copying these files around.
  • Filename filters: these are a list of words which appear as tokens in the text field under the “Filenames containing any of the following words” check box (before adding any word to this list, you first have to enable it). After typing a word, you have to type a comma or press Return to make the change effective. Starting from version 2.2, you can then turn a token into a regular expression by clicking on the small triangle on its right.
  • Exclude a specific file: add it to the list under the “Following files” check box by clicking on the “+” button (you first have to enable it). Starting from version 2.2, files inside excluded directories will be included, and vice versa; you can alternate as many excluded and included files as you want. Excluded and included files apply for both source and destination. Files contained in included directories can still be excluded by the above filters, while files in this list are unconditionally included. You may want to exclude the source directory itself and include some of the contained directories as a means of grouping many syncs with the same settings together.