D
D
Dwellss2020-01-08 21:54:33
rsync
Dwellss, 2020-01-08 21:54:33

How to list specific folders to sync in rsync?

I launch rsync to synchronize the folder:

rsync -rvz [email protected]/home/domains/html/content/0/ /home/domains/html/content1/0/

Please tell me how to list several folders, for example, you need to synchronize
/home/domains/html/content/0/
/home/domains/html/content/1/
/home/domains/html/content/2/

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vadim Priluzkiy, 2020-01-08
@Oxyd

rsync man:

ADVANCED USAGE
       The syntax for requesting multiple files from a remote  host  is  done  by
       specifying  additional remote-host args in the same style as the first, or
       with the hostname omitted.  For instance, all these work:

              rsync -av host:file1 :file2 host:file{3,4} /dest/
              rsync -av host::modname/file{1,2} host::modname/file3 /dest/
              rsync -av host::modname/file1 ::modname/file{3,4}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question