Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a remote Unix machine which doesnt have SMB installed and I cannot install it. However there are some files located on that server that I need on a windows machine.

What I need is a way to periodically copy a number of specific files from the Unix machine based on a list of filenames I have on my windows machine.

How would I go about doing this? - This has to happen automatically once a day.

I'm thinking a little scheduled job on windows that reads a needed files' names in and then opens a ssh tunnel and runs a scp command remotely and copying each file. Is this a good solution or is there a better way?

share|improve this question
up vote 4 down vote accepted

Install Cygwin on the windows machine and use the "scp" command. Files can be "pulled" from the *nix machine over to the windows machine like this:

$> scp user@nixbox:/var/log/importantlogs/*.zip .
share|improve this answer
This looks interesting.. would it be possible to have a list of filenames and then run some java job which would run the above command for each fil in the list? – Herter Nov 14 '11 at 8:12
Java is maybe a little overkill to copy files. A simple bash script should do the job. – Marco Nov 14 '11 at 23:35
Yeah, I'm considering just making a little bashscript to run on the unix machine and add it as a cron job. Maybe I'll learn a little unix then.. – Herter Nov 15 '11 at 13:52
@Herter: an even simpler solution – nixman Nov 16 '11 at 9:30
@Herter: an even simpler solution in bash: for i in file1.txt file2.bin file3.ext; do scp user@nixbox:/var/log/logdir/$i . ; done should copy over all the files matching the filenames you specified. – nixman Nov 16 '11 at 9:41

File Transfer Protocol (aka FTP)

Setup an FTP server on either machine (suggestion: let UNIX be the server), and connect as client from the other machine.

You can automatize any behavior over FTP using scripts.

share|improve this answer
Cannot install anything on the unix machine I only have read permission on it.. – Herter Nov 14 '11 at 8:13
Do it reverse then: server on Windows, client on UNIX. You should have write permissions on the directory of course. – m0skit0 Nov 14 '11 at 9:45
I'll try out the scp command first.. if I cannot get that working I'll look into your suggestion. I'll give you a +1 for the suggestion :) – Herter Nov 17 '11 at 8:44

Maybe Deltacopy and rsync?

In general terms, DeltaCopy is an open source, fast incremental backup program. Let's say you have to backup one file that is 500 MB every night. A normal file copy would copy the entire file even if a few bytes have changed. DeltaCopy, on the other hand, would only copy the part of file that has actually been modified. This reduces the data transfer to just a small fraction of 500 MB saving time and network bandwidth.

Here is a list of features

  • Incremental backup - Copies part of the file that is actually modified
  • Task scheduler - Profiles in DeltaCopy can run based on a schedule
  • Email notification - Administrators can receive email confirmation on successful as well as failed transfers
  • One-click restore - Backed up files can be easily restored.
  • Windows friendly environment - No need to manually modify configuration files or play around with command line options.
share|improve this answer
Thanks for the suggestion, but I cannot install anything on the unix machine. – Herter Nov 14 '11 at 8:11

You must log in to answer this question.

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