D
D
diman552018-04-01 03:30:14
rsync
diman55, 2018-04-01 03:30:14

How to copy everything except *.txt to rsync?

Hello. Please tell me how to transfer all files and folders through rsyns except txt files from one server to another
I do this rsync -avzhv -e --exclude "*.txt" ssh /home/* [email protected]:/home/
backup rsync: Failed to exec --exclude: No such file or directory (2)
I have a bunch of other folders and files in my home folder. So, I need to copy completely all the data from the home folder except for txt files

Answer the question

In order to leave comments, you need to log in

2 answer(s)
B
Boris Syomov, 2018-04-01
@kotomyava

The -e must be followed by a parameter indicating what to run as a remote shell. Naturally, --exclude is not suitable for this role. =)
In general, it is simply inserted in the wrong place.
Well, it is not necessary to write -e ssh - this is already the default.

D
diman55, 2018-04-01
@diman55

Now, if suddenly someone comes in handy rsync -avzhv --exclude "*.txt" ssh /home/* [email protected]:/home/backup

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question