4

Up until now ive been using FTP to connect to the server and copy the files to my local machine but the directory has grown 3gb in the past few weeks and it usually takes 40mins to copy 100mb so FTP is no longer an option for this.

What is the quickest way to transfer a directory with all sub direcctories from a remote linux server to a local windows 7 machine. I have ssh and root access to the server

Answer I followed the guide of the top answer and it worked great. I made sure rsync was installed on the server then installed rsync for cygwin. i then used the command to sync the contents of apaches www folder to my c drive on windows 7

6 Answers 6

6

my choice has been installing cygwin with rsync/ssh and run rsync command.

Also in my case i have enabled cronjob with cygwin and run those sync overnight/weekend, where i backup otherway i.e. windows server data to linux.

3
  • +1 - Run an rsync server on the Linux side, and use an rsync client on the Windows side. You'll see dramatic speed improvement and less data transferred. Jul 5, 2014 at 15:20
  • So will this work a bit like a cvs checkout where it will only sync the changes? I want to backup apaches www folder and nothing more. ideally i would like to sync the www folder from the server and copy the contents to my localhost wamp www folder so i can locally edit files then sync them back up but for now the major problem is i dont have a backup at all, and i badly need to have one Jul 6, 2014 at 12:17
  • That's Beauty of rsync :)
    – tike
    Jul 6, 2014 at 12:19
3

I would create a CIFS share on Windows and mount it on the Linux server.

You could then use rsync or something like rsnapshot.

1
  • If you're not running an rsync server on the remote end and just running rsync over a CIFS mount then you're still transferring all of the data. Jul 5, 2014 at 15:19
2

It depends for a large part on whether or not you want/need to download a full copy of your data as as one-off snapshots; or if your needs can be met with a solution that allows you to download the changes/delta's incrementally.

If you do need a full copy each time you download the data; you might benefit greatly from creating a single compressed archive on the server first and downloading that instead of recursively downloading directories and their contents.
Archives created with zip on the Linux server are natively supported on most recent Windows versions as far as I'm aware. Alternate compression algorithms may result in better compression ratio's. Even if data is already compressed natively (such as with most audio and video codecs) partly negating that benefit, a single archive is still more efficient to download then many individual files.

Anything that will allow you to just download new and modified files will save a lot of transfer time (although with large numbers of (very small) files generating and comparing file list can be time consuming too). I have seen FTP clients that have a mirror option that only transfers the delta's, making for a minimal change in your current scheme.

rsync is the default protocol and mostly used tool in much of the UNIX world for keeping two locations synchronised and mirrored by only transferring the delta's, the files that have changed, created or deleted. As an older protocol it doesn't have native encryption and transmits data and credentials in cleartext, which is why you'll see it tunnelled over SSH in most cases. Windows clients that do rsync (over SSH) exist.

Specific product recommendations remain off-topic.

0

rsnapshot is a great tool for multiple snapshots, it only copies the files that have changed and it has a feature to hardlink the files already on disk, so each folder is a complete copy of the server. Not sure it can do hardlinks in Windows, but you could always install a virtualbox with a linux system on it.

Also many hosters offer to burn a DVD with your data and send it to you, for a fee, so you don't need to waste bandwidth if that is a problem.

0

you can also install and configure samba on your linux host and use robocopy from your windows host to get the files. You do not need to join the linux host to the windows domain, you can use it in workgroup mode.

0

Share the Linux folders on an SMB share, download Microsoft Richcopy.

http://blogs.technet.com/b/ken/archive/2009/06/10/build-4-0-216-has-been-posted-to-the-microsoft-download-center.aspx

What you'll find most striking the first time you take RichCopy out for a spin is that it's a multithreaded copying tool. That means that rather than copying one file at a time in serial order, RichCopy can open multiple threads simultaneously, allowing many files to be copied in parallel and cutting the total time required to complete the operation several times over. You can also pause and resume file copy operations, so if you lose network connectivity at any point, you can just pick up where you left off.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .