September 4, 2009

Need to write a script in a way that all the files in linux should be copied to windows machine

simple file transfer from one Linux server to a windows file server. Need to be implemented using shell scripts. Some point for you to ponder around.

Authentication mechanism for Linux and Windows machine

Type of files and how frequently they will be modified

How to differentiate between the new files and old files for next transfer cycle

How the files will be deleted in the source location

Log file formats for each run

I would high recommend looking at using rsync because of it's ability to keep...

I would high recommend looking at using rsync because of it's ability to keep the files synchronized, to make this work you will need to install rsync on the windows system using cygwin as outlined at http://www.gaztronics.net/rsync.php

Like  (0 likes)

Take a look at these two solutions:- SSHDUse an sshd server under windows ...

Take a look at these two solutions:
- SSHD
Use an sshd server under windows (Cygwin does it fine), exchange ssh keys between two hosts and simple copy files or dirs by using scp commands

- RSYNCD
As well as sshd you can install an RSYNC server daemon, there are a lot of them (free/opensource/shareware/commercial/...). I prefer Cygwin builds in this case also.
And use RSYNC for dir sync, it works without headaches and it's very powerful

From these two solution my first bet is RSYNC, it's even portable and cross platform so you can swap your win machine with the operating system of your choice

Like  (0 likes)

Having a look on the nature of your question, I would recommend you to have a...

Having a look on the nature of your question, I would recommend you to have a look on RSYNC. This is a file synchronization tool, which will handle the issue of copying only changed files.
You can mount the windows partitions (using smbmount/mount -t smbfs) and use rsync from your script in order to keep synchronized the contents of your Linux folders and mounted windows folders. Rsync also provides you with incremental backup facility.

Like  (0 likes)

The most natural simple answer for you is use nfs.Here are two links that you...

The most natural simple answer for you is use nfs.
Here are two links that you can read to understand how to use nfs to share files :
http://support.microsoft.com/kb/324089
http://nfs.sourceforge.net/nfs-howto/
Once you have nfs set up, your shell script can be as trivial as :
cp -r /home/anil/shared/somefolder /mnt/nfs/windows/shared/somefolder

Doing anything more complex than that; such as checksumming or logging will only depend on your shell scripting skills.

You could use rsync instead of nfs :
http://www.samba.org/rsync/
but if you want the solution that ticks all of your boxes (If your data isn't sensitive, like private information, phone numbers, etc) It's git :
http://git-scm.com/
easy to learn, easy to use, can be scripted, has user interfaces, logs as much as you want, stores everything using hashes to ensure data integrity and much more.
If your data is sensitive then maybe use nfs or rsync along with strong passwords instead of git.

There are actually multiple ways to do what you want to do and little short of actually writing the script for you, I'm sure one of the afore mentioned options will suit.

Like  (0 likes)
Click Here!