Answer the question
In order to leave comments, you need to log in
How to exclude the creation of a folder when copying, but copy its contents (RSYNC)?
Hi all!
I transfer the mail server, transferred users with passwords, it remains to transfer folders with letters.
I ran into a problem, on the new server the letters are like this: /var/vmail/domain/user/
On the old one like this: There are /var/vmail/domain/user/.maildir/
about 200 boxes.
How to transfer folders so that /.maildir folder is not created on the new server, but its contents go directly to /var/vmail/domain/user/ ?
Answer the question
In order to leave comments, you need to log in
More or less like this
ls -1 /var/vmail/domain/ | while read u; do
rsync /var/vmail/domain/$u/.maildir/* [email protected]:/var/vmail/domain/$u/
done
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question