This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

RsyncUI - a GUI for rsync

If there is anything in this documentation that is unclear or imprecise, I would greatly appreciate it if you could let me know. English is not my mother tongue, and even in Norwegian, which is my mother tongue, I can be unclear and imprecise. If you see errors, ambiguities and unclear text please let me know or create an issue. Docsy, the Hugo theme for these pages, appends at bottom on page a Feedback button.

RsyncUI is a pure SwiftUI, Swift based macOS application, built for macOS Sonoma and later, utilizing the command line tool rsync for synchronizing files. It is rsync which executes the real synchronizing task, not RsyncUI. RsyncUI is a GUI only on top of rsync. RsyncUI is signed and notarized by Apple.

Changelog and install

See the changelog for updates. RsyncUI is built as a Universal macOS Binary, which means it runs nativly on Apple Silicon and Intel-based Mac computers. RsyncUI can be installed by Homebrew or by download from GitHub.

brew install --cask rsyncui

If installed by Homebrew, the shasum is automatically verified. If downloaded from GitHub please verify the shasum.

New users

If you are new to RsyncUI, please read the important information. There is also info about the latest version of rsync to install. The catalog for storing files files is $HOME/.rsyncosx/macserialnumber/.

Local attached disk, remote server and passwordless login

RsyncUI can synchronize your data to local attached disk, remote servers on the Internet and on your local LAN. If you only want to synchronize data to a local attached disk, connect the disk, add source and destination and you are ready for your first task.

If you want to synchronize data to a server, on Internet or your local LAN, there is some more setup to do. If you have enabled passwordless login by ssh-key you only have to add source, destination, login id and servername and you are ready to synchronize data. If you have not enabled passwordless login, there are some more actions required before your first task.

New tasks, verify task and synchronizing data

After adding a task, in the main view, a double click on the task executes a --dry-run and the second double click executes the real run. A verification of a new task might also be executed by opening the Tasks or Rsync parameters view from the main sidebar, select the task and choose the Checker flag on the toolbar. Press the Checker flag executes an estimation run, a --dry-run to verify the task.

For more experienced users of rsync, from within the Rsync parameters view, select the new task. Copy and paste the synchronization string into a terminal view. The rsync command includes the --dry-run parameter as default within this view.

Aborting a task

Please be aware it is an external task not controlled by RsyncUI, which executes the command line tool rsync. RsyncUI is monitoring the task for progress and termination. The user can at any time abort a task. Please let the abort to finish and cleanup properly before starting a new task. It might take a few seconds. If not, the apps might become unresponsive.

1 - Changelog

If you miss some functions please drop me an email: thomeven@gmail.com or create an Issue. All suggestions about enhancements are welcome.

About refactoring of code. There are about 140 Swift files and about 10,000 lines of code in RsyncUI. There are no external libraries, RsyncUI is built only by using default Swift libraries and Swift/SwiftUI code. RsyncUI is stable, and there are always parts of the code which are not reviewed for some period of time. When I am reviewing old code, I often see a potential for update and refactor. Sometimes a refactor does not work as expected. But most of the time a refactor makes the code better and more efficient.

Version 2.1.5 (build 115) - 13 October 2024

There is a minor issue in this version, the links for documentation and the changelog in RsyncUI are not updated after new theme for documentation is applied.

This is a maintenance release, some refactor of code, a few bugfixes and GUI updates. Focus in this version is to make most of functions context sensitive.

  • functions, data and selections are hidden until a task is selected
    • an example is within the Rsync parameters view, the checker flag for a --dry-run is not visible until a task is selected
  • refactor and cleanup of code
  • fixed another bug in ssh and remote servers
  • fixed a bug in Settings view
  • a few minor GUI updates

Version 2.1.4 (build 114) - 27 September 2024

The following are updates:

  • disable main functions during work
    • all main functions on the sidebar including change profile, are disabled when there are remote execution like synchronization, restore and so on
    • this is to prevent any sideeffects when remote executions are at work
  • additional cleanups in Settings view
    • be aware of there are some seconds of delay when changing settings which must be verified before saving
  • show command strings (in view for Rsync parameters)
    • RsyncUI creates commands for external execution, almost all commands are dependent upon values in each configuration
    • this view is for documentation for users who want to do a more detailed view of what RsyncUI does
    • by using the Console app, see below, all major steps of what RsyncUI does might be viewed
  • refactor in parts of code
    • refactoring and cleanup of internal code are always in focus, there is always potential for cleanup and improvements
    • there are about 146 Swift files and 10,000 lines of Swift code, there are no memory leaks, verified by the Xcode instruments tool
    • see the release for details about changes
  • Console and OSLog
    • from Swift 5 there is a unified logging feature OSLog.
    • the OSLogs might be read by using the macOS Console app, set the Action in Console app menu to Include Info Messages and enter no.blogspot.RsyncUI as subsystem within the search field

