Skip to main content

Client Command (hsync)

The hsync command is a command that synchronizes files between a remote server and clients. It also supports synchronizing local files.

Basic Format

The basic format is as follows.

Local  : hsync [OPTION]... SRC [SRC]... DEST

Remote :
Push : hsync [OPTION]... SRC [SRC]... [USER@]HOST[:PORT]:DEST
Pull : hsync [OPTION]... [USER@]HOST[:PORT]:SRC [:SRC]... DEST

Option List

The options for the hsync commands are below.

Synchronization

DescriptionShort NameOption Name
Verify transferred files by digest checkcchecksum
Archive mode is -rlptgoDaarchive
Recurse into directoriesrrecursive
Use relative path namesRrelative
Don’t send implied dirs with --relativeno-implied-dirs
Make backupsbbackup
Make backups into hierarchy based in DIRbackup-dir
Backup suffix (default ~)suffix
New files are updateduupdate
Update destination files by in-place copyinplace
Transfer directories without recursingddirs
Copy symlinks as symlinksllinks
Transform symlink into referent file/dirLcopy-links
Only “unsafe” symlinks are transformedcopy-unsafe-links
Ignore symlinks that point outside the treesafe-links
Transform symlink to dir into referent dirkcopy-dirlinks
Treat symlinked dir on receiver as dirKkeep-dirlinks
Preserve permissionspperms
Preserve executabilityEexecutability
Affect file and/or directory permissionschmod
Preserve owneroowner
Preserve groupggroup
Preserve device filesdevices
Preserve special filesspecials
Specify device fies and special filesD
Preserve modification timesttimes
Omit directories from --timesOomit-dir-times
Omit symlinks from --timesJomit-link-times
Receiver attempts super-user activitiessuper
Turn sequences of nulls into sparse blockssparse
Copy files wholeWwhole-file
Copy over one file systemone-file-system
Skip creating new files on receiverexisting
Skip updating files that exist on receiverignore-existing
An alias for --delete-duringdel
Delete extraneous files from dest dirsdelete
Receiver deletes before transfer, not duringdelete-before
Receiver deletes during the transferdelete-during
Find deletions during, delete after transferdelete-delay
Receiver deletes after transfer, not duringdelete-after
Delete excluded files from dest dirsdelete-excluded
Force deletion of dirs even if not emptyforce
Don’t delete more than NUM filesmax-delete
Don’t transfer any file larger than SIZEmax-size
Don’t transfer any file smaller than SIZEmin-size
Keep partially transferred filespartial
Put a partially transferred file into DIRpartial-dir
Prune empty directory chains from file-listmprune-empty-dirs
Don’t map uid/gid values by user/group namenumeric-ids
Custom username mappingusermap
Custom groupname mappinggroupmap
Simple username/groupname mappingchown
Don’t skip files that match size and timeIignore-times
Skip files that match in sizesize-only
Set the accuracy for mod-time comparisons@modify-window
Create temporary files in directory DIRTtemp-dir
Compress file data during the transferzcompress
Explicitly set compression levelcompress-level
Exclude HCP files from transferhcp-exclude
Add a file-filteringffilter
Add a rule to exclude filesexclude
Read exclude patterns from a fileexclude-from
Add a rule to include filesinclude
Read include patterns from a fileinclude-from
Read a list of source-file names from a filefiles-from
Give some file-transfer statsstats
Output numbers in a human-readable formathhuman-readable
Show progress during transferprogress
Specify partial and progress settingsP
Output a change-summary for all updatesiitemize-changes
Output updates using the specified formatout-format
Stop rsync at the specified point in timestop-at
Stop rsync after the specified time have elapsedstop-after

Selectable Communication Method Function

DescriptionShort NameOption Name
The HpFP protocolhpfp
The WebSocket protocol(SSL/TLS)wss
The port-separation UDP(HpFP) protocol(deprecated)udp
The WebSocket protocol (plaintext communications)ws
Directly connect to the Proxy server when the WebSocket protocolws-proxy-direct
Set the Proxy server when the WebSocket protocolws-proxy
Multiple connectionsmcd

File I/O Extension Function

DescriptionShort NameOption Name
Use file I/O extension (beta, Linux)fio-extension
Use Direct I/O (beta, Linux)fio-direct
Use Linux asynchronous I/O (beta, Linux)fio-async-linux
Alignment size on Direct I/Ofio-direct-align
Alignment size on source sitefio-direct-align-local
Alignment size on destination sitefio-direct-align-remote
How to malloc with alignmentfio-direct-malloc
Reuse allocated memory with alignmentfio-direct-reuse-aligned
Threshold of files for Direct I/Ofio-direct-threshold
Maximum events of asynchronous I/Ofio-async-max-events
Maximum events to get on asynchronous I/Ofio-async-max-get-events
Timeout on getting events on asynchronous I/Ofio-async-get-events-timeo
How making pre-allocation of storagefio-fallocate
Unit size of the pre-allocationfio-fallocate-unit
Suppress file I/O extension on source sitefio-no-extension-local
Suppress file I/O extension on destination sitefio-no-extension-remote
Force file I/O extension for all filesfio-extension-always

Congestion Control

DescriptionShort NameOption Name
Congestion control modes in the HpFP protocolhpfp-cong

Data Flow Control, Message Data Size Control

DescriptionShort NameOption Name
MSS(Maximum Segment Size) in the HpFP protocolhpfp-mss

Data Flow Control, Data Buffer Setting

DescriptionShort NameOption Name
Set the sending buffer size for the HpFP protocolhpfp-sndbuf
Set the receiving buffer size for the HpFP protocolhpfp-rcvbuf

Data Flow Control, Bandwidth Control

DescriptionShort NameOption Name
Limit socket I/O bandwidthbwlimit

Authentication

