[SOLVED]rsync over SSH syntax problem

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

[SOLVED]rsync over SSH syntax problem

Postby mackowiakp » Jul 1st, '16, 20:38

I want to rsync data FROM Synology TO my M5 server. Rsync server works on Synology and it is possible to rsync in unencrypted form:

Code: Select all
rsync --delete --password-file /home/media/Pobrane/pass1 -avrt root@example.synology.me::LAMIA /home/media/disk-1/TMP


I can login to Synology over SSH without problems. I use port 666 instead 22.

But when I try to run rsync over SSH client on M% it returns me an syntax error. I googled a lot but I dont know what I am doing wrong. Any help? Below command I use and output:

Code: Select all
[root@mackowiak Pobrane]# rsync --delete -vratx "ssh -x -p 666 -i /home/media/.ssh/id_media" root@example.synology.me:LAMIA /home/media/disk-1/TMP
Unexpected remote arg: root@example.synology.me:LAMIA
rsync error: syntax or usage error (code 1) at main.c(1330) [sender=3.1.1]


Any help?
Last edited by mackowiakp on Jul 3rd, '16, 10:19, edited 1 time in total.
Linux is like wigwam. No Windows, no Gates but Apache inside

WARNING ! The administrator has the right to refuse to install WINDOWS, invoking the conscience clause
mackowiakp
 
Posts: 660
Joined: May 23rd, '13, 07:32
Location: Gdynia, Poland

Re: rsync over SSH syntax problem

Postby Ken-Bergen » Jul 1st, '16, 21:25

In the first command you use
Code: Select all
me::LAMIA
In the second
Code: Select all
me:LAMIA
The error message says that is a problem.
Ken
Ken-Bergen
 
Posts: 1019
Joined: Mar 30th, '11, 02:45
Location: Chilliwack, BC, Canada

Re: rsync over SSH syntax problem

Postby mackowiakp » Jul 1st, '16, 22:47

No, it is not the problem. Look at output:

Code: Select all
[root@mackowiak Pobrane]# rsync --delete -vax "ssh -x -p 666 -i /home/media/.ssh/id_media" root@example.synology.me::LAMIA /home/media/disk-1/TMP
Unexpected remote arg: root@example.synology.me::LAMIA
rsync error: syntax or usage error (code 1) at main.c(1330) [sender=3.1.1]


BTW. Single ":" character must be use when rsync run over SSH. It works me correctly when I rsync files FROM client TO server. But i want to do rsync in opposite direction.
Linux is like wigwam. No Windows, no Gates but Apache inside

WARNING ! The administrator has the right to refuse to install WINDOWS, invoking the conscience clause
mackowiakp
 
Posts: 660
Joined: May 23rd, '13, 07:32
Location: Gdynia, Poland

Re: rsync over SSH syntax problem

Postby doktor5000 » Jul 2nd, '16, 17:35

With the command you posted you try to sync a folder ":LAMIA" from the home folder of the root account on the synology box to /home/media/disk-1/TMP. Is there a folder :LAMIA in the home folder of the root account ?
Also to specify a custom ssh command usually one has to use -e "ssh -ssh_options_here" and you're missing the -e

Would also be helpful if you could provide the absolute path you want to sync on the synology box here.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18057
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: rsync over SSH syntax problem

Postby mackowiakp » Jul 3rd, '16, 10:19

THX for Your help. Problem solved. now I use such command:

Code: Select all
rsync --delete -vax -e ssh lamia:/volume1/homes/piotr.mackowiak/EPI /home/media/disk-1/TMP


Where "lamia" is a host defined in ~/.ssh/config file. The definition of that host is:

Code: Select all
Host lamia
    HostName my_host.synology.me
    User root
        port 666
        ForwardX11 no
    IdentityFile /home/media/.ssh/id_media


THX one more for Your help and wish You good health after yesterdays "hertz klekot" during Fußballspiel with Italy :lol:
Linux is like wigwam. No Windows, no Gates but Apache inside

WARNING ! The administrator has the right to refuse to install WINDOWS, invoking the conscience clause
mackowiakp
 
Posts: 660
Joined: May 23rd, '13, 07:32
Location: Gdynia, Poland


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest