multiple remote rsync path in one task

cmu

Cadet
Joined
Feb 14, 2020
Messages
1
Hi,
i'm wondering if it is possible to add more than one remotepath into an rsync task?

I'm using rsync to backup several linux clients. Until now, I'm using root / as remote path and excluding all unwanted dir's as options. For example: --exclude=var,--exclude=proc etc.

So my exclude list is everytime longer than the folders, that i want to copy. Because of the amount of clients i have to backup, I dont want a single rsync task for every specific folder.

I know, i could use own cronjobs on cli to achive that, but I want to use the webui rsync task, so i can get a mail if something went wrong.

Thank you very much!
 

JaimieV

Guru
Joined
Oct 12, 2012
Messages
742
Sorry, I mis-answered as if you were using CLI rather than the webgui. AFAIK there's no way to use the webgui for this.

Left below in case anyone gets something from it.

Yes, you can just list the remotepaths like so:
rsync -va remote:/path1/ remote:/path2/ remote:/path3/ /path/to/rsync/to/

If your list is a bit long for that, you can pull them in from a file that just contains a list of paths to files or to folders. Include the terminal / on folders, and of course the option -r (or -a which includes it) is vital unless you just want empty directories:

rsync -va `cat filelist.txt` /path/to/rsync/to/
or
rsync -va --files-from=filelist.txt /path/to/rsync/to/

In the latter case, the filelist.txt can be at remote:/path/filelist.txt, if that's useful.

(Note that it's 1:30am and I have a stinking cold, so please validate these with --dry-run before committing)
 
Last edited:
Top