Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi all! We have been experiencing an issue on site where threads have been missing the latest postings. The platform host Vanilla are working on this issue. A workaround that has been used by some is to navigate back from 1 to 10+ pages to re-sync the thread and this will then show the latest posts. Thanks, Mike.
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Need help making a backup script

  • 18-04-2008 5:06pm
    #1
    Registered Users, Registered Users 2 Posts: 15,481 ✭✭✭✭


    I have a pc that runs 24/7 and updates my weather website every couple of minutes.
    Its been running nearly a year now continually (apart from Windows update reboots).

    Given that its a bog standard IDE drive in there, I reckon failure could happen any day easily.
    I'd be devastated if I lost the weather database files.

    So I was thinking that every evening when I'm at home and my main pc is running it would be good if a batch script kicked off on the weather pc and copied the weather files to the main pc, was thinking along the lines of an xcopy job.

    I don't know where to start making such a script and was hoping the good folk here might have some ideas?

    Or are there any free backup programs out there that can use network drives as magnetic libraries?

    Both PCs are running WinXp SP2 with all windows updates on.

    In short i'd like to copy :-

    c:\weatherstuff and c:\weather_data -> M:\backups (M drive being a network drive on the main pc).

    Can anyone help ?

    Have a weather station?, why not join the Ireland Weather Network - http://irelandweather.eu/



Comments

  • Moderators, Education Moderators, Technology & Internet Moderators Posts: 35,099 Mod ✭✭✭✭AlmightyCushion


    Thread here (http://www.boards.ie/vbulletin/showthread.php?t=2055272082) that shows how to do exactly what it is you are looking to do. Very handy. The script there will need a bit of modifying though.
    @echo off
    :: variables
    
    REM This is the location where your backup will be stored.
    set drive=M:\Backups
    
    set backupcmd=xcopy /s /c /d /e /h /i /r /k /y
    
    echo ### Backing up Directory...
    
    REM This is the folder you want backed up.
    %backupcmd% c:\weatherstuff "%drive%\weatherstuff\"
    %backupcmd% c:\weather_data "%drive%\weather_data\"
    
    

    That should do what you are after. To make it a batch file copy and paste it into notepad and save it as backup.bat.


  • Registered Users, Registered Users 2 Posts: 15,481 ✭✭✭✭Supercell


    Thanks very much AC, looks like just what I'm looking for.

    Have a weather station?, why not join the Ireland Weather Network - http://irelandweather.eu/



  • Moderators, Education Moderators, Technology & Internet Moderators Posts: 35,099 Mod ✭✭✭✭AlmightyCushion


    No problem, don't forget to set it up as a scheduled job in windows.


  • Moderators, Recreation & Hobbies Moderators, Science, Health & Environment Moderators, Technology & Internet Moderators Posts: 92,427 Mod ✭✭✭✭Capt'n Midnight


    if problems then look at robocopy is better than xcopy
    if xcopy fails because of filenames or path lenghts

    you can also setup scheduled backups with ntbackup - it's on the xp cd if you don't have it already


  • Closed Accounts Posts: 2,669 ✭✭✭mukki


    if its just a few files your backing up to a mapped drive

    you don't need any programming at all

    http://www.microsoft.com/windowsxp/using/digitalphotography/prophoto/synctoy.mspx


    use synctoy, tell it the 2 locations files and the backup location
    there are 5 differen sync methods, echo will problably be best

    it can then be run as a scheduled task



    best thing about this is it will only backup files that have been updated, so the same stuff wont be copied every day


  • Advertisement
Advertisement