DescriptionShort NameOption Name
Server certificate checking is disabled in WebSocket protocol communicationswss-no-check-certificate
Specify a username first and synchronizationuser
Specify a password first and synchronizationpassword

Retransmission Function

DescriptionShort NameOption Name
Automatically rerunauto-rerun

Various Monitorings

DescriptionShort NameOption Name
Investigation mode starts (deprecated)investigation

Performance Evaluation

DescriptionShort NameOption Name
Perform a trial run with no changes madendry-run
No disk I/O, but keep readingdry-run-keep-read
No disk I/O, but keep writingdry-run-keep-write
No disk I/O and Direct I/O, but keep malloc with alignmentdry-run-keep-memalign

Log Management

DescriptionShort NameOption Name
Increase log verbosityvverbose
Set the log verbosity level of INFOinfo
Suppress non-error messagesqquiet
Specify a file where to log progresslog-file
Specify an application diagnostic log output destinationhcp-diag
Specify various statistics log output destinationshcp-stat-log-file
Specify an execution record output destinationhcp-out
Start in the multiple-run modemulti-run

Software Information Update

DescriptionShort NameOption Name
Check the application versionVversion
Check the configuration and input parametersconfig-test
Display the command helphhelp

System Operating Environment Settings

DescriptionShort NameOption Name
Setting form a path of the configuration fileconfig-file
Make configuration from command lineconfig-option
Show configuration option's namesshow-config-options
Setting by a relative path from the current directoryinclude-conf-from-cwd
Server compatibility disabledno-earlier-serv-compat

Check System Information

DescriptionShort NameOption Name
Show system infosystem-info
Run host benchmarkrun-host-benchmark
Specify measurement categories on the benchmarkrun-host-benchmark-categories

Please refer to the hcpd command section on the following option.

--investigation

Please refer to the hcp command section on the following option.

--hpfp, --wss, --fio-extension, --fio-direct, --fio-async-linux, --sparse, --user, --password, --config-file, --config-option, --show-config-options, --system-info, --run-host-benchmark, --run-host-benchmark-categories, --hcp-diag, --hcp-stat-log-file, --udp, --ws, --wss-no-check-certificate, --ws-proxy-direct, --ws-proxy, --hpfp-cong, --hpfp-mss, --hpfp-sndbuf, --hpfp-rcvbuf, --fio-direct-align, --fio-direct-align-local, --fio-direct-align-remote, --fio-direct-malloc, --fio-direct-reuse-aligned, --fio-direct-threshold, --fio-async-max-events, --fio-async-max-get-events, --fio-async-get-events-timeo, --fio-fallocate, --fio-fallocate-unit, --fio-no-extension-local, --fio-no-extension-remote, --fio-extension-always, --hcp-out, --multi-run, --dry-run-keep-read, --dry-run-keep-write, --dry-run-keep-memalign, --no-agent, --ident-select, --include-conf-from-cwd, --no-earlier-serv-compat, --mcd

--hcp-stat-log-file, --dry-run-keep-read, --dry-run-keep-write and --dry-run-keep-memalign are corresponding to --stat-log-file, --no-diskio-keep-read, --no-diskio-keep-write and --no-diskio-keep-memalign of the hcp command respectively.

Synchronization

c, checksum

=========================================================================
Supported OS : Linux / Windows / Mac
Format : -c | --checksum
=========================================================================

When a checksum doesn’t match, it behaves to transmit the file.

--
Example:
[user@localhost ~]$ hsync -c ...
--

a, archive

=========================================================================
Supported OS : Linux / Windows / Mac
Format : -a | --archive
=========================================================================

It behaves the same as -rlptgoD. This option is effective to set a directory archive with maintaining the file attribute.

--
Example:
[user@localhost ~]$ hsync -a ...
--

r, recursive

=========================================================================
Supported OS : Linux / Windows / Mac
Format : -r | --reursive
=========================================================================

It recursively searches directories and transmits files.

--
Example:
[user@localhost ~]$ hsync -r ...
--

R, relative

=========================================================================
Supported OS : Linux / Windows / Mac
Format : -R | --relative
=========================================================================

Use relative paths.

--
Example:
[user@localhost ~]$ hsync -R ...
--

no-implied-dirs

=========================================================================
Supported OS : Linux / Windows / Mac
Format : --no-implied-dirs
=========================================================================

When --relative is used, this suppresses sending information of intermediate directories of relative paths given from the command line arguments. It results in preventing hsync from removing symbolic links on a path corresponding to the intermediate directories on the receiver side due to collision of file types. --keep-dirlinks also works for this purpose.

--
Example:
[user@localhost ~]$ hsync --no-implied-dirs ...
--

b, backup

=========================================================================
Supported OS : Linux / Windows / Mac
Format : -b | --backup
=========================================================================

In backup, if a file with the same name exists in the destination, the transferring file is renamed.

--
Example:
[user@localhost ~]$ hsync -b ...
--

backup-dir

=========================================================================
Supported OS : Linux / Windows / Mac
Format : --backup-dir=<dir-name>
-------------------------------------------------------------------------
dir-name
Default : none
Range of Values : path component characters
=========================================================================

A directory name to backup is specified.

--
Example:
[user@localhost ~]$ hsync --backup-dir=backup_20211013 ...
--

suffix

=========================================================================
Supported OS : Linux / Windows / Mac
Format : --suffix=<suffix-name>
=========================================================================

The suffix to rename for backup is specified.

--
Example:
[user@localhost ~]$ hsync --suffix=.bk ...
--

u, update

=========================================================================
Supported OS : Linux / Windows / Mac
Format : -u | --update
=========================================================================

It doesn’t transfer files that are newer on the destination. In the case of the same update time, when the file size is different, It will be transmitted.

--
Example:
[user@localhost ~]$ hsync -u ...
--

inplace

=========================================================================
Supported OS : Linux / Windows / Mac
Format : --inplace
=========================================================================

