LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   rsync between windows and linux (https://www.linuxquestions.org/questions/linux-newbie-8/rsync-between-windows-and-linux-4175538524/)

suicidaleggroll 04-04-2015 08:39 AM

Quote:

Originally Posted by aavika (Post 5342345)
thnks for rply..
yeah its good... but cron is for linux/unix. not for windows.
what should i do for windows? i mean rsync from windows command prompt
thats y i installed cygwin.. but get solution yet.. tried many times.
Is there any way rsync or copy data from windows to linux through cygwin??

cygwin has cron too

aavika 04-05-2015 05:47 AM

yeah it can be possible through task schedular . i tested there is an option on windows to run .exe files.
nw i have to create .exe files for rsync through cygwin. how to make .exe files.. m confused..:(

yup virtual machine is a gud idea but i cant use dat.. dont have permission actually.
if u dont have any problem... or if u have any idea to create .exe file and where to run, then let me knw plzz.. its urgent

aavika 04-05-2015 05:51 AM

i am sharing some links about that.

http://sourceforge.net/projects/back...syncd/3.0.9.0/
https://cygwin.com/ml/cygwin/2014-10/msg00347.html

suicidaleggroll 04-05-2015 09:17 AM

As I said before...

cygwin
has
cron
too

You don't need task scheduler, you don't need to create arbitrary .exe files, you don't need to do any of that
Install cron on cygwin, get it running as a service, and then use crontab -e to add a scheduled command or script like you would on any Linux system.

http://stackoverflow.com/questions/7...win-on-windows

aavika 04-05-2015 10:50 AM

hey , i got it..
thank you .. thank u so much...:) cron is workin properly

now i have to create .exe file

JeremyBoden 04-05-2015 01:23 PM

Why?

BenCollver 04-05-2015 03:32 PM

The last time I needed rsync on Windows, it seemed that Cygwin and related ports were too invasive. I ended up using WinSCP's scripting feature and the synchronize command. It used more bandwidth than rsync, but it was easy, reliable, and stable.

aavika 04-06-2015 01:52 AM

rsync should run as a service in windows, should be run on background automatically through cygwin.
i have WinSCP but have to do without..

is there any way to edit or read .exe file? so that i can run rsync.exe accordingly from cygwin. If its not possible then have to create file which vil run under cygwin

JJJCR 04-06-2015 02:43 AM

Quote:

Originally Posted by aavika (Post 5341409)
thnk u all... JeremyBoden, pan64, veerain

i want to copy my data ( C or D drive) from windows client to linux server, nd run rsync from windows only.
Currently am using cygwin software which is installed on windows.
Actually want to run rsync silently or quietly.. is this possible??

have you tried WinSCP?

You can just drag and drop to copy files between Linux and Windows.

http://winscp.net/eng/download.php

I'm not sure though whether rsync will be faster than WinSCP in terms of speed, but WinSCP is handy if you want to copy small files.

aavika 04-06-2015 03:19 AM

thank u for the reply
sory for the inconvience
yeah i know.. can be possible via WinSCP
but i cannot use that because i have an order to use cygwin only.
and automatically rsync run via cygwin in background process without showing gui. so that at the time of rsyncing noone shld knows, we r using cygwin.
cygwin is a software used to run linux commands from windows.

i searched a lottt... found some links, related to this..
https://cygwin.com/ml/cygwin/2003-02/msg01577.html
http://www.evbackup.com/support-rsyn...ng-automation/
i realised, making a shell script file may b easier.

how to do? anyone knws plzz let me know

suicidaleggroll 04-06-2015 10:05 AM

Quote:

Originally Posted by aavika (Post 5343154)
i searched a lottt... found some links, related to this..
https://cygwin.com/ml/cygwin/2003-02/msg01577.html
http://www.evbackup.com/support-rsyn...ng-automation/
i realised, making a shell script file may b easier.

how to do? anyone knws plzz let me know

Stick your command in a file, give it execute permissions, and then run that file from cron. Or if you want, just run the rsync command directly from cron.

Once you have the crontab installed and running, you can IGNORE that you're using cygwin at all. Just look for any Linux rsync/cron guide online and follow it.

aavika 04-07-2015 01:22 AM

thnk u..

for rsync, what should i write in a file? is it ok if i write command:
rsync -av "/cygdrive/c/vjtest" "root@192.168.1.149:/home/vbox/2012/"

? only.. or i have to write some other commmands too..
i created a file in .sh format. is it ok??

pan64 04-07-2015 01:42 AM

.sh is not a format, but an extension. Linux and cygwin does not really care about that, it is used by humans to recognize file types easier (Windows uses extension). So using .sh is ok, that is the usual way.
You need to check the rsync command yourself if that works as expected. You will need to write the same command into your script/file (as it was tested in a cygwin windows).

aavika 04-07-2015 01:50 AM

yeah extension..:P
that rsync command is working properly. checked 2-3 times in cygwin terminal

i am writing only: rsync -av "/cygdrive/c/vjtest" "root@192.168.1.149:/home/vbox/2012/"

in backup.sh file which is located in C:\backup.sh

is it okay???

pan64 04-07-2015 01:54 AM

from my side yes. You need to make that script executable (chmod +x <script>) and you can test it too. I suggest you to put it into another directory, inside the cygwin structure, but it should work in that dir too.


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