Version 2.1.3 (build 113) - 16 September 2024

Sorry for many updates in a few days, but sometime a previous quick bugfix is not working as expected. Which was the case with previous release. There has been a few updates in this release. Mostly in computing arguments for ssh-parameters, applies for remote servers only. And there has also been a couple of GUI updates as well.

Next release again will probably be in a month or two, depending if no other bugs are found within this period.

Version 2.1.2 (build 112) - 13 September 2024

Fixed a bug in ssh-parameters, applies for using remote servers only.

After some more testing, using Swift Testing, I discovered a few more issues about ssh-parameters. Local set ssh-parameters rules global set ssh-parameters. Local ssh-keypath or ssh-port should only set one of them even if there are global set ssh-keypath and ssh-port.

ssh parameters in version 2.1.2 (build 112) does not work as expected. But default values for RSA based ssh-key and identityfile, ~/.ssh/id_rsa and ssh-port = 22, are automatically picked up by rsync. This is a workaround until version 2.1.3 is released in some days.

There will be a new version 2.1.3 (build 113) including fixes for the above by next week, the week starting with Monday 16 September 2024. The package RsyncArguments and tests are updated.

Version 2.1.1 (build 111) - 10 September 2024

Built on macOS Sequoia by Xcode 16. Built for macOS Sonoma and macOS Sequoia. The default rsync on macOS Sequia is openrsync, see info about rsync versions.

Updates in version 2.1.1

The work on adapting RsyncUI to the new concurrency model of Swift 6 is complete.

  • RsyncUI is now fully adapted to Swifts new concurrency model and Swift version 6
    • in Xcode SWIFT_STRICT_CONCURRENCY = complete and SWIFT_VERSION = 6; is set
  • there has been several refactor of code and a few UI updates
  • by using the tool periphery, the code is cleaned and all not used classes, structs, functions and attributes are deleted
  • some of the code is created as packages, see comments about Swift Testing and Swift Package Manager below
  • thx to Cavaliere100 for testing RsyncUI on MacOS Sequoia and experienced an application crash for new users
  • RsyncUI is tested on macOS Sequoia, built by Xcode16 beta4 and it is verified working as expected
  • there is a new export and import function, tasks can now be exported and imported between profiles and to new Macs
  • fixed bug if user defined path for rsync is not valid
  • restore data only valid from remote servers, restore data from local attached disc by macOS Finder only
  • fixed a bug in parameters to rsync and create ssh-key, default and user define ssh-key
  • fixed a bug in passwordless logins
    • example of the rsync command which causes the issue is: rsync -e ssh -r --list-only thomas@raspberrypi:/backups/Documents/
    • should be rsync --verbose --compress -e ssh -i ~/.ssh_rsyncosx/rsyncosx -p 22 -r --list-only thomas@raspberrypi:/backups/Documents/ if user defined ssh-key and identityfile are enabled
  • it is allowed to change snapshot number in snapshot tasks
    • if you are changing the snapshot number be sure you now what you are doing

Xcode 16, Swift Testing and Swift Package Manager

The new version number of RsyncUI is ver 2.1.1 build 111 due to using Swift Package Manager (SPM) and Swift Testing is a significant change to increase quality of code. By using SPM, parts of the source code in RsyncUI is extraced and created as packages.

  • RsyncArguments - create parameters to rsync from configurations
  • sshCreateKey - assist to create ssh identityfile and key in RsyncUI
    • create RSA based ssh-key for default and user defined keys including ssh-port number
  • DecodeEncodeGeneric - generic code for Decode and Encode JSON data
  • ParseRsyncOutput - parse and extract numbers from output from rsync, used in view for details and log result of a synchronize tasks

By SPM and Swift Testing, the code for RsyncUI is modularized, isolated, and tested before committing changes.

Version 1.9.2 (build 100) - 11 June 2024

This is most likely the last release before macOS 15, macOS Sequoia is released sometime after the summer. Bugs will be fixed, though, if found. The work with Swift 6 and Xcode 16 beta commenced today. The major work in next release 2.0.0 (build 101) is compliance with the new concurrency model of Swift 6. And there are some new things there for me to learn and understand.

  • view of the log file is back
  • the logging of synchronization task is simplified
    • by default on, a summary only of each synchronization is added to the log records, view Log Listings from Sidebar (not changed)
    • by default off, there is also possible to add a short summary to the log file
      • timestamp
      • last twenty lines of output from rsync which includes a summary of the task
  • the Settingsview is updated