It instructs the receiver to write files without temporary files. When transferring a file is aborted, the file is kept as a partial file. Resuming the file will be performed when a digest of the partial file is identical to one of the source file in range from the head to a length of the partial file.

--
Example:
[user@localhost ~]$ hsync --inplace ...
--

d, dirs

=========================================================================
Supported OS : Linux / Windows / Mac
Format : -d | --dirs
=========================================================================

It instructs the source to include all directories that are encountered. Unlike --recursive, a directory’s contents are not copied, unless the tail end of the directory name is specified with “.” or “/”.

--
Example:
[user@localhost ~]$ find from_dir/
from_dir/
from_dir/dir01
from_dir/dir02
from_dir/dir02/file02.txt
from_dir/dir03
from_dir/dir03/dir03_1
from_dir/dir03/dir03_1/file03_1.txt
from_dir/dir03/dir03_1/file03_2.txt
from_dir/file.txt
[user@localhost ~]$ hsync --dirs ... from_dir/ to_dir/
[user@localhost ~]$ find to_dir/
to_dir
to_dir/dir01
to_dir/dir02
to_dir/dir03
to_dir/file.txt
--
=========================================================================
Supported OS : Linux / Mac
Format : -l | --links
=========================================================================

The symbolic link from the source is copied directly to the destination.

If you do not specify any options related to link-copy, such as --links, --copy-links, etc., symbolic links are not copied to destinations.

--
Example:
[user@localhost ~]$ hsync -l ...
--
=========================================================================
Supported OS : Linux / Mac
Format : -L | --copy-links
=========================================================================

It transforms each symlink encountered in the source into the referent item following the symlink chain to the file or directory that it references.And then it copies it to the destination.

If you do not specify any options related to link-copy, such as --links, --copy-links, etc., symbolic links are not copied to destinations.

--
Example:
[user@localhost ~]$ hsync -L ...
--
=========================================================================
Supported OS : Linux / Mac
Format : --copy-unsafe-links
=========================================================================

“unsafe” symbolic links are first resolved to the referent of symbolic and copied to the destination.

“unsafe” symbolic links are the followings.

  • symbolic links pointing outside the copied tree.
  • symbolic links pointing to absolute paths.
--
Example:
[user@localhost ~]$ hsync --copy-unsafe-links ...
--
=========================================================================
Supported OS : Linux / Mac
Format : --safe-links
=========================================================================

This command instructs not to copy “unsafe” symbolic links themselves to the destinations.

“unsafe” symlinks copies are skipped in --copy-links or --copy-unsafe-links unless any options specify the referents to copy.

--
Example:
[user@localhost ~]$ hsync --safe-links ...
--
=========================================================================
Supported OS : Linux / Mac
Format : -k | --copy-dirlinks
=========================================================================

hsync follows symbolic links at source refer to directories and copy the directories in names of the symbolic links to the destination. This option dose not resolve symbolic links to files.

--
Example:
[user@localhost ~]$ hsync --copy-dirlinks ...
--
=========================================================================
Supported OS : Linux / Mac
Format : -K | --keep-dirlinks
=========================================================================

hsync keeps symbolic links pointed to directories on the receiver side without deleting the links. And it transfer files recursively when -r option is specified as if the kept links are directories.

When this option is not set and a directory whose name is identical to the name of the link exists on the sender side, hsync determines they are conflicted resources and delete the link to replace by the directory. This option suppresses this behavior.

--
Example:
[user@localhost ~]$ hsync --keep-dirlinks ...
--

p, perms

=========================================================================
Supported OS : Linux / Mac
Format : -p | --perms
=========================================================================

The source permissions are maintained at the destination when copying.

--
Example:
[user@localhost ~]$ hsync -p ...
--

E, executability

=========================================================================
Supported OS : Linux / Mac
Format : -E | --executability
=========================================================================

Execute permissions in the destination are set by judging the file executability in the source.

When a file has an execution attribute of any of owner, group, or other, it is judged to be executable. In the case that the execution attribute is different between the source and destination, the file permission in the destination is modified as follows.

  • To make a file non-executable, all execution attribute ‘x’ is turned off.\

  • To make a file executable, the execution attribute ‘x’ of the field where a read attribute ‘r’ is set, is turned on.

    Example: [user@localhost ~]$ hsync -E ...

chmod

=========================================================================
Supported OS : Linux / Mac
Format : --chmod=<modifier>[,<modifier>...]
-------------------------------------------------------------------------
modifier
Default : none
Range of Values : permission modifiers (based on the chmod command)
=========================================================================

This option applies the specified permission to the file.

Permission modifiers follow the format of the chmod command, whose extension format is below.

https://download.samba.org/pub/rsync/rsync.1
--chmod=CHMOD

--
Example:
[user@localhost ~]$ hsync --chmod=Dg+s,ug+w,Fo-w,+X ...
[user@localhost ~]$ hsync --chmod=D2775,F664 ...
--

o, owner

=========================================================================
Supported OS : Linux / Mac
Format : -o | --owner
=========================================================================

This option maintains the owner of the source file when copying.

When --numeric-ids is not set, UID is set by resolving from the username of the owner attribute in the source files on the destination host. In the case of UID can’t be resolved, such as no user, etc., UID is set the same value as the source file.

--
Example:
[user@localhost ~]$ hsync -o ...
--

g, group

=========================================================================
Supported OS : Linux / Mac
Format : -g | --group
=========================================================================

This option maintains the group of the source file when copying.

When --numeric-ids is not set, GID is set by resolving from the groupname in the group attribute on the source files on the destination host. If GID can’t be resolved, such as no group, etc., GID is set at the same value as the source file.

--
Example:
[user@localhost ~]$ hsync -g ...
--

devices

=========================================================================
Supported OS : Linux / Mac
Format : --devices
=========================================================================

This tells hsync to copy device files. When this option is not set, device files will be skipped.

