Drobo

droboshare rsync ssh

Hello,

I read a maximum threads I could on that subjects without any success.

Here is what I have

  • Drobo (v? do not know how to confirm the version I guess it is a v2)
  • DroboShare

Here is what I want

  • Use the drobo/droboshare to backup 3 linux remote servers

Here is what I did

I modified the /mnt/DroboShares/Drobo/DroboApps/rsync/rsyncd.conf

uid = root
gid = root
pid file = /var/run/rsyncd.pid

[drobo0]
	path = /mnt/DroboShares/Drobo
	comment = Drobo Share
        read only = false
[drobo1]
	path = /mnt/DroboShares/Drobo1
	comment = Drobo Share
	read only = false

I modified the /mnt/DroboShares/Drobo/DroboApps/rsync/rsync-start.sh

#!/bin/sh
#APP_DIR=$3
APP_DIR=/mnt/DroboShares/Drobo/DroboApps/rsync
nohup $APP_DIR/rsync --daemon --config=$APP_DIR/rsyncd.conf --log-file=$APP_DIR/rsyncd.log > /dev/null &

I exported the ./DroboApps/rsync/ and darfs ./slash/usr/bin to the current ${PATH}

From the droboshare I can now

rsync -avh remoteserver:/home/mylogin/testdrobo /mnt/DroboShares/Drobo/localtest

But I need to provide the remote ssh login pass manually.

How can I automatically rsync to any of my remote servers ?

Thank you,

In your example you are on the DrobShare and are running rsync. In this scenario rsync will ssh from the DrobShare into a remote computer to transfer the files. If you do not want to have to manually enter a password then you need to setup an ssh trusted-key login. You can google search for this or I can post the steps if you have trouble.

Perhaps a better alternative is to initiate rsync from the computer instead of from the DroboShare.
The DrobShare is running rsync in daemon mode which means it is listening on the network for rsync protocol connections.
If you are on your computer and run
rsync rsync://[ip address of DroboShare]
It will list our the rsync shares on your DroboShare - from your config file it should list “drobo0” and “drobo1”

If you want to rsync files up to DroboShare then from your computer
rsync /mydir/ rsync://[ip address of DroboShare]:/drobo0/mydir/

If you want to rsync files down from the DroboShare then from your computer
rsync rsync://[ip address of DroboShare]:/drobo0/mydir/ /mydir/

Hello ajspencer,

Thank you for your answer.
I took your directions and am now rsyncing from the remote servers to the droboshare rsync daemon.

Thus the command looks like
rsync /mydir/ rsync://[ip address of DroboShare]:/drobo0/mydir/

Do you know why I don’t need any password anymore ? I though rsync was using ssh by default ?

Thank you,

Rsync can be run on the command-line and tunnel over ssh via
rsync /local-source-dir/ user@remotehost:/remote-destination-dir/
or
rsync user@remotehost:/remote-source-dir/ /local-destination-dir/
This type of command can be run from either your computers or from the DroboShare.
With this type of command rsync initiates an ssh connection then sends the data down the encrypted tunnel.

One further thing with this setup is you only need rsync installed on both the computers and the DroboShare. You do NOT need to setup an rsyncd.conf file, a startup script, or run rsync as a daemon.

Rsync will also be slower and use more CPU power as all the data is encrypted by ssh as it is transferred.

In your configuration you setup rsync to run as a daemon (background process) as configured in the rsyncd.conf file. With this setup rsync actually listens on the network for connections. Rsync is entirely responsible for sending the data over the network - no involvement from ssh.
As previously posted instead of using “username@host:/directory/” you use “rsync://host/directory” which tells rsync to contact an rsync daemon directly rather than initiate an ssh connection.

The data is unencrypted but it should be faster. Rsync in daemon mode has a lot of configuration options you can use in the rsyncd.conf file
http://www.samba.org/ftp/rsync/rsyncd.conf.html
You can setup usernames, passwords, etc.

If you are concerned about security you can add a line for which hosts (computers) you allow to connect. This is a good way to secure which computers can read or write files without having to use usernames/passwords.

how are you able to use ssh? when i run rsync on the droboshare, i am getting this error:

rsync: Failed to exec ssh: No such file or directory (2) rsync error: error in IPC code (code 14) at pipe.c(84) [receiver=3.0.3] rsync: writefd_unbuffered failed to write 4 bytes [receiver]: Broken pipe (32) rsync error: error in IPC code (code 14) at io.c(1544) [receiver=3.0.3]

edit: i didn’t catch that DSARFS was necessary. after installing it and re-defining my $PATH, ssh is now available and rsync seems to be operational.

now it seems i am not able to use rsync nor ssh under the “user” account:

user@DroboShare:~$ rsync <options> Couldn't open /dev/null: Permission deniedrsync: writefd_unbuffered failed to write 4 bytes [receiver]: Broken pipe (32) rsync error: error in rsync protocol data stream (code 12) at io.c(1544) [receiver=3.0.3] user@DroboShare:~$ ls -l /dev/null crw-rw---- 1 root 0 1, 3 Feb 21 2007 /dev/null

so, i tried making /dev/null readable/writable:

root@DroboShare:~$ chmod 666 /dev/null

now, i am getting this error:

user@DroboShare:~$ rsync <options> PRNG is not seeded rsync: writefd_unbuffered failed to write 4 bytes [receiver]: Broken pipe (32) rsync error: unexplained error (code 255) at io.c(1544) [receiver=3.0.3] user@DroboShare:~$

everything works fine as root. are we unfortunately forced to use the root account?[hr]
well, sorry, i guess i am just being a bit impatient. ^^ this environment is quite messy, nevertheless.

i was able to get around this by changing the permissions on /dev/null and /dev/random to 666.

now, under the “user” account, i was able to create a keypair with ssh-keygen. however, now i was getting this error:

user@DroboShare:~$ rsync <options> Host key verification failed. rsync: connection unexpectedly closed (0 bytes received so far) [receiver] rsync error: unexplained error (code 255) at io.c(635) [receiver=3.0.3]

running ‘ssh -vvv (hostname)’ returned, among other things, “debug1: read_passphrase: can’t open /dev/tty: Permission denied”. so i changed the permissions on /dev/tty to 666 as well.

finally, a test-run of rsync proved successful!

perhaps this will help you:

http://www.drobospace.com/forums/showthread.php?tid=1507&pid=11991#pid11991