News and backup: Difference between revisions
TOstryzniuk (talk | contribs) mNo edit summary |
Ttenbergen (talk | contribs) mNo edit summary |
||
Line 6: | Line 6: | ||
** open the wiki to [[Log]] to show what has changed | ** 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 only the "Location Specific Parameters" section of c:\batches\batstart.bat | |||
=== Make a shortcut === | |||
* '''make shortcut''' "News and backup" to batstart.bat (use that name so every collector knows it under the same name) | |||
* '''move to "all users"''' the shortcut to C:\Documents and Settings\All Users\Desktop to make it visible to all users of the laptop | |||
== 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. | |||
[[Category: Batch Files]] | [[Category: Batch Files]] |
Revision as of 10:32, 21 October 2009
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 only the "Location Specific Parameters" section of c:\batches\batstart.bat
Make a shortcut
- make shortcut "News and backup" to batstart.bat (use that name so every collector knows it under the same name)
- move to "all users" the shortcut to C:\Documents and Settings\All Users\Desktop to make it visible to all users of the laptop
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.