Previous releases

Dates and version only

  • Version 1.9.1 (build 99) - 27 May 2024

  • Version 1.9.0 (build 98) - 12 April 2024

  • Version 1.8.9 (build 97) - 26 March 2024

  • Version 1.8.8 (build 96) - 14 March 2024

  • Version 1.8.7 (build 95) - 20 February 2024

  • Version 1.8.6 (build 94) - 30 January 2024

  • Version 1.8.2 (build 92) - 8 January 2024

  • Version 1.8.1 (build 91) - 29 December 2023

  • Version 1.8.0 (build 90) - 18 December 2023

  • Version 1.7.9 (build 89) - 7 December 2023

  • Version 1.7.8 build (88) and 1.7.5 build (88) - 23 November 2023

  • Version 1.7.3 build (86) - 19 October 2023

  • Version 1.7.5 build (84) - 28 September 2023

  • Version 1.7.2 build (85) - 23 September 2023

  • Version 1.7.1 build(83) - 1 September 2023

  • Version 1.7.0 build(82) - 16 August 2023

  • Version 1.6.6 build(81) - 1 August 2023

  • Version 1.6.5 build(80) - 16 July 2023

  • Version 1.6.3 build(79) - 29 June 2023

  • Version 1.6.1 build(77) - 20 June 2023

  • Version 1.6.0 build(76) - 16 June 2023

  • Version 1.5.0 build(73) - 4 May 2023

  • Version 1.4.8 build(70) - 24 March 2023

  • Version 1.4.7 build(69) - 14 March 2023

  • Version 1.4.5 build(67) - 7 March 2023

  • Version 1.4.3 build (65) - 8 February 2023

  • Version 1.4.2 build (64) - 6 January 2023

  • Version 1.4.0 build (62) - 6 December 2022

  • Version 1.3.9 build (57) - 18 November 2022

  • Version 1.3.8 build (56) release candidate - 10 November 2022

  • Version 1.3.7 build (56) - 5 November 2022

  • Version 1.3.6 build (55) - 31 October 2022

  • Version 1.3.0 build (53) - 30 September 2022

  • Version 1.2.9 build (52) - 8 September 2022

  • Version 1.2.8 build (51) - 20 March 2022

  • Version 1.2.7 build (50) - 17 March 2022

  • Version 1.2.6 build (48) - 31 December 2021

  • Version 1.2.5 build (48) - 6 December 2021

  • Version 1.2.3 build (46) - 11 November 2021

  • Version 1.2.2 build (45) - 28 October 2021

  • Version 1.2.1 build (42) - 21 October 2021

  • Version 1.2.0 build (41) - 28 September 2021

  • Version 1.1.2 build (40) - 9 September 2021

  • Version 1.1.2 build (39) - 1 September 2021

  • Version 1.1.2 build (38) - 28 August 2021

  • Version 1.1.2 build (37) - 21 August 2021

  • Version 1.1.2 build (36) - 16 August 2021

  • Version 1.1.2 build (35) - 11 August 2021

  • Version 1.1.2 build (34) - 30 July 2021

  • Version 1.1.2 build (28)

  • Version 1.1.1 build (27)

  • Version 1.1.0 build (26)

  • Version 1.0.1 build (24)

  • Version 1.0.0 build (23)

  • Prerelease version 0.99 build (22)

  • Prerelease v0.60 build (20) - breaking changes

  • Prerelease v0.55 build (19) - 14 April 2021

  • Prerelease v0.49 build (18)

  • Prerelease v0.48 build (17)

  • Prerelease v0.47 build (16)

  • Prerelease v0.45 build (15)

  • Prerelease v0.42 build (14)

  • Prerelease v0.41 build (12)

  • Prerelease v0.39 build (11)

  • Prerelease v0.36 build (10)

  • Prerelease v0.36 build (8)

  • Prerelease v0.35 build (7)

  • Prerelease v0.3 build (6) - 12 March 2021

2 - Add and update tasks

Using the Enter key will advance to next field. The Enter key will automatically add a new task after last input. Or the checkmark icon on the toolbar will add a new task. Tasks are saved to permanent storage after each entry.

Delete

Select tasks to be deleted and delete from the Edit menu or the backspace button.

Update

To update a task, select the task and to save changes, select the checkmark icon on the toolbar or use the Enter key.

Data about tasks

