LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   rsync command problems (https://www.linuxquestions.org/questions/linux-newbie-8/rsync-command-problems-742918/)

krisrae675 07-26-2009 11:11 AM

rsync command problems
 
Hi using rsync within our bluetooth software to control and update a network. We have 14 client servers all building data and sending bluetooth messages and all connected to an enterprise master server on an internal network.
The client servers each have there own IP and need to send obex data reports to the enterprise which also has its own IP. The enterprise then sends data back to the clients like content updates and configuration settings.
Our software currently has the following configuration:

OBEX UPDATE (page)
Data Source rsync://192.168.1.60/ccobex-data/
Sync Options -f :_.rsync-filter --delete-after

RSYNC- FILTER
- /download/**/.lock*
- /download/**/.log*
+ /download
+ /download/**
+ /selfile
+ /selfile/**
+ .rsync-filter
: .rsync-filter
- *

RSYNC CONFIG
uid =nobody
gid =nobody
use chroot =yes
read only =yes
max verbosity =1
timeout =600
transfer logging =yes

[ccobex-data]
path = /var/opt/ccobex
comment = ccobex data files
filter = . /var/opt/ccobex/ .rsync-filter

The data in the ccobex folder contains
selfile,download,obexfilel.log,obexscan.log
At present only the download and selfile is changed but the obexfile.log and obexscan.log does not change.
We really need the file and scan logs to come over also
Can anyone offer any advice as we have been on this an eternity trying to solve

Meson 07-27-2009 09:17 AM

Is this the config file for a wrapper you wrote to rsync? Is there any way you can post the actual rsync command that is run?

micxz 07-27-2009 01:54 PM

is there possibly a filter excluding the logs in ccobex folder in .rsync-filter?

krisrae675 07-28-2009 04:08 AM

Quote:

Originally Posted by micxz (Post 3622031)
is there possibly a filter excluding the logs in ccobex folder in .rsync-filter?


There is a .rsync-filter in ccobex but that is the filter listed above

krisrae675 07-28-2009 04:09 AM

Quote:

Originally Posted by micxz (Post 3622031)
is there possibly a filter excluding the logs in ccobex folder in .rsync-filter?

There is a .rsync-filter in ccobex but that is the filter listed above

krisrae675 07-28-2009 04:13 AM

Quote:

Originally Posted by Meson (Post 3621685)
Is this the config file for a wrapper you wrote to rsync? Is there any way you can post the actual rsync command that is run?

Sorry not quite sure what you mean the rsync command is listed above is that the command you mean

micxz 07-28-2009 12:51 PM

Code:

+ /download
+ /selfile

Seems like this is matching the download file and the selfile. But this part:
Code:

- *
Doesn't this match everything else. Excluding the logs you want.

Meson 07-28-2009 02:49 PM

Quote:

Originally Posted by krisrae675 (Post 3622691)
Sorry not quite sure what you mean the rsync command is listed above is that the command you mean

What I mean is that it looks like what you posted is just a configuration file. So my guess is that you have some program that parses the configuration file and turns it into a single rsync command. I was hoping you could post that command.

micxz 07-28-2009 03:11 PM

Quote:

Originally Posted by Meson (Post 3623376)
What I mean is that it looks like what you posted is just a configuration file. So my guess is that you have some program that parses the configuration file and turns it into a single rsync command. I was hoping you could post that command.

He posted the source and the options and the filter stated in the options. The exact command can be built from that something like:

rsync -f .rsync-filter --delete-after rsync://192.168.1.60/ccobex-data/ destination/

Meson 07-28-2009 07:58 PM

Quote:

Originally Posted by micxz (Post 3623394)
He posted the source and the options and the filter stated in the options. The exact command can be built from that something like:

rsync -f .rsync-filter --delete-after rsync://192.168.1.60/ccobex-data/ destination/

I don't like to make assumptions =)

micxz 07-28-2009 08:00 PM

good point'

krisrae675 07-29-2009 09:24 AM

Quote:

Originally Posted by micxz (Post 3623634)
good point'

Hi Guys
I tried the command
rsync -f .rsync-filter --delete-after rsync://192.168.1.60/ccobex-data/ destination/
in data source but did not like the command and did not work.

Do you have any further ideas on this i could try please ask if you require me to send any further settings
thanks
chris

micxz 07-29-2009 07:20 PM

Woops' you were right meson he is on a different page.

krisrae675:
I was guessing above at what command you were trying I was not suggesting you use the above command I should have explained myself better. Please post the command you where trying.
If you have ssh I would suggest you setup keys for logins and use the command:
Code:

rsync -ave ssh --delete user@192.168.1.60:/path/to/ccobex-data/ /path/to/destination/
(maybe skip to --delete flag until you know it's working. delete flag will remove files on the destination side that are missing from the src) This is done from the destination computer. If you are on the 192.168.1.60 machine you would use:
Code:

rsync -ave ssh --delete /path/to/ccobex-data/ user@192.168.1.xx:/path/to/destination/
Where xx is your IP or destination IP.

And of course add your filter with the -f flag.

krisrae675 07-30-2009 02:33 AM

Quote:

Originally Posted by micxz (Post 3624865)
Woops' you were right meson he is on a different page.

krisrae675:
I was guessing above at what command you were trying I was not suggesting you use the above command I should have explained myself better. Please post the command you where trying.
If you have ssh I would suggest you setup keys for logins and use the command:
Code:

rsync -ave ssh --delete user@192.168.1.60:/path/to/ccobex-data/ /path/to/destination/
(maybe skip to --delete flag until you know it's working. delete flag will remove files on the destination side that are missing from the src) This is done from the destination computer. If you are on the 192.168.1.60 machine you would use:
Code:

rsync -ave ssh --delete /path/to/ccobex-data/ user@192.168.1.xx:/path/to/destination/
Where xx is your IP or destination IP.

And of course add your filter with the -f flag.

Hi Thanks for your reply again !
I did try the command you originally posted i did change the paths to the correct ones
Regarding the command I was using to run rsync it was
rsync://192.168.1.60/ccobex-data/

micxz 07-30-2009 08:16 AM

And what was the result?


All times are GMT -5. The time now is 11:05 AM.