Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for non standard SSH port #87

Closed
xezpeleta opened this issue Apr 19, 2015 · 9 comments · Fixed by #133
Closed

Support for non standard SSH port #87

xezpeleta opened this issue Apr 19, 2015 · 9 comments · Fixed by #133

Comments

@xezpeleta
Copy link
Contributor

Currently Elkarbackup is using SSH default port (tcp/22) and there is no way to specify a custom port. Apparently in Rsnapshot you can do that using the following syntax:

backup /var/ localhost/ ssh_args=-p456

So maybe we can include this feature in Elkarbackup.

@xezpeleta
Copy link
Contributor Author

We could add a field "ssh_args" in the Client edition form, but it requires to modify the DB schema.

@goniz
Copy link

goniz commented Apr 19, 2015

It's also possible to do that with:
"--rsh=ssh -p PORT"
But ssh_args seems like the right option

Using the url field looks easier and sounds completely reasonable for me

xezpeleta added a commit that referenced this issue Apr 20, 2015
@xezpeleta
Copy link
Contributor Author

Done. By the moment it will be a hidden feature, so we can specify custom args in the same way we do it in Rsnapshot using the word ssh_args.

Client Url, listening in SSH port 2222:

root@192.168.33.10 ssh_args=-p2222

It should be valid for any ssh argument.

captura de pantalla 2015-04-20 a las 16 54 41

@xezpeleta
Copy link
Contributor Author

To do: Test script execution

@goniz
Copy link

goniz commented Apr 20, 2015

Wow, great response time :)
Hope to test it today to will report soon

@parreitu
Copy link
Contributor

Hi @xabi

I've tried to test your solution, because I think that it could be a good solution in another case, but it doesn't work for me.
elkarbackup

Elkarbackup was reporting errors, so I've got the rsnapshot config file (http://elkarbackup/client/1/job/1/config) and this is the rsync command generated by rsnapshot in the last line of the configuration file

backup    root@192.168.1.137 ssh_args=-p2222:/sdcard/DCIM    .

and this is the error

root@elkarbackup:~/kk# rsnapshot -c config.txt sync
Unexpected remote arg: ssh_args=-p2222:/sdcard/Download
rsync error: syntax or usage error (code 1) at main.c(1232) [sender=3.0.9]
----------------------------------------------------------------------------
rsnapshot encountered an error! The program was invoked with these options:
/usr/bin/rsnapshot -c config.txt sync
----------------------------------------------------------------------------
ERROR: /usr/bin/rsync returned 1 while processing root@192.168.1.137 ssh_args=-p2222:/sdcard/Download

Of course, If I try to connect by ssh from the Elkarbackup console, it works.

So, I've been changing things, and finally I've found the error. Changing the rsync command in order to put the ssh_args in the final part of the command, all is ok.

backup  root@192.168.1.137:/sdcard/Download     .       ssh_args=-p2222

Now, the question is how to change the code in order to change the position of the ssh_args part in the rsync command

@goniz
Copy link

goniz commented Apr 23, 2015

It works great for me.
Did you compile+install the latest code from master?

On Thu, Apr 23, 2015, 00:35 Pedro Arreitunandia notifications@github.com
wrote:

Hi @xabi https://github.com/Xabi

I've tried to test your solution, because I think that it could be a good
solution in another case, but it doesn't work for me.
[image: elkarbackup]
https://cloud.githubusercontent.com/assets/3928521/7285704/dcd57b2a-e946-11e4-9c63-c71b96adf114.png

Elkarbackup was reporting errors, so I've got the rsnapshot config file (
http://elkarbackup/client/1/job/1/config) and this is the rsync command
generated by rsnapshot in the last line of the configuration file

backup root@192.168.1.137 ssh_args=-p2222:/sdcard/DCIM .

and this is the error

root@elkarbackup:~/kk# rsnapshot -c config.txt sync
Unexpected remote arg: ssh_args=-p2222:/sdcard/Download

rsync error: syntax or usage error (code 1) at main.c(1232) [sender=3.0.9]

rsnapshot encountered an error! The program was invoked with these options:

/usr/bin/rsnapshot -c config.txt sync

ERROR: /usr/bin/rsync returned 1 while processing root@192.168.1.137 ssh_args=-p2222:/sdcard/Download

Of course, If I try to connect by ssh from the Elkarbackup console, it
works.

So, I've been changing things, and finally I've found the error. Changing
the rsync command in order to put the ssh_args in the final part of the
command, all is ok.

backup root@192.168.1.137:/sdcard/Download . ssh_args=-p2222

Now, the question is how to change the code in order to change the
position of the ssh_args part in the rsync command


Reply to this email directly or view it on GitHub
#87 (comment)
.

@xezpeleta
Copy link
Contributor Author

That's it @parreitu , this feature will be available in the next version (1.1.4), so download the code from github or wait some weeks ;)

@xezpeleta xezpeleta added this to the 1.1.4 milestone Apr 27, 2015
@xezpeleta
Copy link
Contributor Author

Now yes, you can test the pre-release:

#89

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants