A
A
Alexander Arbuzov2018-09-28 12:14:56
linux
Alexander Arbuzov, 2018-09-28 12:14:56

How to force rsync to create directories from include when exclude on the root?

You need to deploy the site. From copying it is necessary to remove all files except for some, at different levels of nesting. For filtering I use --filter
Files to be added are taken as a list from git
The rules look something like this:
[...]
+ dir_name/.settings.sample.php
+ dir_name/dir_name/filename.php
+ dir_name/dir_name/dir_name/filename. php
[...]
-*
As a result, rsync only copies what is in the root. How to make it copy all files from + with the creation of all directories and their subdirectories. What would I not write a bunch of --include for each directory that is necessary in terms of nesting level?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Arbuzov, 2018-09-28
@arbuzzz

Decided without include/exclude.
Since I have a ready list of files, I just used the directive --files-from="<path to the file with a list of files>"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question