Copy files from Linux to Windows?
Page 1 of 1

Author:  Flm [ Tue May 15, 2007 4:10 am ]
Post subject:  Copy files from Linux to Windows?


I'm in pain here.... sort of.

I need to create a script which can copy files/dirs from a Debian box to a Windows box. I'm not sure if rsync can be used in this setup?

The script should be able to:
-Copy files and directories to windows. (as is) .. not compressed. The filenames might have spaces, sry.
-Copy only changed or new files, on a regular basis (cron).
-Maintain the original timestamps.
-Maybe throw a log-file to windows.
-Not eat up all the resources on the Debian box, like cpu power etc.

I'm not interested in changing anything on the Debian box, because it's not mine, so a script would be perfect for this purpose.
I can change or modify the Windows box as I like. What is the best protocol to use here.. ftp, smb?

The current size of the files are 1.5GB and growing slowly.

The file structure which needs to be copied (eg):


I could really need an advice here, maybe a script which I can use/modify.

Thank you for your time, and for this forum.


PS. I have just read a book about bash scripting.. but I will need to spend more time on this, I'm learning as I go on.

Author:  Flm [ Tue May 15, 2007 5:25 am ]
Post subject: 

There has been some changes in the setup.

Actually what I need now, is a way to connect to a web api on the windows box, so I don't need to use FTP or similar.

Here is a small description of how to hook up to the webservice in C#:
One point with the Web API is that it can be accessed across platforms etc. Below small fragments how hook up to a web services in C#. Assume the name of your web server is MyWebSite, and that the web place ISEAPI contains files of the web service. Then you may think of MyWebSite.ISEAPI as a proxy for the web service. You may create a proxy object using the default constructor, and just access the API as if is implemented as a local object next to you. See below for some code fragments:
MyWebSite.ISEAPI MyService;
MyService = new MyWebSite.ISEAPI();
//Assigning DefaultCredentials to the Credentials property
//of the Web service client proxy (myProxy).
MyService.Credentials = System.Net.CredentialCache.DefaultCredentials;
MyService.AddDocument("uri", "title", "content", DateTime.Now, DateTime.Now, "test", null, null, "localhost", 8085);
Is that possible?

To sum it up.. The script should do as described in the prev. post, but connect to the API instead.

Right now I'm a little tired, my mind is on overload, but if someone can point me in the right direction I would be very very grateful.


Author:  crouse [ Tue May 15, 2007 10:39 am ]
Post subject: 

Hmmmmmm I'll watch this one with some interest, as I've never tried to work on a windows machine ..... should be interesting.

Sorry I'm not any help.
Welcome to though. I'll PM a couple people about your post.

Author:  jeo [ Tue May 15, 2007 4:15 pm ]
Post subject: 

Hmm... I wouldn't even know where to begin with that web api, but then again I fear c# =P

Have you looked at Unison?

Author:  barrylinuxadmin [ Wed May 16, 2007 1:46 pm ]
Post subject: 

I have dealt with this type of setup before, but instead of a WEBapi, I opted for a CYGWIN/Bash interface on my Windows machines. This allowed for bash execution, and exchanging of SSH keys which allowed for RSYNC to work perfectly. I can assist with the setup, and if the CYGWIN solution does not suit you, you can opt for a UWIN solution. What these do is offer a *nix like environment on the windows box, while maintening the integrity.

Please let me know if you would like more information regarding a solution like this, and I am more than happy to help

Page 1 of 1 All times are UTC - 6 hours
© 2000, 2002, 2005, 2007 phpBB Group •