Jump to content

38 posts in this topic Last Reply

Recommended Posts

Hi.

I'm either blind or just can't find any info on setting up rsync between unraid and windows xp.

Keep in mind that I'm complete noob when it come to Linux.

Any info highly appreciated.

Thanks.

Share this post


Link to post

I tried this many moons ago and it was a PAIN to find a suitable Windows rsync solution.

 

I'll look around and see what I can find.

Share this post


Link to post

Thanks for replying.

I've tried Deltacopy with freenas server and it works fine.

My problem is I do not know how to configure rsync on unraid system.

Freenas has a nice graphical interface so for some one like me who knows squat about linux

it was easy to configure.

Did anybody ever written a guide how to do rsync on unraid?

Thanks.

Share this post


Link to post

What are you trying to do with rsync on the unraid system?

 

Here's an example of my /etc/rsyncd.conf file

it gets put in place from /boot/custom/etc/rsyncd.conf to /etc/rsyncd.conf

 

uid             = root
gid             = root
use chroot      = no
max connections = 4
pid file        = /var/run/rsyncd.pid
timeout         = 600

[backups]
    path = /mnt/user/backups
    comment = Backups
    read only = FALSE

[vmware]
    path = /mnt/user/backups/vmware
    comment = VMWare Backups
    read only = FALSE

[music]
    path = /mnt/user/music
    comment = Music
    read only = FALSE

[pub]
    path = /mnt/user/pub
    comment = Public Files
    read only = FALSE

[boot]
    path = /boot
    comment = /boot files
    read only = FALSE

[mnt]
    path = /mnt
    comment = /mnt files
    read only = FALSE

[Videos]
    path = /mnt/user/Videos
    comment = VIDEOS
    read only = FALSE

[bittorrent]
    path = /mnt/user/bittorrent
    comment = BITTORRENT
    read only = FALSE

 

 

Here is a script I use to update /etc/inetd.conf so that it runs rsync when an rsync connection comes in.

 

It goes in /boot/custom/etc/rc.d/S20-init.rsyncd

The call it from your /boot/config/go script.

 

 

 

#!/bin/bash

if ! grep ^rsync /etc/inetd.conf > /dev/null ; then 
cat <<-EOF >> /etc/inetd.conf
rsync   stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/bin/rsync --daemon 
EOF
read PID < /var/run/inetd.pid
kill -1 ${PID}
fi

Share this post


Link to post

Hi.

Sorry for  late reply.

I would like to run rsync server on unraid system so I can run rsync clients to do backups to unraid.

So :

1.Do I create file "rsyncd.conf"  similar to yours and place it in /etc/rsyncd.conf

2.Create a file "S20-init.rsyncd" looking like this :

#!/bin/bash

 

if ! grep ^rsync /etc/inetd.conf > /dev/null ; then

cat <<-EOF >> /etc/inetd.conf

rsync  stream  tcp    nowait  root    /usr/sbin/tcpd  /usr/bin/rsync --daemon

EOF

read PID < /var/run/inetd.pid

kill -1 ${PID}

fi

and plce it in /boot/custom/etc/rc.d/

3.What do you mean call it from /boot/config/go script

Excuse my ignorance but linux is something completely new to me.

Thanks

 

 

Share this post


Link to post

>> 1. Do I create file "rsyncd.conf"  similar to yours and place it in /etc/rsyncd.conf

 

Yes, but you will also need to copy and save this file somewhere on your flash drive.

We recommend /boot/custom/etc.

So you should have /etc/rsyncd.conf and /boot/custom/etc/rsyncd.conf

which should be the same.

 

2 .Create a file "S20-init.rsyncd" looking like thi

Yes. Create it as /boot/custom/etc/rc.d/S20-init.rsyncd

 

#!/bin/bash

if ! grep ^rsync /etc/inetd.conf > /dev/null ; then
cat <<-EOF >> /etc/inetd.conf
rsync   stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/bin/rsync --daemon
EOF
read PID < /var/run/inetd.pid
kill -1 ${PID}
fi

