Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hello,
I am new to korn shell. There is a file that gets produced every night and I want to automatically transfer this from unix to a windows shared area without any manual intervention.
Does anyone know how I can do this via command line or has anyone got a script that I could use.Thanks

use rsync do a man on it.or read here.
I do local backups on several of my machines using rsync. I have an
extra disk installed that can hold all the contents of the main
disk. I then have a nightly cron job that backs up the main disk to
the backup. This is the script I use on one of those machines.#!/bin/sh
export PATH=/usr/local/bin:/usr/bin:/bin
LIST="rootfs usr data data2"
for d in $LIST; do
mount /backup/$d
rsync -ax --exclude fstab --delete /$d/ /backup/$d/
umount /backup/$d
doneDAY=`date "+%A"`
rsync -a --delete /usr/local/apache /data2/backups/$DAY
rsync -a --delete /data/solid /data2/backups/$DAY
The first part does the backup on the spare disk. The second part
backs up the critical parts to daily directories. I also backup the
critical parts using a rsync over ssh to a remote machine

Hi,
rsync is the one way.
another way is using samba. share the file system in the unix in which all your backup will be placed. those files/folders can be access by all windows who have access to the unix machine.

Same question is asked to me some time back too.
Solution is described on
http://kesharwani.blogspot.com/2005_07_01_kesharwani_archive.htmlMukesh Kesharwani
CISSP, CCNA, SCSA,CUA,CNA, MCSE,MCP+I,CCNSE,Certified HIPPA Securityhttp://www.keekar.com

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |