Are you experiencing "skipping non-regular file" while using rsync command? This article will help to fix it.
As part of our Server Support Services here at Ibmi Media, We have helped numerous customers fix Rsync related errors.
In this context, we shall look into this error and how to resolve it.
More about "skipping non-regular file" rsync error?
Rsync command tool in Linux is very important as it helps to share files and directories between one server and another.
Sometimes, this command fails to work and can get errors such as ;
rsync -rtvp /source/backup /destination
sending incremental file list
skipping non-regular file "backup/file/foo"
skipping non-regular file "backup/file/bar"
Rsync command error results from different factors as we shall briefly discuss them here.
How to fix "skipping non-regular file" rsync error?
Rsync error can result when recursive mode is not used such as "-r" or "-a" in reproducing hierarchies with file permissions and special files or performing data backup. Let us consider the rsync command below;
rsync -rPz /folder/local/back/ destination:/folder/remote/dir
This will result in a rsync error because you did not use the -a option which is used for files and data backups procedure. -r as used in the above command is meant to recurse the directory only.
In other cases, where symlinks is not included when transferring files between different servers, this error occurs. By default, symlinks are skipped when copying files from one server to another and this causes potential risks on the server.
In order to check if symbolic links are available in the transferred files, use the command below;
/path/to/file: symbolic link to '/path/file'
find /path -type l
To fix this error, ensure that symlinks is included which is the -l option.