LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   windows workstation back through rsync to linux server (https://www.linuxquestions.org/questions/linux-server-73/windows-workstation-back-through-rsync-to-linux-server-592952/)

tsaravan 10-19-2007 03:54 AM

windows workstation back through rsync to linux server
 
Hi,

I have configured one of the windows worstations for backup through rsync onto linux Server. Now i am planning to configure all the users on our local area network for backup through rsync onto linux server by running batch file on each system from the Logon / Logoff features of the Group Policy (Win2k/XP) by running gpedit.msc. In this regard, is there a way to backup in series i.e., one after the other.

regards,

T. Saravana

gerben12 10-21-2007 10:08 AM

Yes you can:

You wil need a list of your pc's, or hostnames of your pc's like so:

windowshosts="pc1 pc2 pc3 etc etc"

Then try:

for host in $windowshosts
do
rsync $host:/this_and_that_directory
done


Where of course the rsync command would be you own rsync command, or however you make the connection.

This will rsync the files on your windowshost to linux, in the order specified in the windowshost variable, for every host defined there.



Gerben12

tsaravan 10-21-2007 11:33 PM

Quote:

Originally Posted by gerben12 (Post 2931633)
Yes you can:

You wil need a list of your pc's, or hostnames of your pc's like so:

windowshosts="pc1 pc2 pc3 etc etc"

Then try:

for host in $windowshosts
do
rsync $host:/this_and_that_directory
done


Where of course the rsync command would be you own rsync command, or however you make the connection.

This will rsync the files on your windowshost to linux, in the order specified in the windowshost variable, for every host defined there.



Gerben12

Dear Mr. Gerben,

Thank you for your reply.

I could understand your reply but i do not know how to implement in dos batch file. The following is the dos batch file used to backup:

@cls
@echo off
rem Rsync job control file
c:\cygwin\bin\rsync -vrtz --password-file=c:\cygwin\secret --delete /cygdrive/c/pfimp tsaravan@192.168.0.1::modulename


In the above scenario how will i implement your solution.

regards,

T. Saravana.

gerben12 10-22-2007 04:08 AM

Well,

If you start the batch file from DOS, then you might want to try an rsh command. Which the newer windows versions will understand (check your dos for the rsh command)

Even though it is not secure it will work:
Enable access for rsh from your windows to your linux.

And then exectuce the commands from before with rsh:

rsh tsarava "for host in $windowshosts
do
rsync $host:/this_and_that_directory
done "


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