Forgot your password?
typodupeerror

Comment My personal solution: JAVA +ANT (Score 1) 305

it works fine even on different OSs......I believe you can make bi-directional too....
my version is just few lines and it has email notification when it has finished:

script to run it:
set ANT_OPTS="-Xms256m -Xmx256m"  This setting is to handle many files
ant -v -logfile log.txt

build.xlm:

<project name="backup" default="start" basedir="/">
    <description>
       Script to backup my files
    </description>

     <property name="backupFrom" value="BackupSystem@mydomain.com"/>
     <property name="backupAdmin" value="Me@mydomain.com"/>
     <property name="BackupDestDir" value="y:"/>
     <property name="NetworkDestDir" value="\\10.10.1.167\Backup"/>

     <target name="init">
    <tstamp/>
    <echo message="Backup started: ${TODAY} @ ${TSTAMP}"/>
      </target>

<target name="copy" depends="init" description="copy the files" >

    <echo message="Removing ${BackupDestDir} drive....."/>
    <exec executable="net" failonerror="false" failifexecutionfails="false" >
        <arg line="use ${BackupDestDir}  /d"/>
    </exec>

    <echo message="connecting ${BackupDestDir} drive....."/>
    <exec executable="net" failonerror="true">
        <arg line="use ${BackupDestDir} ${NetworkDestDir}"/>
    </exec>

    <!-- All my stuff -->
    <copy todir="${BackupDestDir}/SyncDir"  verbose="true" failonerror="false" preservelastmodified="true">
        <fileset dir="/Documents and Settings/User" >

        </fileset>
    </copy>

</target>
<target name="start" description="backs up my files" >
    <mail mailhost="mail.mydomain.com" mailport="25" from="${backupFrom}"
    tolist="me@mydomain.com"  subject="backup's log - ${TODAY} ${TSTAMP}"
    charset="ISO-8859-1">

        <fileset dir="/Documents and Settings/User/Backupscript">
            <include name="**/log.txt"/>
        </fileset>
    </mail>

    <echo message="Backup finished: ${TODAY} @ ${TSTAMP}"/>

</target>

</project>

Slashdot Top Deals

C for yourself.

Working...