The following are data about tasks:

Task
  • synchronize, which is default and keeps source and destination in sync
  • snapshot, save changes and deletes ahead of a synchronize
  • syncremote, remote is source, synchronize a remote source to a local volume
  • Dont´t add /
    • by default a trailing / is added to both source and destination
Catalog parameters
  • Local catalog: required field
  • Remote catalog: required field
    • the backup catalog might also be a local catalog on a local attached disk
Synchronize ID
  • Synchronize ID:
    • informal tag for the task
Remote parameters
  • Remote username:
    • username for login to remote server
  • Remote server:
    • either server name or IP-address for remote server

Catalogs

Selecting the Home icon lists all catalogs from your $Home. If there is attached a local disk, the mounted volumes are presented. Select the homecatalog and mounted volume, return to main Task view and RsyncUI suggest some values.

Return, select the left arrow on the toolbar, to main Task view. To add suggested task select checkmark on the toolbar.

Copy and paste

Shortcuts for copy and paste are ⌘C and ⌘V or from the Edit menu. The copy and paste makes a copy of selected tasks and marks them with copy. The copy inlcudes all parameters of the copied tasks.

3 - Synchronize data

The Synchronize view lets you execute all or selected tasks in one go. A double click on a task wil execute a --dry-run, the next double click will execute the real run.

Shortcut actions within the Synchronize view:

  • Estimate - ⌘E estimates all or selected tasks
  • Synchronize - ⌘R synchronize all or selected tasks, no estimation and no progress bar during synchronization
  • Abort - ⌘K abort and halt any ongoing task

When RsyncUI starts it automatically open the Synchronize view. By selecting wand and stars (shortcut ⌘E) from the toolbar start estimating all tasks.

The estimate counts down number of tasks to estimate.

The result of an estimate, blue numbers indicates there is data to synchronize. Execute the real run either direct from the summarized estimated view by left arrow (shortcut ⌘R) on the toolbar.

To se details from the estimate, select a row and details are presented.

Selecting a row presents the details after an estimate run.

Synchronize tasks by selecting blue arrow (shortcut ⌘R) from the toolbar on the summarized view after estimating all tasks. A progress is shown on each task with data to be synchronized. All synchronize tasks adds a logrecord, time for synchronize task and transferred amount of data. All data about synchronize tasks are collected from rsync output.

4 - Export and import

Tasks can be exported and imported between profiles and to new Macs. Choose File and Export and import.

Export: select catalog and set name for export file. The export file is a JSON data file. Either selected tasks or all tasks might be exported to file.

Import: as an example a new profile is created for importing tasks. Before import there are no tasks created.

Import: select the exported JSON file for import.

Import: the file for import is selected, data is presented for import. Either select some tasks or all tasks are imported.

Import: all tasks are imported in to the empty new profile. If tasks are imported into an existing profile with tasks, the imported tasks are appended to existing tasks.

5 - Latest version of rsync

The default /usr/bin/rsync on macOS Sonoma and macOS Sequoia is not equal, but both are version 2.6.9 protocol 29. The licence for /usr/bin/rsync is different. And there might also be some differences in code. For both default versions, there has been a lot of changes since version 2.6.9 was released.

In macos Sonoma, the default verson is version 2.6.9 which was released in November 2006. In macOS Sequoia, the default verson is a version 2.6.9 compatible rsync, based on the BSD-licence. The command, in macOS Sequoia:

 /usr/bin/rsync --version

displays openrsync: protocol version 29, rsync version 2.6.9 compatible.

It is adviced to install the latest release of rsync by Homebrew. Install Homebrew and install the latest version of rsync by the command:

brew install rsync

In RsyncUI, select settings and then Rsync and path. If rsync is installed by Homebrew, just tick of Rsync ver3.x and RsyncUI set the correct path for rsync.

RsyncUI supports snapshots of files. Due to a bug in version 2.6.9 in rsync, the snapshot feature of RsyncUI require to install the latest version of rsync.

6 - Passwordless login

Using RsyncUI to synchronize data to a remote server requires what is called passwordless login by ssh-key. It is not possible to supply a user login and password in the progress of synchronizing data in RsyncUI.

Before commencing to use RsyncUI to synchronize data to a remote server, it is required to setup and enable passwordless login by ssh-key. It is recommended to setup and enable this by terminal before using RsyncUI.

There are two ways to setup and enable passwordless login by ssh-key, either by default value or by your own value.  Default value for RSA based ssh-key is ~/.ssh/id_rsa and portnumber 22.