cp /boot/custom/etc/rsyncd.conf /etc/rsyncd.conf

 

Notice the last line which copies the saved version of rsyncd.conf to the /etc directory.

 

>> 3.What do you mean call it from /boot/config/go script

 

THere is a script in the /boot/config directory called "go"

Modify this script with your editor.

Add the following line at the end of it to call S20-init.rsyncd

 

/boot/custom/etc/rc.d/S20-init.rsyncd

 

Share this post


Link to post

Hi.

Thanks for quick reply.

I'm still missing something.

Here is my rsyncd.config file

gid = root 
uid = root 
use chroot = 4 
max connections = 4 
pid file = /var/run/rsyncd.pid 
timeout = 600

[backup]  
path = /mnt/disk1/Backup 
comment = Backup 
read only = FALSE  
list = yes

and her is my go file:

#!/bin/bash
# Start the Management Utility
/usr/local/sbin/emhttp &
/boot/init-powerdown
ethtool -s eth0 wol g
/boot/custom/etc/rc.d/S20-init.rsyncd

but my rsync client does not communicate with rsync on unraid.

I'm using unraid 4.3.1 is rsync build in or do I have to install it?

Thanks

Share this post


Link to post

A link to this thread has been added to the Best of the Forums (see link in my sig).  Thanks to Tibbar and WeeboTech for providing a great "How To" that will benefit many other users!

 

We now return to the regularly scheduled thread ...

Share this post


Link to post

User error :)

I've mistyped a host name.

Now I have established a connection in DeltaCopy client with rsync on "UNRAID" but for "Virtual directory name"

I'm getting weird stuff like a text of a readme file.

Any ideas?

Share this post


Link to post

I've no experience with Deltacopy.

I know when using rsync it has a URI type interface as in

 

rsync://hostname/myshare/filename

 

myshare is the block defined as

 

[myshare]

path = /mnt/disk1/myshare

comment = Backup

read only = FALSE 

list = yes

 

Share this post


Link to post

Hi.

What I mean by "Virtual directory name" is when I click the button to "Fetch virtual directories from the remote server" I thought I suppose to get a "backup"

but 'm getting a text that looks like an rsync readme file.

Thanks

 

Share this post


Link to post

I've noticed something else.

>> 1. Do I create file "rsyncd.conf"  similar to yours and place it in /etc/rsyncd.conf

 

Yes, but you will also need to copy and save this file somewhere on your flash drive.

We recommend /boot/custom/etc

Do both locations of rsyncd.conf  suppose to be on flash :

/etc/rsyncd.conf

/boot/custom/etc/rsyncd.conf

because that is what I have.

It seams that rsync is ignoring my rsyncd.conf .

Share this post


Link to post

>> Do both locations of rsyncd.conf  suppose to be on flash :

 

no /etc is on the root filesystem

/boot/custom/etc is on the flash.

 

if you edit the file in /etc then that's where it will exist.

if you edit it in /boot/custom/etc. that's where it will exist.

 

Perhaps better to edit as /boot/custom/etc/rsyncd.conf

then cp /boot/custom/etc/rsyncd.conf /etc/rsyncd.conf

 

Where and how are you doing the edit?

Are you telneting in and editing with vi or doing it via windows?

Share this post


Link to post

I'm telneting with putty and then use mc.

My rsyncd.conf file exists in both locations:

/boot/custom/etc

/etc

To begin with I used mc within putty but I did not know how to create a new file so i just opened some file and edited it to look like rsyncd.conf and saved it as rsyncd.conf, was that OK?

Share this post


Link to post

What is a rsyncd.pid file.

When I look inside /var/run

that file does not exist.

Share this post


Link to post

Hi.

Me again :)

Am I supposed to make any entry to

/etc/inetd.conf file ?

Share this post


Link to post

>> Am I supposed to make any entry to /etc/inetd.conf file ?

 