--
Example:
[user@localhost ~]$ hsync --devices ...
--

specials

=========================================================================
Supported OS : Linux / Mac
Format : --specials
=========================================================================

This tells hsync to copy special files (FIFO and sockets). When this option is not set, special files will be skipped.

--
Example:
[user@localhost ~]$ hsync --specials ...
--

D

=========================================================================
Supported OS : Linux / Mac
Format : -D
=========================================================================

This tells hsync to use --devices and --specials.

--
Example:
[user@localhost ~]$ hsync -D ...
--

t, times

=========================================================================
Supported OS : Linux / Windows / Mac
Format : -t | --times
=========================================================================

This option maintains the modification time of the source file.

--
Example:
[user@localhost ~]$ hsync -t ...
--

O, omit-dir-times

=========================================================================
Supported OS : Linux / Windows / Mac
Format : -O | --omit-dir-times
=========================================================================

This option doesn’t maintain the modification times of the directory when copying.

This option is effective only when both -r and --times options are enabled. This option is also applied to symbolic links to directories. The update time is not stored.

--
Example:
[user@localhost ~]$ hsync -rtO ...
--
=========================================================================
Supported OS : Linux / Windows / Mac
Format : -J | --omit-link-times
=========================================================================

This option doesn’t maintain the modification times of the symbolic link when copying.

This option is effective only when both --times and --links options are enabled.

--
Example:
[user@localhost ~]$ hsync -tlJ ...
--

super

=========================================================================
Supported OS : Linux / Mac
Format : --super
=========================================================================

This tells hsync to perform some operations which requires privileges like the following operations. When this option is not set, hsync will determine to perform or not to subject to user’s access rights on the receiver side.

  • Change owner of files
  • Change group of files
  • Copy device files

--no-super also tells hsync not to perform them regardless of user’s access rights.

--
Example:
[user@localhost ~]$ hsync --super ...
--

n, dry-run

=========================================================================
Supported OS : Linux / Windows / Mac
Format : -n | --dry-run
=========================================================================

This option makes a trial copy without practically operating the file.

--
Example:
[user@localhost ~]$ hsync --dry-run ...
--

W, whole-file

=========================================================================
Supported OS : Linux / Windows / Mac
Format : -W | --whole-file
=========================================================================

On resuming a file, this option tells hsync to copy the total of the file from the head, but not from a resuming position. This option is effective only when --inplace options are enabled.

--
Example:
[user@localhost ~]$ hsync -W --inplace...
--

one-file-system

=========================================================================
Supported OS : Linux / Mac
Format : --one-file-system
=========================================================================

This option tells hsync to skip files residing on other file systems. Twice or more specification indicates hsync run without making directories on the boundaries.

--
Example:
// Boundary directories that are residing on other file systems will be made.
[user@localhost ~]$ hsync --one-file-system ...
// Such directories will not be made.
[user@localhost ~]$ hsync --one-file-system --one-file-system ...
--

existing

=========================================================================
Supported OS : Linux / Windows / Mac
Format : --existing
=========================================================================

This option copies files existing on the destination but skips copying the files which do not exist yet on the destination.

--
Example:
[user@localhost ~]$ hsync --existing ...
--

ignore-existing

=========================================================================
Supported OS : Linux / Windows / Mac
Format : --ignore-existing
=========================================================================

This option copies files which do not exist yet on the destination but skips updating the files existing on the destination.

--
Example:
[user@localhost ~]$ hsync --ignore-existing ...
--

del

=========================================================================
Supported OS : Linux / Windows / Mac
Format : --del
=========================================================================

This option is an alias for --delete-during.

--
Example:
[user@localhost ~]$ hsync --del ...
--

delete

=========================================================================
Supported OS : Linux / Windows / Mac
Format : --delete
=========================================================================

This option deletes files and directories in the destination that don’t exist in the source. The deletion range is confined to the synchronized directories.

--
Example:
[user@localhost ~]$ hsync --delete ...
--

delete-before

=========================================================================
Supported OS : Linux / Windows / Mac
Format : --delete-before
=========================================================================

This option requests file deletions be executed before the transfer.

--
Example:
[user@localhost ~]$ hsync --delete-before ...
--

delete-during

=========================================================================
Supported OS : Linux / Windows / Mac
Format : --delete-during
=========================================================================

This option requests file deletions be executed during the transfer.

This is the default --delete operation mode.

--
Example:
[user@localhost ~]$ hsync --delete-during ...
--

delete-delay

=========================================================================
Supported OS : Linux / Windows / Mac
Format : --delete-delay
=========================================================================

This option requests file deletions be executed after the transfer, but determining its deletions on transfer.

--
Example:
[user@localhost ~]$ hsync --delete-delay ...
--

delete-after

=========================================================================
Supported OS : Linux / Windows / Mac
Format : --delete-after
=========================================================================

This option requests file deletions be executed after the transfer.

--
Example:
[user@localhost ~]$ hsync --delete-after ...
--

delete-excluded

=========================================================================
Supported OS : Linux / Windows / Mac
Format : --delete-excluded
=========================================================================

This option tells hsync to remove files which are excluded from transfer.

--
Example:
[user@localhost ~]$ hsync --delete-excluded ...
--

force

=========================================================================
Supported OS : Linux / Windows / Mac
Format : --force
=========================================================================

This option requests to delete non-empty directories.

This option is used to delete a directory, even though it is not empty, in the case that the source is a file or symbolic link and the destination directory is supposed to be deleted or overwritten.If this option is not set in the above condition, the destination directory is not deleted, and the source file transfer is skipped.

--
Example:
[user@localhost ~]$ hsync --force ...
--

max-delete

=========================================================================
Supported OS : Linux / Windows / Mac
Format : --max-delete=<max-num>
-------------------------------------------------------------------------
max-num
Default : none
Range of Values : -1, 0 - maximum value of signed integer
=========================================================================

