News and backup: Difference between revisions

Line 15: Line 15:
*another example of this: Nov.13 - discovered that ICU Pharmacy items YES NO not going into pharmacy.mdb or centralized.mdb from first week of June to Aug 13.13.  Because of backups to Regional Server, the Main office had the opportunity to pull together copies of  these backups and retrieve the "lost pharm data".  This has saved the data collector from having to recollect pharmacy data from the chart.[[User:TOstryzniuk|Trish Ostryzniuk]] 15:49, 2013 December 3 (CST)
*another example of this: Nov.13 - discovered that ICU Pharmacy items YES NO not going into pharmacy.mdb or centralized.mdb from first week of June to Aug 13.13.  Because of backups to Regional Server, the Main office had the opportunity to pull together copies of  these backups and retrieve the "lost pharm data".  This has saved the data collector from having to recollect pharmacy data from the chart.[[User:TOstryzniuk|Trish Ostryzniuk]] 15:49, 2013 December 3 (CST)


== Operation of the file ==
== Process ==
'' For the most up-to-date workings of this file see the file itself and the change log [[News and Backup Change Log]]''
'' For the most up-to-date workings of this file see the file itself and the change logs at [[Batstart.bat#Log]] and  
[[Backup.bat#Log]]


The "'''News and Backup'''" batch file is a batch file on each '''laptop''' which does the following:  
The "'''News and Backup'''" batch file is a batch file on each '''laptop''' which does the following:  
* checks if there is a newer version of itself (technically it's the caller batch file that does this...)
* [[batstart.bat]]
* back up [[CCMDB_data.mdb|c:\ccmdb_data\ccmdb_data.mdb]] to the SD card
** sets the location of the laptop
* back up to server w 20 versions
** checks if there is a newer version of [[backup.bat]]; if so, it downloads it
** delete [[Regional Server]]\Programs\<hosp>_<ward>\ccmdb.20
** calls [[backup.bat]]
** rename ccmdb.19 to ccmdb.20, ccmdb18 to ccmdb.19, ... ccmdb.1 to ccmdb.2, ccmdb.mdb to ccmdb.1
* [[backup.bat]]
** copy c:\ccmdb_'''data'''\ccmdb_data.mdb to [[Regional Server]]\data\<hosp>_<ward>
* back up to server w 20 versions of [[CCMDB_data.mdb]] to the SD card
* back up to server w 20 versions of [[CCMDB_data.mdb]] to the regional server
* check if there is a file [[Regional Server]]\Programs\<hosp>_<ward>\ccmdb.mdb; if so,  
* 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'''
** '''move''' the file from the regional server to c:\ccmdb_'''program'''