If using default ssh-key value and no info about ssh-key in RsyncUI, RsyncUI add the parameter -e ssh to the rsync command to ensure data is tunneled and encrypted by ssh. The above applies if destination is a remote server only and to restore data as well.

Important

If default values for ssh-key is used, it is not required to add information about ssh-key to RsyncUI. It is only necessary to add information if you create your own ssh-keypath and identityfile.

The ssh parameter within the rsync command is, if ssh-keypath and identityfile is 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.

Example

As an example I have created ssh-key for rsync only. The ssh-keypath is set to ~/.ssh_rsyncosx/ and the RSA based identityfile is rsyncosx, default port 22. The rsync command to synchronize my Documents catalog is, set by RsyncUI, to my Raspberry Pi server is:

/opt/homebrew/bin/rsync --archive --verbose --compress --delete \ 
-e  "ssh -i ~/.ssh_rsyncosx/rsyncosx -p 22" --stats \ 
/Users/thomas/Documents/ thomas@raspberrypi:/backups/Documents/ 

To use my own ssh-key and ssh-keypath data, the following is added to RsyncUI in settings.

Ssh-keypath and identityfile

How to set ssh-keypath and identityfile in the user configuration.

If global ssh parameters are set, it applies to all configurations. It is possible to set other ssh values on each task. There is a check of the ssh-keypath and identityfile. When enabling user selected ssh-keypath and identityfile please make sure it is in compliance with:

~/.mynewsshcatalog/mynewkey

The prefix has to be ~ followed by a /. RsyncUI will verify that the ssh-keypath is prefix by ~ and at least two / before saving the new ssh-keypath.

Tools used

The following ssh tools are used: ssh-keygen and ssh-copy-id. RsyncUI only assist in setting up RSA based key.

The ssh functions assist in two methods:

  • private and public ssh key pair based upon default ssh values for RSA based key ~/.ssh/id_rsa
  • private and public ssh key pair based upon user selected values as ~/.ssh_rsyncosx/rsyncosx

If creating a new public ssh key pair based upon default ssh values for RSA based key, RsyncUI does not add any parameters to the rsync command because this is default values. Ssh parameters to the rsync command is only added if the second method is chosen.

The following commands for creating a new, alternative private and public ssh-key pair:

cd
mkdir .ssh_rsyncosx
ssh-keygen -t rsa -N "" -f ~/.ssh_rsyncosx/rsyncosx

where

  • -t rsa "" generates a RSA based key-pair
  • -N "" sets no password
  • and ~/.ssh_rsyncosx/rsyncosx is set by the user

The following command copy the newly created public key to the server:

ssh-copy-id -i /Users/thomas/.ssh_rsyncosx/rsyncosx -p NN user@server

You can also setup the new ssh-keypath and identityfile in a terminal window and after setup add the new ssh-keypath and identityfile in Userconfig. RsyncUI will automatically enable it when added in user config.

The user can also apply local ssh-keypath and identityfile and ssh port, which rules the global settings, on each task.

Make sure that the new ssh catalog has the correct permissions. Open a terminal window and execute the following command.

chmod 700 ~/.ssh_rsyncosx

7 - RsyncUI files

RsyncUI read and store configurations, log records and user settings as JSON files. The location of files is: $HOME/.rsyncosx/macserialnumber. RsyncUI 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/<profile>/logrecords.json

User settings

The user settings are stored as:

$HOME/.rsyncosx/macserialnumber/rsyncuiconfig.json

The user settings applies to all profiles.

The logfile

The logfile is a text file and normally view within RsyncUI.

$HOME/.rsyncosx/macserialnumber/rsyncui.txt

8 - Snapshots

Utilizing snapshot is an effective method to restore old 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 the first snapshot and never changed or deleted, the file file.txt in the latest snapshot is a hardlink to the original file in the first snapshot. If the file.txt is deleted from the first snapshot, the filesystem takes care of updating and where to save the original file as part of the delete operation. In RsyncUI, even if all snapshots are tagged for delete, the first and last snapshot are not deleted.

Snapshot is not possible in a rsync daemon setup.

What is a snapshot?

A snapshot is a saved state or backup of data at a specific point of time. Every snapshot is in sync with local catalog at the time of creating the snapshot. Previous versions of files can be restored from a snapshot. The snapshot is by utilizing the --link-dest parameter to rsync.

Remote server

The rsync parameter for next snapshot to synchronize to a remote.server is:

--link-dest=~/snapshots/n-1 /Users/thomas/data/ user@remote.server:~/snapshots/n