The script S20-init.rsyncd does that for you. (or you could do it manually)

 

>> What is a rsyncd.pid file.

It's a semaphore file to signal the daemon is running. It will contact the active pid when rsync is running in daemon mode from inetd.

it will only be there when you have an active rsync running.

 

 

>> i just opened some file and edited it to look like rsyncd.conf and saved it as rsyncd.conf, was that OK?

As long as it was saved as rsyncd.conf, that is fine.

Share this post


Link to post

Hi.

Weebotech thanks for all the help and patience.

Well I do not know what to do next.

An error message I get from Deltacopy client is:

Executing: rsync.exe  -v -rlt -z --delete "/cygdrive/D/MKV/" "/tower::backup/MKV/"
building file list ... 
done
rsync: mkdir "/tower::backup/MKV" failed: No such file or directory (2)
rsync error: error in file IO (code 11) at /home/lapo/packaging/tmp/rsync-2.6.6/main.c(422)
rsync: connection unexpectedly closed (8 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at /home/lapo/packaging/tmp/rsync-2.6.6/io.c(434)
Error in rsync protocol data stream
Rsync.exe returned an error. Will try again. This is retry number 1 of 5

My rsyncd.conf file has an entry like:

[backup]  
path = /mnt/disk1/Backup 
comment = Backup 
read only = FALSE 

I've created a directory called "Backup" on disk1 and I'm trying to backup directory called MKV with Deltacopy client on Windows XP

machine.

Any ideas what to do next?

Thanks.

 

Share this post


Link to post

WeeboTech will probably be here soon with the more expert answer, and I haven't actually used rsync (!), but apart from that, wouldn't you want to use the UNC paths here?

//tower/disk1/Backup/MKV

Or if you have set up a User Share for Backup, then

//tower/Backup/MKV

Share this post


Link to post

I do not define these paths.

The way I understand it. I define the paths to the target directory with

rsyncd.conf file and then deltacopy client fetches it from the server by the

name whatever you call it ex. "myshare"

[myshare]
path = /mnt/disk1/myshare
comment = Backup 
read only = FALSE  
list = yes

but in my case communication with rsync server works but I can not fetch "myshare".

Then again I might be wrong :)

 

Share this post


Link to post

WeeboTech will probably be here soon with the more expert answer, and I haven't actually used rsync (!), but apart from that, wouldn't you want to use the UNC paths here?

//tower/disk1/Backup/MKV

Or if you have set up a User Share for Backup, then

//tower/Backup/MKV

 

Proper syntax is

 

rsync://hostname/myshare/filename

 

Where Hostname is the destination Host (like http)

Where myshare is the section defined in the /etc/rsyncd.conf file as in [myshare]

Everything after myshare/ refers the the location appended to the path = /mnt/disk1/myshare

 

So If I had a section called /mnt

 

[mnt]

path = /mnt

 

Then you could do a

 

rsync file... rsync://Tower/mnt/disk1/somedirectory/

Share this post


Link to post

I do not define these paths.

The way I understand it. I define the paths to the target directory with

rsyncd.conf file and then deltacopy client fetches it from the server by the

name whatever you call it ex. "myshare"

[myshare]
path = /mnt/disk1/myshare
comment = Backup 
read only = FALSE  
list = yes

but in my case communication with rsync server works but I can not fetch "myshare".

Then again I might be wrong :)

 

 

On your Tower server type  rsync://Tower

Where Tower is equal to your real hostname.

 

On mine it is as follows

 

root@Atlas:/mnt/disk2/bittorrent# rsync rsync://Atlas

backups        Backups

vmware          VMWare Backups

music          Music

pub            Public Files

boot            /boot files

mnt            /mnt files

Videos          VIDEOS

bittorrent      BITTORRENT

Share this post


Link to post

When I type at commend prompt on a server

rsync://Tower

I get a message:

-bash: rsync://Tower: No such file or directory

Tower is my UNRAID server name

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now