The max number of files and directories to be deleted is set.

The max number is set at max-num. When 0 or –1, deleting is not operated.

--
Example:
[user@localhost ~]$ hsync --max-delete=100 ...
--

max-size

=========================================================================
Supported OS : Linux / Windows / Mac
Format : --max-size=<size>
-------------------------------------------------------------------------
size
Default : none
Range of Values : numeric value, numeric string with unit
=========================================================================

The maximum size of the file to be transferred is set.

Numeric value or numeric string including the units (B, K, M, G, T, P) can be set as the maximum file size. Please find the format of the numeric string with the units on the following website.

https://download.samba.org/pub/rsync/rsync.1
--max-size=SIZE

The following setting items that limit the size of the file used in the hcp commands are ignored in the hsync ones.

  • MaxReceiveFileSize

  • MaxSendFileSize

    --
    Example:
    [user@localhost ~]$ hsync --max-size=1000 ...
    [user@localhost ~]$ hsync --max-size=1.5mb-1 ...
    --

min-size

=========================================================================
Supported OS : Linux / Windows / Mac
Format : --min-size=<size>
-------------------------------------------------------------------------
size
Default : none
Range of Values : numeric value, numeric string with unit
=========================================================================

The minimum size of the file to be transferred is set.

Numeric value or numeric string including the units (B, K, M, G, T, P) can be set as the minimum file size. It supports the same format as --max-size.

--
Example:
[user@localhost ~]$ hsync --min-size=1000 ...
[user@localhost ~]$ hsync --min-size=1.5mb-1 ...
--

partial

=========================================================================
Supported OS : Linux / Windows / Mac
Format : --partial
=========================================================================

This tells hsync to keep files on the receiver side which are aborted on transfer.

--
Example:
[user@localhost ~]$ hsync --partial ...
--

partial-dir

=========================================================================
Supported OS : Linux / Windows / Mac
Format : --partial-dir=<dir_path>
-------------------------------------------------------------------------
dir_path
Default : none
Range of Values : path string of file system
=========================================================================

This option specifies a directory path to keep files which are aborted on transfer. When the path is a relative one, a directory to keep an aborted file will be created at a directory where hsync writes the file on the receiver side.

If hsync detects an aborted file on the directory, it tries to resume the file. Only using --partial dose not make this resuming operation.

--
Example1:
[user@localhost ~]$ hsync --partial-dir=_part_dir_ ...
Example2:
[user@localhost ~]$ hsync --partial-dir=/home/user/_part_dir_ ...
--

m, prune-empty-dirs

=========================================================================
Supported OS : Linux / Windows / Mac
Format : -m | --prune-empty-dirs
=========================================================================

This option instructs not to transfer empty directories.

It is useful to avoid unnecessary filter-rule checking by include/exclude/filter.

--
Example:
[user@localhost ~]$ hsync -m ...
--

numeric-ids

=========================================================================
Supported OS : Linux / Mac
Format : --numeric-ids
=========================================================================

This option instructs to maintain the file ownership and group at the destination with UID/GID in the source file.

--
Example:
[user@localhost ~]$ hsync -o -g --numeric-ids ...
--

usermap

=========================================================================
Supported OS : Linux / Mac
Format : --usermap=<mapping>[,<mapping>...]
-------------------------------------------------------------------------
mapping
Default : none
Range of Values : string describing user mapping by its names and UIDs
=========================================================================

When maintaining the sender’s ownership in a destination file by the --owner option, it instructs to do that after specified user mapping.

A string described user mapping is set in mapping. The source can be a username or UID value. The destination can be a username or UID value as well. Please refer to the following web site regarding the format.

https://download.samba.org/pub/rsync/rsync.1
--usermap=STRING, --groupmap=STRING

--
Example:
[user@localhost ~]$ hsync -o --usermap=0-99:nobody,wayne:admin,*:normal ...
--

groupmap

=========================================================================
Supported OS : Linux / Mac
Format : --groupmap=<mapping>[,<mapping>...]
-------------------------------------------------------------------------
mapping
Default : none
Range of Values : string describing group mapping by its names and GIDs
=========================================================================

When maintaining the sender’s group in a destination file by the --group option, it instructs to do that after specified group mapping.

A string described group mapping is set in mapping. The source can be a group name or GID value. The destination can be a group name or GID value as well. Please refer to the following web site regarding the format.

https://download.samba.org/pub/rsync/rsync.1
--usermap=STRING, --groupmap=STRING

--
Example:
[user@localhost ~]$ hsync -g --groupmap=usr:1,1:usr ...
--

chown

=========================================================================
Supported OS : Linux / Mac
Format : --chown=<user>[:<group>]
-------------------------------------------------------------------------
user
Default : none
Range of Values : user name
-------------------------------------------------------------------------
group
Default : none
Range of Values : group name
=========================================================================

It instructs to apply the supecified username and group name to the owner and group.

This option adopts the --usermap or --groupmap option. For example, the following two commands result in the same.

[user@localhost ~]$ hsync --chown=foo:bar ...
[user@localhost ~]$ hsync --usermap=*:foo --groupmap=*:bar ...

I, ignore-times

=========================================================================
Supported OS : Linux / Windows / Mac
Format : -I | --ignore-times
=========================================================================

It instructs to copy file even if its size and update time are the same between source and destination.

--
Example:
[user@localhost ~]$ hsync -I ...
--

size-only

=========================================================================
Supported OS : Linux / Windows / Mac
Format : --size-only
=========================================================================

It instructs to copy files as long as their size are different between source and destination. The update time is ignored. Even when the update time is the same, the file is copied.

--
Example:
[user@localhost ~]$ hsync --size-only ...
--

@, modify-window