where

  • n is the number of next snapshot to be synchronized
  • n-1 is the latest synchronized snapshot
  • /Users/thomas/data/ is the source catalog, only read by rsync
  • ~/snapshots/ is the destination catalog where snapshots are synchronized
Local attached disc

The above with a local attached disc, mounted as /Volume/backup is:

--link-dest=/Volume/backup/snapshots/n-1 /Users/thomas/data/ /Volume/backup/snapshots/n

where

  • n is the number of next snapshot to be synchronized
  • n-1 is the latest synchronized snapshot
  • /Users/thomas/data/ is the source catalog, only read by rsync
  • /Volume/backup/snapshots/ is the destination catalog where snapshots are synchronized

Create a snapshot

To create a snapshot task select snapshot as type in add tasks. Do not copy and paste command for execution within a terminal window. RsyncUI saves the number n to the task. The number n is the next snapshot number. The number n is used when computing the parameter for rsync and is picked up from the configuration.

Snapshot administration

It is important to administrate snapshots. By administrate means deleting not relevant snapshots. If snapshots are never deleted the number of snapshots might become difficult to use. A snapshot is most likely used to restore old and deleted files. This is why a plan to administrate snapshots is important. RsyncUI can assist you in this.

Deleting snapshots is a destructive operation and should be performed with care. It is important to have a plan about which snapshots to keep and which to delete. RsyncUI utilizes a simple plan for delete and keep snapshots.

The plan for keep and delete

Selecting the Tag button evaluates all snapshots based on the date withing the log record. Based and the selected plan and date, snapshots are either tagged with keep or delete. Snapshots which are tagged with delete are also preselected for delete. To actually delete the marked snapshots require to select the Delete button.

Even if all snapshots are tagged for delete, the first and last snapshot are not deleted. The first and last snapshot are removed from the delete list as part of preparation (internal) of delete.

The plan is based upon three parts where the parameter plan has an effect on previous months (and years):

  • the current week
    • keep all the snapshots within the current week
    • value of plan has no effect on the current week
  • the current month minus the current week
    • keep all snapshots for the selected Day of week, e.g all snapshots every Sunday this month
    • value of plan has no effect on the current month
  • previous months (and years)
    • keep the snapshot in the last week of month for selected Day of week, e.g the last Sunday in the month
    • if plan == Every, keep for the selected Day of week, e.g all snapshots every Sunday, every week in previous period
    • if plan == Last, keep for the selected Day of week, e.g all snapshots every last Sunday every month in previous period

Tagging and delete snapshots

It is advised to cleanup the number of snapshots. Select a plan, tagg the snapshots and delete the snapshots which are marked for delete. It is advised to cleanup the number of snapshots. Select a plan, tagg the snapshots and delete the snapshots which are marked for delete.

9 - RsyncUI settings

There are a few settings to be tweaked. Settings are saved to permanent store. Usersettings might be opened by the default shortcut ⌘,.

  • Rsync and path - rsync and path settings
  • Monitor and log - monitor and log settings
  • ssh - ssh settings
  • Environment - set environment variables for ssh, there are a few variables to set, RsyncUI only support one environment variable

The Info shows version of rsync in use and the path for storing and reading configurations to permanent store.

9.1 - Monitor and log

Settings are automatically saved when changed.

Monitor network, error and log settings

  • Monitor network

    • monitor the network connection during execution of tasks
    • if a network connection is dropped during execution, RsyncUI sends an interrupt signal to the task and it halts with an error
  • Check for error in output

    • if the word error is discovered in output from rsync it is notified
    • se below
  • Add summary logrecord

    • by default on, a summary only of each synchronization is added to the logrecords, view Log Listings from Sidebar
  • Log summary logfile

    • by default off, there is also possible to add a short summary to the logfile
      • timestamp
      • last twenty lines of output from rsync which includes a summary of the task
  • Confirm execute

    • see below

The log file is stored at $HOME/.rsyncosx/macserial/rsyncui.txt. The logfile can be opened from the main view.

Error output rsync

Sample of error in output from rsync. If switch Check for error in output is on RsyncUI writes the output to logfile and Alerts the user about error in rsync.

Confirm execute

This option is only available if version 3.x of rsync is enabled.

The confirm dialog if number of files to synchronize is like a new task. Sometimes a remote server or local disk is unavailable or forgotten to attach. If you commence a synchronize task unaware of destination resource is not available, rsync might believe this is a new full synchronize and a dialog confirms synchronize or abort

  • if a remote server is unavailable rsync will most likely complain and throw an error, if check for error in output in user settings is enabled, the rsync error messages written to log and an Alert informing about it will occur
  • if a local disk is not attached rsync will try to synchronize data to /Volumes/ catalog on your mac, this catalog is normally where macOS mounts local attached disks
