I have a local network with a "server" machine running Windows 7 Pro 64-bit (SMB 2.1). As a matter of fact it's just a 12 yo laptop with a printer/scanner and, two internal and two external HDD hard drives plugged in. It acts mostly as a printer/file server/media server.
I've recently installed on it the latest version of cygwin64(that would accept Win7 as its host...) with openssh-server. My idea was to backup stuff from my newer Win 10 laptop to the second internal hard drive on this machine.
I've looked up for Windows-based rsync software with support for delta-transfer algorithms, and sure enough, I found a port of rsync that apparently was done using cygwin(an old free version of cwRsync). So far so good, it works, and accepts a flag to enable transfers via SSH.
It's a command line oriented only tool, like its Linux counterpart. Lo and behold, I've found out that it's not quite friendly regarding potential errors, and the fact that rsync.exe must also run on the server (by sshd.exe or sftp.exe), makes the CPU usage on the old machine to spike, keeping it at 50%, sometimes reaching 80%.
Of course, SSH encryption has something to do with it as well. Apparently there's a flag one can pass to the built in ssh client that would lower the security at the same time requiring less CPU to complete the transfers. However, this flag doesn't work with cwRsync... Its internal build of the ssh client doesn't recognize it as a valid flag.
At the same time I was bugged with those shortcomings, I realized something.... I do not edit big files. Yes, I generate some, sometimes, but most of the time, the files I need to backup are small ones. So I figured..... Delta-transfer isn't really of much use to me, that is, if I understood how it works correctly.
Having that figured, I started thinking if I really need a SSH server at all in order to run my backups. As I understood it, FreeFileSync doesn't care much if you are backuping to an USB storage device, a SMB/CIFS share, or over SSH under SFTP.
Should I get rid of that SSH server running under cygwin64 on my Windows 7 Pro "server", and simply share the hard drive and use FreeFileSync under SMB/CIFS?
I'm looking for opinions as well as any experiences you guys may have had that would help to get to the simplest solution, however without compromising safety/reliability.
SFTP vs SMB
- Posts: 2
- Joined: 16 Aug 2023
dongiovanni,
Both SMB and SFTP will get the job done. Personally, I mostly use Open SSH server and SFTP with FFS and Windows. There are two factors in deciding which one is better for you and that is ease of use (convenience) And overall file transfer performance. I use on each of my machines with another program. The Management console by default requires ssh server so I have it running on all windows and Linux computers. It's not a sync backup program like FFS.
Are you trying to decide between cwRsync and FreeFileSync? I until today did not know that cwRsync existed. Thanks. I may do a test install just out of curiosity.
FFS has a very robust GUI, and many more features.
I also use a combination of smb and sftp for connecting to my Windows computers for file access and backups. I also have an Ssh server running on my Android phone to do backups of that as well once a week.
If I were you I would run a couple of tests. Do a decent backup from your local computer to the "server" That has the external drive attached. share the external drive via Windows file sharing and link to it in the client computer that you want to back up.
Then, do the same thing with SFTP. remember, that not every SFTP server or software program is going to give you the same performance so I would test out what you already have installed and if it works fast keep it otherwise I'd switch to Microsoft Open Ssh server. Microsoft Open SSH server for Windows 10/11.
I've tested cygwin64 in the past, but don't use it any more. I much prefer using WSL. the Windows subsystem for Linux. Is a complete installation of Ubuntu Linux on windows. It does not add Linux commands to windows but makes them accessible in a Linux terminal window. I have even installed and run the Linux version of FFS on windows. Google doesn't seem to work Because I don't think it understands how to open up a web browser to authenticate . Yes you can use graphical Linux utilities and programs on windows with the subsystem running. sometimes Linux apps behave better than Windows apps do when dealing with large amounts of data.
I don't have massive amounts of data that I back up on a regular basis so the overall network performance differential between SMB and SFTP does not concern me. You might want to do both and see which one provides faster file transfer for you on your network.
I don't use any third party software like cwRsync or cygwin64. I don't find them necessary as Windows has its own built in version of Open SSH Server. It can be installed as an optional add in in the settings application in both Windows Ten and eleven.
if you want to move forward using FFS, You can ditch all the software that you're running and use Microsoft Opensh server for connectivity.
Here are the Microsoft specific instructions for enabling ssh server in windows.
Microsoft Open SSH server for Windows 10/11
If you are at all interested in encrypting your backups there is a tool that is open source and based on rsync protocol. basically you either mount a drive letter or a file folder in windows and then when you transfer files from a local location to the cloud location which in this case will be your other windows computer the files can get encrypted.
I no longer back up files to cloud storage without encrypting them first. Local external drives I do not encrypt.
The program is called rclone. I use it in combination with FFS when backing up to cloud servers. It's also a command line tool like rsync And can take a few hours of studying syntax. for example, rather than using the FFS SFTP button to connect to remote cloud servers I first connect a drive letter or mount point with rclone (with crypt) enabled. FFS Does the synchronization portion but the other software handles the connection to the cloud drive and the encryption and you don't have to be limited to SFTP you can do this with Google and Microsoft and more than 40 others as well.
Both SMB and SFTP will get the job done. Personally, I mostly use Open SSH server and SFTP with FFS and Windows. There are two factors in deciding which one is better for you and that is ease of use (convenience) And overall file transfer performance. I use on each of my machines with another program. The Management console by default requires ssh server so I have it running on all windows and Linux computers. It's not a sync backup program like FFS.
Are you trying to decide between cwRsync and FreeFileSync? I until today did not know that cwRsync existed. Thanks. I may do a test install just out of curiosity.
FFS has a very robust GUI, and many more features.
I also use a combination of smb and sftp for connecting to my Windows computers for file access and backups. I also have an Ssh server running on my Android phone to do backups of that as well once a week.
If I were you I would run a couple of tests. Do a decent backup from your local computer to the "server" That has the external drive attached. share the external drive via Windows file sharing and link to it in the client computer that you want to back up.
Then, do the same thing with SFTP. remember, that not every SFTP server or software program is going to give you the same performance so I would test out what you already have installed and if it works fast keep it otherwise I'd switch to Microsoft Open Ssh server. Microsoft Open SSH server for Windows 10/11.
I've tested cygwin64 in the past, but don't use it any more. I much prefer using WSL. the Windows subsystem for Linux. Is a complete installation of Ubuntu Linux on windows. It does not add Linux commands to windows but makes them accessible in a Linux terminal window. I have even installed and run the Linux version of FFS on windows. Google doesn't seem to work Because I don't think it understands how to open up a web browser to authenticate . Yes you can use graphical Linux utilities and programs on windows with the subsystem running. sometimes Linux apps behave better than Windows apps do when dealing with large amounts of data.
I don't have massive amounts of data that I back up on a regular basis so the overall network performance differential between SMB and SFTP does not concern me. You might want to do both and see which one provides faster file transfer for you on your network.
I don't use any third party software like cwRsync or cygwin64. I don't find them necessary as Windows has its own built in version of Open SSH Server. It can be installed as an optional add in in the settings application in both Windows Ten and eleven.
if you want to move forward using FFS, You can ditch all the software that you're running and use Microsoft Opensh server for connectivity.
Here are the Microsoft specific instructions for enabling ssh server in windows.
Microsoft Open SSH server for Windows 10/11
If you are at all interested in encrypting your backups there is a tool that is open source and based on rsync protocol. basically you either mount a drive letter or a file folder in windows and then when you transfer files from a local location to the cloud location which in this case will be your other windows computer the files can get encrypted.
I no longer back up files to cloud storage without encrypting them first. Local external drives I do not encrypt.
The program is called rclone. I use it in combination with FFS when backing up to cloud servers. It's also a command line tool like rsync And can take a few hours of studying syntax. for example, rather than using the FFS SFTP button to connect to remote cloud servers I first connect a drive letter or mount point with rclone (with crypt) enabled. FFS Does the synchronization portion but the other software handles the connection to the cloud drive and the encryption and you don't have to be limited to SFTP you can do this with Google and Microsoft and more than 40 others as well.
- Posts: 2
- Joined: 16 Aug 2023
hi LeoW, thanks for the answer.
I was able to make cwRsync work with ssh passing the cipher as a parameter, I just had to upgrade it to the latest version, it brings its own ssh.exe and related libraries..... however (there seems always to be a however!)....
Support for the fastest, though less secure ciphers like arcfour, arcfour128 and aes128-cbc are gone from all OpenSSH-Server implementations since 2015, so the less CPU-intensive cipher available ended up being "aes128-gcm@openssh.com", the test bellow has been working fine:
rsync -rtv -e "ssh -c aes128-gcm@openssh.com" /cygdrive/c/folder/ user@server:/cygdrive/c/Users/user/Desktop/folder/
I have to put up with some 50% CPU usage on the target machine (the "server"), however bandwidth-wise, things are pretty decent, from 4.2 to 9.6 MB/s over wireless 802.11n with fat channel enabled, is not bad at all. The "server" is wired to the Access Point via cable, however, the AP ethernet ports support only 10/100 Mb/s, so I can't go faster than that anyways...
Microsoft Open SSH Server for Windows is available for Windows 7 64-bit, and I did test it before, however, it is quite inflexible compared to what we are used to on Unix. Most tools, like WinSCP (that I was using back in the day) would suffer from some hiccups under it, the same goes for putty. So I had this idea of installing Cygwin64 and use it as a shell for MS OpenSSH Server(coz I can't withstand powershell!! really...!)...
It sounds like a great idea, right? Having bash and all the nice Unix stuff that we love... however... Man... I had only headaches... I tried and tried for a couple of weeks, so I in the end, decided finally to get rid of the MS port and go full cygwin, and I'm pretty happy.
WSL is amazing if you can afford to run it. I don't believe the old laptop (the "server"), with its Dual Core CPU, no SSDs and only 8Gb of RAM would do fine with Windows 10, once WSL isn't available on Windows 7, and even if it was, things would run pretty tight.
"The Management console by default requires ssh server so I have it running on all windows and Linux computers. It's not a sync backup program like FFS." -- I didn't understand what you meant by this, do you mean MMC?? I gave up on Windows Server a long time ago, so I'm really out of touch... However, I'm curious on what you mean here... ;-)
I was able to make cwRsync work with ssh passing the cipher as a parameter, I just had to upgrade it to the latest version, it brings its own ssh.exe and related libraries..... however (there seems always to be a however!)....
Support for the fastest, though less secure ciphers like arcfour, arcfour128 and aes128-cbc are gone from all OpenSSH-Server implementations since 2015, so the less CPU-intensive cipher available ended up being "aes128-gcm@openssh.com", the test bellow has been working fine:
rsync -rtv -e "ssh -c aes128-gcm@openssh.com" /cygdrive/c/folder/ user@server:/cygdrive/c/Users/user/Desktop/folder/
I have to put up with some 50% CPU usage on the target machine (the "server"), however bandwidth-wise, things are pretty decent, from 4.2 to 9.6 MB/s over wireless 802.11n with fat channel enabled, is not bad at all. The "server" is wired to the Access Point via cable, however, the AP ethernet ports support only 10/100 Mb/s, so I can't go faster than that anyways...
Microsoft Open SSH Server for Windows is available for Windows 7 64-bit, and I did test it before, however, it is quite inflexible compared to what we are used to on Unix. Most tools, like WinSCP (that I was using back in the day) would suffer from some hiccups under it, the same goes for putty. So I had this idea of installing Cygwin64 and use it as a shell for MS OpenSSH Server(coz I can't withstand powershell!! really...!)...
It sounds like a great idea, right? Having bash and all the nice Unix stuff that we love... however... Man... I had only headaches... I tried and tried for a couple of weeks, so I in the end, decided finally to get rid of the MS port and go full cygwin, and I'm pretty happy.
WSL is amazing if you can afford to run it. I don't believe the old laptop (the "server"), with its Dual Core CPU, no SSDs and only 8Gb of RAM would do fine with Windows 10, once WSL isn't available on Windows 7, and even if it was, things would run pretty tight.
"The Management console by default requires ssh server so I have it running on all windows and Linux computers. It's not a sync backup program like FFS." -- I didn't understand what you meant by this, do you mean MMC?? I gave up on Windows Server a long time ago, so I'm really out of touch... However, I'm curious on what you mean here... ;-)
-- I didn't understand what you meant by this, do you mean MMC?? I gave up on Windows Server a long time ago, so I'm really out of touch... However, I'm curious on what you mean here... ;-)
I was referring to another software program that I use called Syncthing. The management console on the server only runs locally and requires you to S S H Tunnel into the server in order to access the admin console. I don't use Windows Server.
If you have a good Linux foundation skillset, you Can try another program that I often use in conjunction with FFS. It's called Rclone. I use it primarily to create a Mount Point or a drive letter to a remote cloud service that I can then use FFS to sync the files to. It has its own built in copy and sync feature that is based on the very same rsync software that you are familiar with. it's also a command line only program that runs on windows Linux and Mac and is open source. you create a remote configuration and then copy files to that remote or sync files to that remote depending upon your preference. You might want to give this a try and see if it performs better for you than what you're currently using. Considering that you have been using command line software with tricky command line options it should be something that you can learn easily. It does not require any server software or demons that you would run on your windows 7 machine other than Ssh server.
You might get better CPU utilization as it is an active project with 2023 versions of the code.
One optional nice feature is it has the ability to encrypt data locally before it transmits it to the cloud server so you can keep your files private. It's called client side encryption.
I was referring to another software program that I use called Syncthing. The management console on the server only runs locally and requires you to S S H Tunnel into the server in order to access the admin console. I don't use Windows Server.
If you have a good Linux foundation skillset, you Can try another program that I often use in conjunction with FFS. It's called Rclone. I use it primarily to create a Mount Point or a drive letter to a remote cloud service that I can then use FFS to sync the files to. It has its own built in copy and sync feature that is based on the very same rsync software that you are familiar with. it's also a command line only program that runs on windows Linux and Mac and is open source. you create a remote configuration and then copy files to that remote or sync files to that remote depending upon your preference. You might want to give this a try and see if it performs better for you than what you're currently using. Considering that you have been using command line software with tricky command line options it should be something that you can learn easily. It does not require any server software or demons that you would run on your windows 7 machine other than Ssh server.
You might get better CPU utilization as it is an active project with 2023 versions of the code.
One optional nice feature is it has the ability to encrypt data locally before it transmits it to the cloud server so you can keep your files private. It's called client side encryption.