I have a local folder which I want to synchronize with a remote folder through SSH, and I'd like to do it through rsync
. I would always call rsync
with the same arguments, and same source and destination, when I want to sync this specific folder.
Is there a way to create a folder-specific configuration file for rsync
, placed in this local folder, so that when I simply run rsync
in this folder, it will automatically take the defaults from the configuration file and start synching? Something like how you'd simply call git status
in a folder, and it reads the repo from there - no further arguments about the path to the repo given.
.rsync-filter
files (seeman rsync
and search for both-F
andFILTER RULES
) but that doesn't allow you to specify options, only exclude and include and other filtering rules.rsync
, you could alias thersync
command so that callingrsync
actually calls a wrapper function which first checks for a local config file as you describe, and then calls thersync
binary. This is pretty similar to what meuh does, except it will affect all calls torsync
. While this means you can "simply run rsync", it may have unintended side effects.