=========================================================================
Supported OS : Linux / Windows / Mac
Format : -@<mod_win_time> | --modify-window=<mod_win_time>
-------------------------------------------------------------------------
mod_win_time
Default : 0
Range of Values : modification window time (in secs)
=========================================================================

This option specifies a modification window time that indicates a margin to compare timestamps of files for determining a file is newer, older or equal to another one.

When 0 is set, hsync determines two files are same in time if timestamps of them completely matches in seconds. When a value over 0 is set, it dose if the difference of their timestamps is in range of the value.

Any negative value is not supported (in rsync, it is supposed to specify a nanoseconds).

--
Example:
[user@localhost ~]$ hsync --modify-window=3 ...
// Files whose difference of timestamps is under 3 seconds or equals to it will be decided as same files in time.
--

T, temp-dir

=========================================================================
Supported OS : Linux / Windows / Mac
Format : -T<dir_path> | --temp-dir=<dir_path>
-------------------------------------------------------------------------
dir_path
Default : none
Range of Values : path string of file system
=========================================================================

This option specifies a directory path to make temporary files.

When the path is a relative one, an existing directory on the destination directory given from the command line will be used. When this option is not set, a temporary file of each file will be created at a directory where hsync writes the file on the receiver side.

Transfer of files results in failure if the directory indicated by this option dose not exist on the receiver side.

--
Example1:
[user@localhost ~]$ hsync --temp-dir=_temp_dir_ ... /path/to/src 192.168.1.100:/path/to/dst
// /path/to/dst/_temp_dir_ is the temporary directory of this transfer.
Example2:
[user@localhost ~]$ hsync --temp-dir=/home/user/_temp_dir_ ...
--

z, compress

=========================================================================
Supported OS : Linux / Windows / Mac
Format : -z | --compress
=========================================================================

It instructs to compress files data to send.

This command compresses all messages communicating with a server, such as messages including file data, control messages to request sending files, etc.

--
Example:
[user@localhost ~]$ hsync -z ...
--

compress-level

=========================================================================
Supported OS : Linux / Windows / Mac
Format : --compress-level=<level>
-------------------------------------------------------------------------
level
Default : 5
Range of Values : 0 - 9
=========================================================================

It set the compress level.

--
Example:
[user@localhost ~]$ hsync --compress-level=5 ...
--

hcp-exclude

=========================================================================
Supported OS : Linux / Windows / Mac
Format : --hcp-exclude
=========================================================================

This option tells hsync to exclude the following files from its file transfer that will be generated by hsync in its running.

  • Linux/macOS : .hcp.out, .hcp.in, .hcp.diag, .hcp.statistics.*
  • Windows : _hcp.out, _hcp.in, _hcp.diag, _hcp.statistics.*

You can also use --filter options for this purpose.

This option actually uses exclude filters described below. When you specify this option in one time, hsync will register exclude filters for the running (client) platform that reject files which are generated on that platform by hsync. When specifying twice, hsync will register other exclude filters that reject files which are not generate on that platform.

--
Example1:
[user@localhost ~]$ hsync --hcp-exclude ...
Example2:
[user@localhost ~]$ hsync --filter="-H" ...
--

f, filter

=========================================================================
Supported OS : Linux / Windows / Mac
Format : -f <filter-desc> | --filter=<filter-desc>
-------------------------------------------------------------------------
filter-desc
Default : none
Range of Values : filter strings
=========================================================================

It adds the filter to select a file. The filters (including --exclude, --exclude-from, --include, --include-from as will be described later.) are applied in the order of the description. Please refer to the following description on its format and rules, etc.

https://download.samba.org/pub/rsync/rsync.1
FILTER RULES
INCLUDE/EXCLUDE PATTERN RULES
MERGE-FILE FILTER RULES
LIST-CLEARING FILTER RULE
ANCHORING INCLUDE/EXCLUDE PATTERNS
PER-DIRECTORY RULES AND DELETE

hsync provides a unique parameter of "H" for exclude/include modifiers (see the --hcp-exclude option for more detail).

The following functions have not yet been implemented on this version.

  • Merge filter(merge, dir-merge)

  • “/”, “C”, “s”, “r”, “p”, “x” among exclude/include modifiers.

    --
    Example:
    // Search for any .c files in all directories and copy them.
    [user@localhost ~]$ hsync --filter="+ */" --filter="+ *.c" --filter="- *" ...
    // The same result as the above command
    [user@localhost ~]$ hsync --include="*/" --filter="+ *.c" --exclude="*" ...
    --

exclude

=========================================================================
Supported OS : Linux / Windows / Mac
Format : --exclude=<exclude-desc>
-------------------------------------------------------------------------
exclude-desc
Default : none
Range of Values : excluded filter strings
=========================================================================

It adds excluded filters. Please refer to the following description on its format and rules, etc.

https://download.samba.org/pub/rsync/rsync.1
FILTER RULES
INCLUDE/EXCLUDE PATTERN RULES

In this option, modifiers for the exclude rule described earlier cannot be described. When “+ ” is put at the beginning, the include rule is adopted. When “!” is put at the beginning, the clear rule is adopted.

--
Example:
[user@localhost ~]$ hsync --exclude="*.c" ...
--

exclude-from

=========================================================================
Supported OS : Linux / Windows / Mac
Format : --exclude-from=<file>
-------------------------------------------------------------------------
file
Default : none
Range of Values : path string of file to read excluded rules
=========================================================================

It adds a file to read excluded rules. Please refer to the following description on its format and rules, etc.

https://download.samba.org/pub/rsync/rsync.1
FILTER RULES
INCLUDE/EXCLUDE PATTERN RULES

When another filter rules are specified before and after, the rule read from a file is put between them.

--
Example:
[user@localhost ~]$ cat .exclude-rule
*
[user@localhost ~]$ hsync --include="*/" --include="*.c" --exclude-from=".exclude-rule" ...
--

include