/dev/disk5s2 on /Volumes/Import bilder (apfs, local, nodev, nosuid, journaled, noowners)
/dev/disk6s1 on /Volumes/Backups (apfs, local, nodev, nosuid, journaled, noowners)

Below the local attached volume is not connected, the estimate may think there is a new synchronize task. If you just forgot to attach the disk you dont want RsyncUI to synchronize data to the /Volume catalog.

When the switch is on RsyncUI ask to confirm synchronize.

9.2 - Rsync and path

Settings are automatically saved when changed.

Version rsync

It is advised to install the latest version of rsync by Homebrew. RsyncUI discover what type of Mac you are on. The default path for Homebrew is:

  • Intel based Mac is: /usr/local/bin
  • on the Apple Silicon: /opt/homebrew/bin.

Path rsync

The path for rsync is set to default values if rsync is installed by Homebrew, using default path or rsync as part your macOS. The snapshot feature require version 3.2.x of rsync.

If version of rsync is not installed by Homebrew set path to rsync.

  • if Rsync v3.x is on - set optional path if NOT by Homebrew
  • any version of rsync should work, but only version 2.6.9 and last release of version 3.2.x are tested and verified

Path for restore

  • preset temporary path for restoring single files and catalogs
  • preset temporary path for a full restore

Mark days after

Tasks with older execute date than number of days are marked red.

Backup configurations

You can any time backup the current setup, configurations and logs including all profiles by the wrench button. The backup executes a copy to your Documents catalog and postfixes the copy with a timestamp -month-day-year/hour/minute.

The backups is located in your Documents catalog: $HOME/Documents/RsyncUIcopy-05-06-2021/08/21

9.3 - SSH settings

In this view you can let RsyncUI assist in creating ssh-key and setup global ssh-keypath and identityfile. ssh-key is requiered for passwordless logins to remotes servers. You can either utilizing default values for ssh-key or set your own. There is some more info about passwordless logins.

ssh keys

Local ssh-key is present

If on RsyncUI has found a local ssh-key.

Default values for RSA based ssh-key is ~/.ssh/id_rsa and portnumber 22. It is not required to set your own values for ssh-keypath and identityfile if default values are used. If there are no local ssh-key selecting the Create button will create the keys. If ssh-key is present, either default values or by the user set ssh-keypath and identityfile, RsyncUI will mark it.

Set ssh-keypath and identityfile

The user can set a selected ssh-keypath and identityfile which applies to all configurations.

  • ssh-keypath + identityfile, user selected if other than default
  • portnumber, which ssh communicates through

If global values are set, this is what the ssh parameter within the rsync command looks like

-e  "ssh -i ~/.ssh_keypath/identityfile -p NN"

where

  • -i is the ssh-keypath and identityfile
  • -p is the port number ssh communicates through, default port 22

If global ssh parameters are set, it applies to all configurations. It is possible to set other ssh values on each task. Global ssh-keypath and identityfile in use.

10 - Quicktask

Use RsyncUI for quickly synchronize files to either local or remote storage. If synchronizing to a remote storage require setup of passwordless login.

There are two types of quick tasks:

  • synchronize - synchronize local files to remote
  • syncremote - synchronize remote files to local

If syncremote the localcatalog in the form is the remote data and remotecatalog is the local data where remote data will land when pulled.

After entering data, default is a --dry-run task. It is adviced to inspect the result before the real run.

Catalog parameters

  • Local catalog: required field
  • Remote catalog: required field
    • a ~ is expanded as the home catalog with full path by the remote operating system
    • the remote catalog might also be added by full path, depends where the backup catalog is placed on remote server
    • the backup catalog might also be a local catalog on a local attached disk

Remote parameters

  • Remote username:
    • username for login to remote server
  • Remote server:
    • either server name or IP-address for remote server

11 - Restore data

Restore data from within RsyncUI is only allowed for remote servers. Restore data from attached volumes by macOS Finder only. A restore has to be executed to a temporary restore path. This is to secure not destroying any original data. A restore session might be as follows.

List of filenames with more than 10,000 lines will be truncated due to UI performance. A workaround if list of filenames are truncated, either search for filenames by filter or go for a full restore by ./.. A filterstring will only fetch filenames ahead of a restore, which containes the filterstring.

Select either file or catalog to restore. Switching the command toggle shows the actual restore command. Selecting restore shows a --dry-run of restore. Switch of --dry-run toggle for actual restore of files. After a restore a view presenting output from rsync will be displayed.

