Synchronize
Synchronize makes the folder one pane shows match the folder the other pane shows: it copies what is new or changed and, if you ask, removes what is no longer in the source. It is for keeping a website, a project or a backup folder in step without copying everything each time.
Starting
Connect, and in each pane go to the two folders to keep in step. Then press ⌥⌘S, the sync button in the toolbar, File → Synchronize…, or right-click empty space in a pane. Synchronize is from the pane you were in to the other; Direction turns it round:
- Upload to the server: the folder on this Mac is the source, and the server's folder is made to match it.
- Download to this Mac: the other way.
Comparing first
Nothing changes until you press Synchronize. Compare lists both folders, all the way down and both at once, and shows what would happen:
| In the list | Means |
|---|---|
| Upload / Download | A file that is new, or changed, is copied |
| New folder | A folder that is not there yet is made |
| Delete / To Trash | Not in the source, and removing is on |
| Left alone | Changed later where it would go, a file against a folder, a link, or, down to this Mac, a name that differs from one in the source only in capitals or accents (Photo.JPG and photo.jpg): on a Mac the same file, compared as one and never removed. Up to a server, which may tell them apart, they are two |
The line above the list sums it up: how many files and how many bytes, how many folders, how much is removed.
Changes, beside a changed file, or one left alone for being changed later where it goes, shows what copying it would change, line by line: − what is there now, + what would replace it, with the lines around each change and the rest folded away. For text files up to 1 MB. Compare Again lists both folders anew. Changing any choice in the sheet throws the comparison away, so what you synchronize is always what you last compared.
The choices
- Compare: Date and size copies a file when its size or its modification date differs; dates within a second of each other count as the same. Size only looks at the size alone, for a server whose clocks or dates cannot be trusted. An S3 bucket dates each file by when it was written to it, and Synchronize compares with that in mind; see S3 buckets.
- Leave files that were changed later where they go (on by default): a file that is newer at the destination than in the source is left alone and listed as such, rather than replaced by the older one.
- Delete what is on the server and not here (uploading), or Move to the Trash what is here and not on the server (downloading). Off by default. With it on, the destination ends up as a copy of the source. On this Mac removed items go to the Trash; on the server they go to the server's trash when Settings has it on (see Files), and are deleted for good when not, so read the list first.
- Leave out: names to skip on both sides, separated by commas or spaces,
such as
.git, node_modules, *.log.*matches any run of characters and?one. A pattern with a/in it is matched against the path from the folder synced, as inbuild/cache. Something left out is never copied and never removed.
.DS_Store, ._ files, .Trashes, .fseventsd and etrans's own partial
files are always left out. Links are never followed or copied; they are
listed as left alone.
The choices are remembered for the next sync in the same tab.
Saved pairs
Two folders synced often can be kept with the server, with their choices: Saved Pairs at the top of the sheet, then Save These Folders. They are saved with the server, so every tab and window connected to it has them, and they are there after etrans restarts.
- Opening Synchronize with the panes in two folders kept together starts the sheet as they were kept: the direction, how to compare, what to leave out, and the two checkboxes.
- Choosing a pair in the menu sets the sheet up for it, whatever folders the panes show; the panes stay where they are. Compare as usual.
- A ✓ marks the pair the sheet has. Changed choices for it are kept with Save These Settings, and Forget These Folders lets the pair go.
Only a saved server keeps pairs; the button is not there for one connected to by address alone.
Running
Synchronize puts one transfer in the drawer, named after the source folder: folders are made first, then files are copied, then anything to be removed is removed. Modification dates come along with each file, so a sync right after another finds nothing to do. It can be stopped with ×, and Retry carries on from where it stopped, from partial files as any transfer does. See Transfers.