LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-10-2021, 06:44 AM   #1
Zezan
LQ Newbie
 
Registered: May 2018
Posts: 7

Rep: Reputation: Disabled
Problem with rsync linux and windows


I have a web server on local linux server with debian 10. And I want to backup files daily into my computer with windows 10 on C:\Users\IT\muziejus location. I enable openssh in my computer and I can connect to pc via ssh without anny problems.
https://i.ibb.co/w6XtwY7/image.png <---- Type password to make connection
https://i.ibb.co/S3wTNTb/image.png connected successfully to computer
But when I try to synchronise web server files to computer I got this error.
https://i.ibb.co/JdQCcQt/image.png
I got error:
Code:
'rsync' is not recognized as an internal or external command,
operable program or batch file.
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(235) [sender=3.1.3]
I type this comand sudo rsync -avr /var/www/html/ it@192.168.2.52:C:\Users\IT\muziejus maybe its some syntax error or problem with folder path ?
 
Old 02-10-2021, 08:39 AM   #2
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,674

Rep: Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712
rsync is a native GNU level command (once installed) under Linux. (With a couple of odd distribution exceptions). Rsync is not native on Windows. If you have an rsync client on windows you can leverage it to do the transfer form the windows side. It should be possible to properly install rsync on windows to allow the connection, but I have never done that, and never WANTED to do that.

In any case rsync is a WONDERFUL sync tool and can be leveraged to be PART of a backup plan, but not a real backup application. If you data matters at all, get a real backup and recovery tool. I suggest one that is somewhat OS agnostic, so it runs on both Windows and Linux equally well (withing the constraints of the MS OS of course). I like BURP running on Linux, it has clients for MAMNY operating systems including all unix like and Microsoft, but I use a separate server for that. You are backup up a server to a more vulnerable desktop, which is not the normal situation.

Have you considered a cheap or repurposed machine to act as your backup server?
 
Old 02-10-2021, 09:15 AM   #3
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170

Rep: Reputation: 244Reputation: 244Reputation: 244
As has been mentioned rsync is not installed on windows you need to install it.

https://rsync.samba.org/download.html
 
Old 02-11-2021, 01:12 AM   #4
Zezan
LQ Newbie
 
Registered: May 2018
Posts: 7

Original Poster
Rep: Reputation: Disabled
I just want to have files in computer in case if something goes wrong with server hdd. I can reach web page files by smb. So I write this Batch file for windows xcopy \\192.168.1.76\html\ D:\Muziejus /s /d and add in to windows task scheduler. The main thing I just want to copy files those are modified. In future i will buy external hard drive and make buckup with rsync to this storage also, directly form remote server. And one question about xcopy it is possible to make delete files if they are deleted in my server ? Now with this comand when i turn on my computer I added to shell:startup folder:
Quote:
xcopy \\192.168.1.76\html\ D:\Muziejus /s
With this bath if I edit some html file or add new photo I get these changes in my computer, however when i delete some photo in server that file still stay in computer, what I want if is possible that when I deleted file from my server this file would be deleted form computer either.

Last edited by Zezan; 02-11-2021 at 02:49 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Rsync (Remote Sync) – Rsync Command Examples and Usage LXer Syndicated Linux News 0 09-26-2019 12:36 AM
how to get rsync status and how to make prioritize rsync jobs? rayalab Linux - Newbie 2 07-24-2015 05:26 AM
LXer: Backup with rsync and rsync.net LXer Syndicated Linux News 0 09-14-2010 04:20 PM
Rsync server vs rsync over ssh humbletech99 Linux - Networking 1 10-18-2006 12:10 PM
Windows Rsync Upload to Linux Rsync - permissions inspleak Linux - Software 0 10-12-2004 02:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:38 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration