I'm trying to use rsync
to copy data from a webserver to a local backup. Considering I need to copy several things, including some home directories from different users, I'm running rsyncd
with a few predefined modules.
[homedirs]
with path/home
and includes/excludes set up to not copy e.g. cache files[database]
with the path set to where I make SQL dumps[server]
with the path set to where the server configuration lives
I'm currently running three separate commands in the form of rsync -az $HOST::$MODULE ./$MODULE
whenever I create a backup. I've tried rsync -az $HOST::$MODULE1 ::$MODULE2 ::$MODULE3 ./
, but this results in the contents of those modules being dumped in the same place, instead of in separate directories.
I wouldn't mind the directories where the backups end up in to have the same name as the server-side dirs (e.g. /path/to/backups/home
), or to have arbitrary other names, so long as the files are consistently split into a different directory for every module offered through rsyncd
.