12 - Important

If you are new to the command line tool rsync and RsyncUI please read this information. RsyncUI is a GUI only on top of the command line tool. It is rsync which does the actual work, not RsyncUI

The –delete parameter and new tasks

The --delete parameter is a default parameter set by RsyncUI. The parameter instructs rsync to keep the source and destination in sync. The parameter instructs rsync to delete all files in the destination which are not present in the source.

Default parameters set by RsyncUI to rsync can be disabled task by task. If you decide to disable a default parameter, be sure you understand what the result is. A disabled default parameter can be enabled again.

Be safe

rsync is a fantastic tool, but used wrong may cause damage and lost data. There are some verification and checks in RsyncUI. But it is your own responsibilty to verify that a new tasks does exactly what you want it to do before the real run.

The snapshot feature of rsync is a very nice feature. It is possible to change the snapshot number.

If you let RsyncUI do the job and you are most likely safe. RsyncUI is a free and opensource application, please read the MIT licence.

Aborting tasks

Please be aware it is an external task not controlled by RsyncUI, which executes the command line tool rsync. RsyncUI is monitoring the task for progress and termination.

RsyncUI as your main tool for backup

The User Interface of RsyncUI can for users who dont know rsync, be difficult or complex to understand. The main objective is to ease the use of rsync, not teach macOS users how to use it. That is beyond the scope.

13 - License

The MIT License (MIT)

Copyright (c) 2024 - Thomas Evensen

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

14 - Parameters to rsync

RsyncUI implements a few default parameters which are fine for synchronize data. The actual default parameters used in tasks are depended upon executing rsync over network connection or to local attached discs.

The user can remove default parameters if required. Parameters to rsync are saved by task including a local ssh parameter on the task. The local ssh parameter overrides a global ssh parameter if set.

If using default ssh-key values and no info about ssh-keys in RsyncUI, RsyncUI append the parameter -e ssh to the rsync command to ensure data is tunneled and encrypted by ssh. The above applies if destination is a remote server only and to restore data as well.

Ssh parameters by task

The by task ssh parameters overrides global ssh parameters set in the user config.

  • ssh port, set if ssh uses other port than standard port 22
  • the ssh-keypath and identity file, normally this is .ssh/id_rsa, set only if other keypath and identity file to be used by ssh

Adding parameters to rsync

To add a parameter to rsync add the parameter in the field. RsyncUI enables seven user added parameters. Use any of the field to add parameter. The user is responsible for adding correct parameter. If there is added parameters which rsync dont understand, rsync will throw an error message.

Parameters are normally constructed as:

  • parameter=value
    • --exclude-from=/Volumes/home/user/exclude-list.txt
  • parameter only
    • --stats
    • --dry-run

For a full list of parameters to rsync please see the rsync docs.

Backup switch

You can instruct rsync to save changed and deleted files in a separate backup catalog ahead of the change. This feature is utilized by setting the following parameters:

  • --backup parameter instructs rsync to save changed files
  • --backup-dir parameter where to save changed or deleted files before rsync synchronize source and destination
    • RsyncUI does suggest a value for the --backup-dir but you might set it to whatever you want

Default catalog for backup of <catalog to synchronize> relativ to the synchronized catalog is: ../backup_<catalog to synchronize>

The Verify flag (icon)

The resulting commandline string is dynamically updated when changing parameters. By the Verify flag new parameters might be tested before saving. The verify executes a --dry-run task for verification of parameters. The Verify is context sensitive. If like the verify swicth is selected the verify executes a verify. And likewise for synchronize and restore switch.

Regarding the Verify flag and the verify switch is on. If there are many files a verify will take some time due to rsync computes the checksum and compares each files by checksum.

14.1 - Default parameters to rsync

Some of the default parameters can be switched on or off on a task.

The following parameters might be switched on/off:

  • --compress compress files before transmitting, networked tasks only
  • --delete delete all files at destination which are not in the source

The following parameters are applied to all tasks and cannot be switched off:

  • --archive ensures that all files are transferred with all attributes preserved
  • --verbose make rsync very outspoken, required for counting files in RsyncUI

Enable rsync daemon - enabling rsync daemon puts a double colon :: in address parameter to rsync. It forces rsync to use the rsync daemon remote.

15 - Signing and notarization

RsyncUI is signed with my Apple ID developer certificate and notarized by Apple. This means that the app is verified and checked for not containing malicious code and it will work with Apples Gatekeeper technology. A message from Apple is issued when opening either a new or updated application the first time.

Notarizing is required for all software.