1

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?

4

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 .
5
  • 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?
    – TorKirke
    Nov 14 '11 at 8:12
  • 1
    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..
    – TorKirke
    Nov 15 '11 at 13:52
  • @Herter: an even simpler solution
    – nixman
    Nov 16 '11 at 9:30
  • 1
    @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
1

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.

3
  • Cannot install anything on the unix machine I only have read permission on it..
    – TorKirke
    Nov 14 '11 at 8:13
  • 1
    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 :)
    – TorKirke
    Nov 17 '11 at 8:44
1

Maybe Deltacopy and rsync?

http://www.aboutmyip.com/AboutMyXApp/DeltaCopy.jsp

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.
1
  • Thanks for the suggestion, but I cannot install anything on the unix machine.
    – TorKirke
    Nov 14 '11 at 8:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.