=========================================================================
Supported OS : Linux / Windows / Mac
Format : --include=<include-desc>
-------------------------------------------------------------------------
include-desc
Default : none
Range of Values : included filter strings
=========================================================================

It adds included filters. Please refer to the following description on its format and rules, etc.

https://download.samba.org/pub/rsync/rsync.1
FILTER RULES
INCLUDE/EXCLUDE PATTERN RULES

In this option, modifiers for the include rule described earlier cannot be described. When “- ” is put at the beginning, the exclude rule is adopted. When “!” is put at the beginning, the clear rule is adopted.

--
Example:
[user@localhost ~]$ hsync --include="*.c" ...
--

include-from

=========================================================================
Supported OS : Linux / Windows / Mac
Format : --include-from=<file>
-------------------------------------------------------------------------
file
Default : none
Range of Values : path string of file to read included rules
=========================================================================

It adds a file to read included rules. Please refer to the following description on its format and rules, etc.

https://download.samba.org/pub/rsync/rsync.1
FILTER RULES
INCLUDE/EXCLUDE PATTERN RULES

When another filter rules are specified before and after, the rule read from a file is put between them.

--
Example:
[user@localhost ~]$ cat .include-rule
*/
*.c
[user@localhost ~]$ hsync --include-from=".include-rule" --exclude="*" ...
--

files-from

=========================================================================
Supported OS : Linux / Windows / Mac
Format : --files-from=<file>
-------------------------------------------------------------------------
file
Default : none
Range of Values : path string of file to read a file list
=========================================================================

This tells hsync to read a list of files from the specified file.

--
Example:
[user@localhost ~]$ hsync --files-from=source.file.list ...
--

stats

=========================================================================
Supported OS : Linux / Windows / Mac
Format : --stats
=========================================================================

This tells hsync to output statistics data of file transfer.

When the verbosity by -v option is 0 or 1, logs of STATS2 will be output.

--
Example:
[user@localhost ~]$ hsync --stats ...
--

h, human-readable

=========================================================================
Supported OS : Linux / Windows / Mac
Format : -h | --human-readable
=========================================================================

This tells hsync to output numbers in a human-readable format.

--
Example:
[user@localhost ~]$ hsync --human-readable ...
--

progress

=========================================================================
Supported OS : Linux / Windows / Mac
Format : --progress
=========================================================================

This tells hsync to output progress of file transfer.

However, printing a ratio of transferred bytes is not supported.

When NAME1 and PROGRESS1 by --info options are set, the same output will be produced.

--
Example:
[user@localhost ~]$ hsync --progress ...
--

P

=========================================================================
Supported OS : Linux / Windows / Mac
Format : -P
=========================================================================

This tells hsync to enable --partial and --progress.

--
Example:
[user@localhost ~]$ hsync -P ...
--

i, itemize-changes

=========================================================================
Supported OS : Linux / Windows / Mac
Format : -i | --itemize-changes
=========================================================================

This tells hsync to print a summary of changing files. When --out-format=“%i %n%L” is set, the same output will be produced.

For the field of ‘Y’, “h”, “.” and “*” will not be produced.

For the field of ‘u(n|b)’, ‘a’ and ‘x’, only “.”, “+” and “?” will be produced due to no support for —atime, etc.

--
Example:
[user@localhost ~]$ hsync --itemize-changes ...
--

out-format

=========================================================================
Supported OS : Linux / Windows / Mac
Format : --out-format=<format>
-------------------------------------------------------------------------
format
Default : %n%L
Range of Values : format specification string
=========================================================================

This tells a format specification string to hsync for logging updates of files. It supports the following items.

  • %b Actual transfered size
  • %B Permission
  • %C Checksum (Hex notation)
  • %G GID
  • %i --itemize-changes
  • %L Symbolik link target name
  • %l File size
  • %M Modification date and time
  • %n File name
  • %o Operation name (send or recv)
  • %p Process ID
  • %t Current date and time
  • &u User name
  • %U UID
    --
    Example:
    [user@localhost ~]$ hsync --out-format="%i %l %n%L" ...
    --

stop-at

=========================================================================
Supported OS : Linux / Windows / Mac
Format : --stop-at=at=<timestamp-desc>
-------------------------------------------------------------------------
timestamp-desc
Default : none
Range of Values : y-m-dTh:m
=========================================================================

This specifies an expire of file transfer running by a date and time.

If the transfer continues at the date and time, hsync will abort the transfer.

--
Example:
[user@localhost ~]$ hsync --stop-at=2022-1-1
[user@localhost ~]$ hsync --stop-at=1-1 // until 1/1 00:00 the next year
[user@localhost ~]$ hsync --stop-at=30 // until 00:00 the next 30th
[user@localhost ~]$ hsync --stop-at=12:00 // until the next 12:00 (of today or tomorrow)
[user@localhost ~]$ hsync --stop-at=:30 // until the next xx:30
--

stop-after

=========================================================================
Supported OS : Linux / Windows / Mac
Format : --stop-after=<mins-desc>
-------------------------------------------------------------------------
mins-desc
Default : -1
Range of Values : -1, 0 - maximum value of signed integer (minute)
=========================================================================

The maximum execution time is set.

The maximum execution time is specified in the minute unit. When –1 is set, the limitation is not set.

When the execution time passes but copying hasn’t been completed, copying is suspended.

--
Example:
[user@localhost ~]$ hsync --stop-after=30 ...
--

Data Flow Control, Bandwidth Control

bwlimit

=========================================================================
Supported OS : Linux / Windows / Mac
Format : --bwlimit=<bw-desc>
-------------------------------------------------------------------------
bw-desc
Default : none
Range of Values : numeric value (byte), throughput string with unit (byte)
=========================================================================

The maximum bandwidth for sending and receiving is set.

bw-desc is numeric value or string for specifying throughput with B, K, M, G, T, or P. The unit is byte. The format is the same as —max-size.

