*New 11.3 series Release:
2019-10-19: XigmaNAS 11.3.0.4.7014 - released

*New 12.0 series Release:
2019-10-05: XigmaNAS 12.0.0.4.6928 - released!

*New 11.2 series Release:
2019-09-23: XigmaNAS 11.2.0.4.6881 - released!

We really need "Your" help on XigmaNAS https://translations.launchpad.net/xigmanas translations. Please help today!

Producing and hosting XigmaNAS costs money. Please consider donating for our project so that we can continue to offer you the best.
We need your support! eg: PAYPAL

About rsync command

Synchronize files & directories to/from NAS4Free with minimal data transfer.
Forum rules
Set-Up GuideFAQsForum Rules
Post Reply
satimis
NewUser
NewUser
Posts: 2
Joined: 30 Dec 2016 17:38
Status: Offline

About rsync command

#1

Post by satimis » 30 Dec 2016 17:54

Hi all,

I'm running following command to copy directories, subdirectories and files from local pc to remote pc on internal network.

Code: Select all

⟫ rsync -r -a -v -e "ssh -l satimis" Transfer_Directory/* 192.168.xx.xxx:/media/satimis/Temp_Storage/
It works seamlessly for me for years. The problem is "I have to copy all directories including files to "Transfer_Directory" which was created for temporarily storing directories and files for transfer. Is there any way avoiding this step, able to copy directory, subdirectories and files directly.

e.g.

Code: Select all

⟫ rsync -r -a -v -e "ssh -l satimis" /home/satimis/data/directoryAAA 192.168.xx.xxx:/media/satimis/Temp_Storage/
directoryAAA will be created automatically on the remote pc (/media/satimis/Temp_Storage/directoryAAA). But the directories /home/satimis/data/ won't be copied to the remote pc as well.

Please shed me some light. Thanks

Regards
satimis

transposedmesse
NewUser
NewUser
Posts: 6
Joined: 10 Apr 2016 06:31
Contact:
Status: Offline

Re: About rsync command

#2

Post by transposedmesse » 23 Feb 2017 03:13

So you want that directory to be copied, but not all the other contents of it that aren't directoryAAA? There might be a "preserve directory structure" flag you can add on to the command. Check the man pages for something that sounds like that.

Otherwise, just putting '/home' would work.

satimis
NewUser
NewUser
Posts: 2
Joined: 30 Dec 2016 17:38
Status: Offline

Re: About rsync command

#3

Post by satimis » 23 Feb 2017 07:30

transposedmesse wrote:
23 Feb 2017 03:13
So you want that directory to be copied, but not all the other contents of it that aren't directoryAAA? There might be a "preserve directory structure" flag you can add on to the command. Check the man pages for something that sounds like that.

Otherwise, just putting '/home' would work.
Hi,

Thanks for your advice.

I found that /home/satimis/data/directoryAAA without backslash will only copy the directory "directoryAAA" including its files to remote server, not necessary copying it to a transition directory.

Regards
satimis

Post Reply

Return to “RSYNC”