Explore information related to rsync command

Preserve Permissions in rsync

This article will guide you on how to use rsync to preserve permissions. 

Rsync, or Remote #Sync, is a free command-line tool that lets you transfer files and directories to local and remote destinations. #Rsync is used for mirroring, performing backups, or migrating data to other servers.

a = archive - means it preserves #permissions (owners, groups), times, symbolic links, and devices. Use of "/" at the end of path: When using "/" at the end of source, rsync will copy the content of the last folder.

To preserve permissions when files and folders are copied or moved, use the Xcopy.exe utility with the /O or the /X switch. 

The object's original permissions will be added to inheritable permissions in the new location.

To make rsync to preserve timestamps:

1. To overcome this, there is another option that you can specify in the rsync command that will preserve the timestamps during the synchronization process. 

2. Without preserving the timestamp, the files will display the modification date and time as the time that the rsync command was run.

Read More



Rsync to Exclude Files and Directories

This article will guide you on easily exclude #files and #directories using the #rsync #command.
The --exclude option with the rsync command uses relative paths to the source #directory. Append the --exclude option to the rsync command, followed by the relative path to a directory or file(s).
The basic syntax for the rsync exclude option looks like this:
rsync [OPTIONS] --exclude 'file_or_directory' source/ destination/
Replace source/ with the directory name you want to use as a source for data transfer to another location.
Replace destination/ with the directory name rsync will use as the target location for your data. If the directory does not exist, rsync creates one for you and transfers the files to that directory.

Read More



Rsync from Linux to Windows share

This article will guide you on how to use #Rsync to transfer #files from #Linux to #Windows share.

cwRsync is an implementation of rsync for Windows. rsync uses a file transfer technology specified by the rsync algorithm, transferring only changed chunks of files over the network. #cwRsync can be used for remote file backup and synchronization from/to Windows systems.

Syntax of rsync #command:

1. -v, –verbose Verbose output.

2. -q, –quiet suppress message output.

3. -a, –archive archive files and directory while synchronizing ( -a equal to following options -rlptgoD).

4. -r, –recursive sync files and directories recursively.

5. -b, –backup take the backup during synchronization.

Read More



How to fix rsync skipping non-regular file error

Rsync "skipping non-regular file" error is usually triggered when  symlinks is missing or lack of a recursive mode option while transferring data and files between servers.

Read More