How to limit the bandwidth by this option is the same method as MaxSendRate/MaxReceiveRate in the settings.

--
Example:
[user@localhost ~]$ hsync --bwlimit=1000000 ...
[user@localhost ~]$ hsync --bwlimit=1mb ...
--

Retransmission Function

auto-rerun

=========================================================================
Supported OS : Linux / Windows / Mac
Format : --auto-rerun
=========================================================================

It automatically restarts synchronization when transmission stops due to network errors. However, in the case that a user stops copying by Ctrl+C, it doesn't restart it at that time.

If AutoRerunTrials is unlimited and you uses the option of --ignore-times, the starting synchronization will be stopped without running.

It is recommended to use private keys that are not encrypted by passpharses for this purpose. If you need the passphrases, hcp make a cache on the memory of that passphrase to prevent interactive prompts from being shown for re-authentication.

Log Management

v, verbose

=========================================================================
Supported OS : Linux / Windows / Mac
Format : -v | --verbose
=========================================================================

The redundancy level of the application outputs is raised by one step. As it goes up, more detailed and more information is output.

hsync produces the following logs each verbosity.

-v : NAME1, STATS1, DEL1

-vv : SKIP

-vvv : none

DEL1 dose not make logs about sub directories in some cases, e.g. using —delete-excluded.

--
Example:
[user@localhost ~]$ hsync -v ...
[user@localhost ~]$ hsync -vv ...
--

info

q, quiet

=========================================================================
Supported OS : Linux / Windows / Mac
Format : -q | --quiet
=========================================================================

Suppress non-error message outputs.

--
Example:
[user@localhost ~]$ hsync -q ...
--

log-file

=========================================================================
Supported OS : Linux / Windows / Mac
Format : --log-file=<file>
-------------------------------------------------------------------------
file
Default : none
Range of Values : path string of file system
=========================================================================

This tells hsync to output progress logs of file transfer to a log file. This output will be performed in addition to output to the standard output.

--
Example:
[user@localhost ~]$ hsync --log-file=hsync.log --exclude="hsync.log" ...
--

Software Information Update

V, version

=========================================================================
Supported OS : Linux / Windows / Mac
Format : -V | --version
=========================================================================

The hsync command version is shown.

--
Example:
[user@localhost ~]$ hsync -V
hsync client (hsync) 1.5.8_1 / Linux (HpFP2 2.0.0.91_26 WSAPI 0.0.1.36 WS 4.2.0-2)
--

config-test

=========================================================================
Supported OS : Linux / Windows / Mac
Format : --config-test
=========================================================================

The hsync command parameters and configuration parameters are shown.

--
Example:
[user@localhost ~]$ hsync --config-test
...

-- [Sources] ---------------------------------------------------------------
-- [Destination] -----------------------------------------------------------
-- [Command Options] -------------------------------------------------------
verbose : -
info : -
quiet : disable
checksum : disable
archive : disable
recursive : disable
relative : disable
no-implied-dirs: disable
backup : disable
backup-dir : -
suffix : -
update : disable
inplace : disable
dirs : disable
links : disable
copy-links : disable
copy-unsafe-links : disable
safe-links : disable
copy-dirlinks : disable
keep-dirlinks : disable
perms : disable
executability : disable
chmod : -
owner : disable
group : disable
devices : disable
specials : disable
-D : disable
times : disable
omit-dir-times : disable
omit-link-times: disable
super : disable
no-super : disable
dry-run : disable
auto-rerun : disable
whole-file : disable
one-file-system: disable
existing : disable
ignore-existing: disable
delete : disable
delete-before : disable
delete-during : disable
delete-delay : disable
delete-after : disable
delete-excluded: disable
force : disable
max-delete : -
max-size : -
min-size : -
partial : disable
partial-dir : -
prune-empty-dirs : disable
numeric-ids : disable
usermap : -
groupmap : -
chown : -
ignore-times : disable
size-only : disable
modify-window : - [0]
temp-dir : -
compress : disable
compress-level : - [5]
hcp-exclude : disable
filter : -
exclude : -
exclude-from : -
include : -
include-from : -
files-from : -
stats : disable
human-readable : disable
progress : disable
-P : disable
itemize-changes: disable
out-format : - [%n%L]
log-file : -
bwlimit : -
stop-at : -
stop-after : - [-1]
user : -
password : -
version : disable
help : disable
mcd : -
-- [Configuration Parameters] ----------------------------------------------
PubkeyAuthentication : yes
WinLogonUserAuthentication : yes
PAMAuthentication : yes
LocalPasswordAuthentication : yes
NumberOfPasswordPrompts : 3
CompressLevel : -1
StrictHostKeyChecking : ask
IdentityFile : - [~/.ssh/id_rsa ~/.ssh/id_ecdsa ~/.ssh/id_ed25519 ~/.hcp/id_rsa ~/.hcp/id_ecdsa ~/.hcp/id_ed25519]
MaxReceiveRate : 100000000000
MaxSendRate : 100000000000
MaxConnectionReceiveRate : 100000000000
MaxConnectionSendRate : 100000000000
TransportTimeout : 180 sec
AcceptableCryptMethod : AES256/GCM AES256/CTR/VMAC AES256/CBC AES128/CBC [Intel:AES-NI=yes]
AcceptableDigestMethod : XXH3 SHA256 SHA160
-- [Environment Variables] -------------------------------------------------
USER : user
LOGNAME : user
HCP_PASSWORD :
HCP_WS_PROXY :
----------------------------------------------------------------------------

Please type '--config-test --config-test ...' for more details.
--

h, help

=========================================================================
Supported OS : Linux / Windows / Mac
Format : -h | --help
=========================================================================

The help information on the hsync commands is shown.

When the abbreviation is specified, this option works as long as the destination and source paths are not specified.

--
Example:
[user@localhost ~]$ hsync -h
--