![linux grsync linux grsync](https://www.tecmint.com/wp-content/uploads/2013/09/Rsync-Copy-Remote-File-to-Local.png)
Grsync is available on fair number of Linux flavors (like Ubuntu), Windows and Mac OS X. It can be effectively used to synchronize local directories and it supports remote targets as well (even though it doesn’t support browsing the remote folder). In a nutshell, Grsync allows you to synchronize folders, files and make backups, while utilizing the power of the tried and tested rsync in the background to do the actual heavy lifting. So enter a great little alternative called Grsync, which is basically a graphic user interface for rsync! Linux users will be familiar with the powerful rsync command line file and directory synchronization tool, but if you are an Ubuntu user then chances are you’re not particularly keen on messing about on the command line. Back up to another internal drive, back up to a flash disk, back up to an external drive, or back up to an remote source, it doesn’t really matter as long as you make the effort to backup on a regular basis.
![linux grsync linux grsync](https://www.freecodecamp.org/news/content/images/2020/09/Screenshot-2020-09-02-at-9.07.47-PM.png)
The command below does exactly the same as the one above: rsync -a -exclude-from='exclude-file.Making backups of important folders should become a routine for everyone, simple as that. If the number of the files and/or directories you want to exclude is large, instead of using multiple -exclude options you can specify the files and directories you want to exclude in a file and pass the file to the -exclude-from option. If you prefer to use a single -exclude option you can list the files and directories you want to exclude in curly braces src_directory/ dst_directory/ To exclude multiple files or directories simply specify multiple -exclude options: rsync -a -exclude 'file1.txt' -exclude 'dir1/*' -exclude 'dir2' src_directory/ dst_directory/ If you want to exclude the directory content but not the directory itself use dir1/* instead of dir1: rsync -a -exclude 'dir1/*' src_directory/ dst_directory/ Exclude Multiple Files or Directories # In the following example the file src_directory/file.txt will not be transferred: rsync -a -exclude 'file.txt' src_directory/ dst_directory/ Exclude a Specific Directory #Įxcluding a specific directory is same as excluding a file, just pass the relative path to the directory to the -exclude option as shown below: rsync -a -exclude 'dir1' src_directory/ dst_directory/ To exclude a specific file, pass the relative path to the file to the -exclude option. From a file, using the -exclude-from option.
![linux grsync linux grsync](https://i.imgur.com/wjvjsJ4.jpg)
From a command line, using the -exclude option.There are two options to specify the files and directories you want to exclude: When excluding files or directories you need to use their relative paths to the source directory. This tells rsync to syncs directories recursively, transfer special and block devices and preserve symbolic links, modification times, group, ownership, and permissions. In the examples below, we will use rsync with the -a, option. You should have a basic knowledge of how rsync works
#Linux grsync how to#
In this tutorial, we will show you how to exclude files and directories with rsync. When copying data, you may want to exclude one or more files or directories based on their name or location. With Rsync you can mirror data, create incremental backups and copy files between systems. Rsync is a fast and versatile command line utility that synchronizes files and folders between two locations over a remote shell.