How to use RsyncUI

RsyncUI is a signed and notarized SwiftUI based GUI on top of the command line utility rsync, which is a file based tool for synchronization of files. RsyncUI is built as a Universal macOS Binary which means it run natively on Apple Silicon and Intel based Mac computers. the latest version of RsyncUI is compiled for macOS Monterey the changelog First start The first time RsyncUI is started a Welcome message is presented.

Changelog

RsyncUI is signed and notarized and built as Universal macOS Binary. Please see info about the latest version of rsync in install. Using RsyncUI requires some knowledge of rsync. The main objective for RsyncUI is to ease the use of rsync, not teach macOS users how to use rsync. That is beyond the scope of RsyncUI. Setting the wrong parameters to rsync can result in deleted data. And RsyncUI will not stop you for doing so.

How to compile RsyncUI

RsyncUI is only depended upon the Swift language and SwiftUI and Foundation frameworks. There are two ways to compile, either in Xcode or utilize make from command line in RsyncUI catalog. To use make require Xcode command line utilities to be installed. Execute the following command and follow the instructions. xcode-select --install Remove signing credentials or replace To compile you have to either remove signing or replace signing credentials. To remove or replace select Target RsyncUI and tab “Signing and Capabilities”.

Latest version of rsync

The default version 2.6.9 of rsync in macOS was released in nov 2006. And there has been several fixes and releases since then. The news about the current release of rsync is here. Due to new features in rsync and dependency to shared libraries it is not possible to bundle the latest version together with RsyncOSX. It is adviced to install rsync as part of Homebrew. In RsyncOSX select user configuration and set path for optional version of rsync.

Passwordless logins by ssh-keys.

RsyncUI utilizes user set ssh keypath and identityfile. Default values for ssh are ~/.ssh/id_rsa and portnumber 22. It is not required to set your own values for key path and identityfile if default values are used. The ssh parameter within the rsync command is, if set by the user: -e "ssh -i ~/.ssh_keypath/identityfile -p NN" where -i ~/.ssh_keypath/identityfile is the ssh keypath and identityfile and -p NN is the port number ssh communicates through, default port 22

Rsync daemon setup

With a few tweaks it is possible to get RsyncUI working with rsync daemon. Be aware of not utilizing ssh, transfer of data is not encrypted. This is might not a problem on a local network, but I would not advise it on a public network. Also be aware of snapshot is not possible with a rsync daemon setup. Setting up a rsync daemon setup require a server side setup and some tweaks in RsyncUI.

RsyncUI configuration files

RsyncUI stores its configurations, schedules and log records and user configurations as JSON files. The storage of those files is: $HOME/.rsyncosx/macserialnumber In the About the used path for configuration files is shown. RsyncOSX evaluates the computer mac serial number at startup. Configuration files $HOME/.rsyncosx/macserialnumber/configurations.json If profile is utilized: $HOME/.rsyncosx/macserialnumber/profile/configurations.json Log records $HOME/.rsyncosx/macserialnumber/macserialnumber/schedules.json If profile is utilized: $HOME/.rsyncosx/macserialnumber/profile/schedules.json User configurations The user configuration is stored as: $HOME/.rsyncosx/macserialnumber/rsyncuiconfig.json The user settings applies to all profiles.

Snapshots

Utilizing snapshot is an effective method for restore of previous versions of data and deleted files. Snapshot utilize hardlinks and only changed and deleted files are saved as separate files in a snapshot. Files which are not changed are hardlinks to the original file. If a file.txt is saved in snapshot number one and never changed or deleted, the file file.txt in the latest snapshot is just a hardlink to the original file.

RsyncUI settings

There are a few settings to be tweaked. Settings are saved to permanent store. The settings are dividede into three parts. When the user has changed a setting it is marked with a change on the Save button. The Save button is disabled until a change has happend. Usersettings might be opened by the default ⌘, shortcut for settings. Settings - rsync and other settings Ssh - SSH settings Environment - environment settings The info tab shows which version of rsync in use and the path for storing and reading configurations to permanent store.

The development of RsyncUI

SwiftUI was released in 2019 and is a declarative framework for UI development across the various Apple operating systems. Developing the UI based on SwiftUI compared to developing utilizing the Cocoa framework is a huge step forward. The code for the UI utilizing SwiftUI is minimal and easily separated from the Model (MVC). By hiding application logic in properties, functions and closures will simplify the code. The declarative paradigm also makes the code for the UI cleaner and more easy to follow.