1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Networks HOW-TO: Backup automatically via a network

Discussion in 'Hardware' started by iam, 14 Jan 2003.

  1. iam

    iam What's a Dremel?

    Joined:
    24 Mar 2002
    Posts:
    12
    Likes Received:
    0
  2. CaseyBlackburn

    CaseyBlackburn Network Techie

    Joined:
    27 Jul 2004
    Posts:
    1,846
    Likes Received:
    0
    I saw that, but in my opinion this allows me more control.

    Btw, word of advice, I would greatly reduce your signature before a mod does it for you.
     
  3. iam

    iam What's a Dremel?

    Joined:
    24 Mar 2002
    Posts:
    12
    Likes Received:
    0
    Duly noted :D
     
  4. Mortus

    Mortus What's a Dremel?

    Joined:
    30 Sep 2004
    Posts:
    786
    Likes Received:
    7
    You could use a free program called Goodsync


    i was looking for a good backup solution and was pointed here buy a guy at work ..... im very happy with it :)
     
  5. GiGo

    GiGo was once a nerd.....

    Joined:
    12 May 2002
    Posts:
    2,313
    Likes Received:
    1
    Right after mucking around for a while with Xcopy and my computers i've finally come up with what I think is a decent script to use.

    @ECHO OFF
    ECHO SCRIPT RUNNING ON %COMPUTERNAME% BY %USERNAME%
    ECHO.
    ECHO.
    ECHO : WELCOME TO THE AUTOMATED BACKUP SCRIPT :
    ECHO : THIS SCRIPT WILL START BY BACKING UP :
    ECHO : YOUR DOCUMENTS AND SETTINGS FOLDER :
    ECHO.
    PAUSE
    DEL \\Server\updates\Backup-%computername%-0\logfile.txt
    ECHO Please wait...
    ECHO This may take some time depending on how many files are to be backed up...
    xcopy "\\%computername%\boot\Documents and Settings" "\\Server\updates\Backup-%computername%-0\Documents and Settings\"

    /E/Y/H/R/K/V/D/C/EXCLUDE:\\%computername%\boot\backup.txt >>\\Server\updates\Backup-%computername%-0\logfile.txt
    ECHO : BACKUP COMPLETE - LOGFILE.TXT CREATED :
    ECHO : THANK YOU FOR USING THE BACKUP SCRIPT :
    ECHO.
    PAUSE
    The script use the EXCLUDES command, to use the EXCLUDE command you need to create a file and put down what you want to EXCLUDE in the file transfer, as I was copying the entire 'Documents and Settings' folder, I opted to EXCLUDE the temp folders etc....

    The 'backup.txt' file as I have named it looks like this:

    \\%computername%\boot\Documents and Settings\GiGo\Local Settings\Temp\
    \\%computername%\boot\Documents and Settings\GiGo\Local Settings\Temporary Internet Files\
    \\%computername%\boot\Documents and Settings\GiGo\Start Menu
    \\%computername%\boot\Documents and Settings\GiGo\Recent
    NTUSER.DAT
    ntuser.dat.LOG

    I've used %computername% so its easier to copy from computer to computer, so I have less editing to do. I would use %username% in the EXCLUDE list but im not sure if it works, didnt the first time I used it so i'll have to have a look tommorrow, im off to bed due to an early start.

    Of course using %computername% means that you should run the script from the computer your backup.

    Hope it all helps.
    GiGo
     
  6. Lazlow

    Lazlow I have a dremel.

    Joined:
    8 Aug 2003
    Posts:
    1,464
    Likes Received:
    0
    I'll add my current script to the list:
    Code:
    @echo off
    
    FOR /F "TOKENS=1* DELIMS= " %%A IN ('DATE/T') DO SET CDATE=%%B 
    For /f "tokens=1-4 delims=/ " %%a in ('date /t') do (set date=%%c-%%b-%%a) 
    
    echo Welcome to Lazlow's Automated Backup Script Version 2.0 >> "C:\Tasks\Backup Logs\%date%_log.txt"
    echo Executed on %date%. >> "C:\Tasks\Backup Logs\%date%_log.txt"
    
    echo Backing up E: to F: >> "C:\Tasks\Backup Logs\%date%_log.txt"
    xcopy e: f: /D /E /V /C /F /H /R /Y >> "C:\Tasks\Backup Logs\%date%_log.txt"
    echo Backup of E: complete. >> "C:\Tasks\Backup Logs\%date%_log.txt"
    It's pretty straight forward, but the first 3 lines of code and the >> parts output the information to a log file, which is dated too - it eliminates the need to delete a log file and write to it again, as each day the script is run, a new log file is created. This is only a small sample, the whole script backs up about 8 partitions, but the rest is a repeat.
     
  7. usamaalam

    usamaalam What's a Dremel?

    Joined:
    23 Apr 2007
    Posts:
    1
    Likes Received:
    0
    I am trying to copy a folder with xcopy. Is there a way I can get rid of the message that says is destination file or folder? Basically I am going to shell it from my application and the pop-up message is really not good from the application.

    Thanks.
     
  8. GiGo

    GiGo was once a nerd.....

    Joined:
    12 May 2002
    Posts:
    2,313
    Likes Received:
    1
    Add a backlash '\' tp the end of the string ie C:\Settings\ rather than C:\Settings

    Think that would solve it.

    Regards
    GiGo
     
Tags:

Share This Page