News and backup: Difference between revisions
Ttenbergen (talk | contribs) |
Ttenbergen (talk | contribs) |
||
Line 15: | Line 15: | ||
=== Make a shortcut === | === Make a shortcut === | ||
* ''' | * '''Make shortcut | ||
* | ** C:\Documents and Settings\All Users\Desktop\'''News and backup''' (keep name consistent for communications) | ||
* to | |||
** c:\batches\batstart.bat | |||
== Information about the batch files == | == Information about the batch files == |
Revision as of 09:59, 2009 November 2
The "News and Backup" batch file is a batch file on each laptop which does the following:
- back up c:\ccmdb_data\ccmdb.mdb to the SD card
- back up c:\ccmdb_data\ccmdb.mdb to Regional Server\data\<hosp>_<ward>
- check if there is a file Regional Server\Programs\<hosp>_<ward>\ccmdb.mdb; if so,
- move the file from the regional server to c:\ccmdb_program
- open the wiki to Log to show what has changed
Setting up the file on a laptop
Master file location
Copy from master file location
- Regional Server\maintenance\laptop batches\* --> c:\batches
Edit parameters for location
batstart.bat contains lines that serve as parameters for the file to work in different locations. For the most part, all possible entries are present in the file, with the ones not applicable for a location "commented out". To comment out a line, put a ":" (without the quotes) in front of the line you don't want to run.
- edit parameters - only the "Location Specific Parameters" section of c:\batches\batstart.bat
Make a shortcut
- Make shortcut
- C:\Documents and Settings\All Users\Desktop\News and backup (keep name consistent for communications)
- to
- c:\batches\batstart.bat
Information about the batch files
A two-file system is used to allow batstart.bat to actually look for a new backup.bat on the regional server before each run, allowing a central update of that file if necessary. This would allow for centralized updating/tweaking/etc of the laptops.
Backup.bat uses Robocopy, sort of an improved version of xcopy, which is available from Microsoft as part of one of their Server SDKs.