Undoubtedly, Rsync is a powerful backup application to synchronize and backup files and directories in Linux and Unix-like operating systems. Since Rsync is a command line utility, many newbies may find it difficult to use. Fortunately, there are a few graphical frontend tools for Rsync available. In this guide, we will discuss one such tool named Grsync.
What is Grsync?
Grsync is a simple GTK graphical front-end application for Rsync command line utility. Using Grsync, you can easily backup, transfer, synchronize files and folders within the local system or between a local and remote systems.
No need to memorize Rsync commands. You can do everything via Grsync graphical user interface!
Grsync also allows you to backup local files to a removable device or a networked drive/share, replicate a partition to another one and mirroring files.
It supports most important features of Rsync. If you're a noob who is looking for a easy-to-use, and also a robust backup solution for your Linux desktops, Grsync is a good choice!
Grsync is a cross-platform application that supports GNU/Linux, macOS and Windows.
Install Grsync in Linux
Grsync is packaged for popular Linux operating systems.
To install Grsync in Arch Linux and its variants such as EndeavourOS, Manjaro Linux, run:
$ sudo pacman -S grsync
$ paru -S grsync
$ yay -S grsync
Install Grsync in Debian, Ubuntu, Linux Mint, Pop_OS!:
$ sudo apt install grsync
Install Grsync in Fedora:
$ sudo dnf install grsync
Install Grsync in openSUSE:
$ sudo zypper install grsync
We can also install Grsync from source. Go to the Grsync official download page, get he latest tar file and then compile and install as the way you install packages from source.
In most Linux distributions, Grsync can be installed by using .
/configure && make command. You may need to install
autotools in order to compile Grsync from source. Refer the Grsync website given at the end for more details.
Once installed, Launch Grsync from Application launcher or Menu. The default interface of Grsync should look like below:
As you can see in the above screenshot, Grsync interface is very simple!
Create new sessions
You can create any number of sessions and choose different options for each session. Sessions are useful when you wanted to schedule backups and also perform different type of backups.
For instance, you can create distinct sessions for local backup, remote backup and synchronization etc.
By default, Grsync includes a predefined session called "default". In the default session, only a few options are enabled and they are safe to use.
Most options are self-explanatory. Just hover the mouse cursor on any option, you will see a brief description of the chosen option in a small pop-up.
There are three sections in Grsync main window. They are:
- Basic options,
- Advanced options,
- Extra options.
1. Basic options
In the Basic options section, you can enter the source and destination file/folder paths. In addition, you can configure the following options as well:
- Preserve time, permissions, owner and group.
- Delete files in the destination which are not present in the source.
- Show verbose output.
- Ignore files which already exist in the destination.
- Do not update newer files.
- Do not cross filesystem boundaries.
- Show progress bar during file transfer.
- Check size only, ignore time and checksum.
- Windows compatibility.
2. Advanced options
In the Advanced options section, you can choose the following options:
- Always compare file contents by checksum.
- Preserve devices.
- Keep partially transferred files.
- Copy symlinks as symlinks i.e. copy Symlinks, but do not copy link target file.
- Create backups of existing files in the destination.
- Disable recursion.
- Compress file data when transferring.
- Only update existing files.
- Keep numeric uid/gid instead of mapping user names and group names.
- Copy hardlinks as hardlinks i.e. copy hardlinks, but do not copy link target file.
- Show addition information on every changed file.
- Protect remote arguments from shell expansion.
3. Extra options
From the Extra options section, we can choose the following options:
- Execute a command before or after rsync.
- Don't run rsync and halt it, when the command that is executed before rsync fails for some reason
- Execute "after" command only if synchronization had errors.
- Browse files instead of folders.
- Run Rsync with super user or root privileges.
If you don't understand what each option does, just go with the defaults. The default selections are safe!
To avoid data loss, start with a dummy backup and test all the options one by one to verify how Rsync behaves. Once you clearly understood what each option does, go ahead and backup your important data with Grsync.
Copy or backup files and folders locally
Enter your source and target paths under the Source and Destination section.
Here, I am going to backup the contents of
/home/sk/Downloads/Ostechnix/ (Source) to
/home/sk/Documents/Local backup (destination) directory. Check all the required options in the Basic, Advanced and Extra options' sections.
Heads Up: Here, the trailing slash (/) plays an important role.
If you want to transfer a directory contents (but not the directory itself) to another directory, make sure you have specified the trailing
/ at the end of the source directory like below:
$ rsync -av path/to/source_directory/ path/to/destination_directory
A trailing slash on the source directory avoids creating an additional directory level at the destination.
To transfer a directory itself and all its children from a one one directory to another:
$ rsync -av path/to/source_directory path/to/destination_directory
Please note that I didn't add the trailing / at the end of the source directory in the above command. This will copy the whole source directory to destination.
Before running the actual backup, it is recommended to do a dry run. It will simply show what would have been done, but actually do nothing! By performing dry run, you can witness what is going to happen in background while running a task, without running the actual task.
Alternatively, you can perform dry run from File -> Simulation or press Alt+S keys.
A simulation will take place now. In the simulation, you will see what is going to happen after running the actual backup.
If the backup process is completed as intended, click the Run button to do start the actual backup.
Now the files and folders from the given source directory will be copied to the destination directory.
Transfer files and folders from local system to remote system
In the previous section, we've seen how to backup files and folders from one location to another in the same system itself. Now, we will see how to synchronize or transfer files/folders from one system to another.
For the purpose of this guide, I will be using the following two Linux systems.
- OS - Fedora 34 desktop
- Source directory -
- OS - AlmaLinux 8 server
- User - ostechnix
- IP adrress - 192.168.122.143/24
- Destination directory -
Now, I am going to backup the contents of
/home/sk/Downloads/Ostechnix/ (Source) in Fedora desktop to
/home/sk/backup (destination) directory in AlmaLinux 8.
First, create a new session by clicking on the plus (+) sign from the tool bar on the top right corner. You can also do it from Menu -> Sessions -> Add or press Alt+A. Name your new session. For example, I named it as Remote sync.
Enter the source and destination paths in the respective columns:
Make sure you have entered the correct path with correct format in Destination column like below:
Here, ostechnix is my remote username, 192.168.122.143 is my remote system's IP and /home/ostechnix/Backup is the destination directory. Replace the username, IP address and the destination path with your own.
If you want to verify if you've chosen the correct options, you can perform a dry run by clicking the light bulb icon in the tool bar or go to Menu -> File -> Simulation.
If everything goes as intended, click the execute button on the tool bar to start the actual file backup/transfer. You can also start the backup from File -> Execute.
You will be prompted to enter the remote user's password and click OK to transfer files.
Upon successful file transfer, you will see a message like below.
You may see this error -
Failed to load module "pk-gtk-module". You can safely ignore it. It has nothing to do with Grsync. Despite this minor error, Grsync is successfully transferred files from source to destination system.
To get rid of the
Failed to load module "pk-gtk-module" error, install the following package:
$ sudo dnf install PackageKit-gtk3-module
To verify if backups are successfully taken, go to the destination (in our case it is AlmaLinux remote system) and compare the contents of destination directory with source's contents.
Contents from both locations should be same.
Synchronize files and folders
To synchronize files and folders between two local directories or local and remote systems, check the box that reads - Delete on destination. This will delete files in destination that are not in present in source.
This will keep exact replica on both source and destination locations.
Please note that you must manually enter the remote user's password every time. If you want to automate the schedule jobs without any user interaction, setup password-less SSH access as described in the following link:
Grsync doesn't have any dedicated option to enable scheduled backups. However, we can use Cron to automate backups at particular interval.
Edit the current user's cron jobs using command:
$ crontab -e
Add the following lines at the end:
0 3 * * * grsync -e "default" 0 4 * * * grsync -e "Remote sync"
This will Grsync default session every day at 3 am and Remote sync session every day at 4 am. Replace the session names with your own. Save and close the file.
If you're new to Cron, refer the following guide for more Cron job examples.
Please note that you must setup SSH password-less authentication to schedule backups automatically at regular interval.
In this guide, we discussed what is Grsync, and its features and how to copy or backup files/folders within local system and transfer or synchronize files/folders between local and remote systems using Grsync.
If you're looking for a robust and secure way to backup your data, Rsync and its graphical front-end Grsync will definitely help.
- Resume Partially Transferred Files Over SSH Using Rsync
- How To Backup And Restore Files Using Deja Dup In Linux
- How To Setup Backup Server Using Rsnapshot
- How To Synchronize Files With Unison On Linux
- How To Synchronize Local And Remote Directories In Linux
- How To Synchronize Files And Directories Using Zaloha.sh
- CYA – System Snapshot And Restore Utility For Linux
- Restic – A Fast, Secure And Efficient Backup Application