Rsync Backups on Linux: A Simple Setup Guide

Backing Up Data to an External Hard Drive: An Alternative to Cloud Services
While numerous individuals currently utilize cloud-based backup solutions such as Dropbox, a desire for local control often arises. This leads to the question of replicating similar functionality by backing up data to an external hard drive. Fortunately, achieving this is quite straightforward.
Introducing Rsync: A Cross-Platform Backup Solution
Previously, we detailed the use of SyncToy for file and folder synchronization. However, SyncToy’s functionality is limited to the Windows operating system. Rsync, conversely, presents an open-source alternative compatible with a wide range of computing environments.
Regardless of whether you operate on Windows, Linux, or macOS, Rsync facilitates the backup of files and folders across these platforms.
Understanding Rsync’s Interface
Rsync is fundamentally a command-line utility. Its effectiveness is directly tied to proficiency in utilizing command-line switches. For those less comfortable with command-line interfaces, a graphical user interface (GUI) is available.
Grsync provides a user-friendly interface for Rsync, and is also accessible on both Windows and Mac operating systems.
Benefits of Using Rsync or Grsync
- Platform Independence: Operates seamlessly across Windows, Linux, and macOS.
- Flexibility: Supports a wide array of backup configurations.
- Efficiency: Only transfers the differences between files, saving time and storage space.
These tools offer a robust and versatile solution for those seeking a local backup strategy, providing control and security without relying on external cloud services.
Initiating Grsync: A Comprehensive Guide
Begin by installing Grsync utilizing your system's package manager. This ensures you have the latest version and dependencies readily available.

Next, designate a storage location for your backups, preferably external to your primary computer – such as an external hard drive or a network-attached storage (NAS) device.

Upon completion, launch Grsync and proceed to create a new session. A session encapsulates the source and destination directories, alongside any associated configurations.

Sessions allow for organized management of different backup configurations. You can easily add new sessions as needed and remove those that are no longer required.

The upper field represents the source directory, while the lower field defines the destination. The destination folder will serve as the repository for your backed-up files, functioning similarly to a Dropbox folder. The source folder contains the important files from your computer that you wish to protect.

Grsync offers three operational modes: basic, advanced, and extra. The basic options are generally sufficient for most users and provide a straightforward configuration experience.

Consider enabling the "skip newer" and "delete on destination" options. "Skip newer" prevents overwriting files in the backup that are more recent than those in the source, while "delete on destination" removes files from the backup that no longer exist in the source.

For a detailed understanding of each option, simply hover your mouse cursor over it to reveal a descriptive tooltip.

The simulation mode is a valuable tool for verifying your settings before initiating the actual backup process. It allows you to preview the changes that will be made.

Simulation does not perform any file copying; it merely generates a list of files that would be backed up based on your selected options.

If the simulation results are satisfactory, proceed to the execute menu to save your configuration and begin the backup operation.

After establishing a session for backing up files to an external storage device, create another session to synchronize files between a network folder and your computer. This enables Grsync to download new files from the network folder to your local machine.

Remember that Grsync only copies the specified folder in the source field. When synchronizing, ensure the destination field points to the parent directory of the folder you wish to synchronize, not the folder itself.

For instance, to synchronize a "documents" folder on a backup drive with your "documents" folder within your home directory, set your home directory ("home/zainul") as the destination, rather than "home/zainul/documents".

Scheduling Automatic Backups
To achieve Dropbox-like synchronization, schedule Grsync to automatically synchronize both your local folder and the network folder. Each operating system – Windows, macOS, and Linux – provides its own graphical user interface (GUI) based scheduler.

Gnome Scheduler is a user-friendly option for scheduling backups on Linux. Alternatively, you can utilize Task Scheduler on Windows or iCal on macOS.

Add both backup tasks as recurring events.

Assign descriptive names to each task and enter the following command:
grsync --e "name of the session"

Ensure that you schedule both sessions you created: the one backing up your files to the network folder and the one downloading new files from the network folder to your computer.

Rsync is a powerful utility for maintaining file synchronization across computers, network drives, and even mobile devices. Experiment with it and share your experiences with other readers in the comments section.
Grsync is available for download on Windows and macOS.