BILCS - Timesheets Backup
Due to limited disk space on BILCS server, a system has been implemented to retrieve uploaded timesheets and save these timesheets to an external backup drive located at Spiderscope.
The system is comprised of 2 projects, both of which have been coded in .NET and can be be found in the Visual Studio TFS repository:
1) An API system that sits on the BILCS server that can be accessed via the web to retrieve & update timesheet information data and the retrieve the timesheet file itself.
2) A retrieval system that uses the API to download and save outstanding timesheets to an external backup drive.
Overview of process
1) Outstanding timesheets are automatically retrieved and saved to an external backup drive and the timesheets are marked off as being retrieved.
2) When a timesheet has been retrieved successfully, the physicial timesheet file on the BILCS server is moved into a month year stamped 'archived' folder.
3) When a timesheet has been moved into the 'archived' folder, these timesheets can still be viewed and download via the BILCS portal.
4) When a job to archive bookings to a certain date has been agreed upon and arranged, the developer can delete the relevant timesheet files from the 'archived' folder.
5) After a certain amount of time, the external backup drive should be copied twice and one drive should be sent to BILCS while one drive remains at Spiderscope for a double backup.
How are the timesheets retrieved?
1) A daily scheduled task (on Necro) repeatedly calls the timesheet retrieval system every 2 minutes between 11pm and 5am. A new task will not run untill the previous task has finished.
2) The retrieval system uses the API to fetch the oldest 100 signed off bookings where the timesheet has yet to be downloaded.
3) For every retrieved booking, information about the timesheet is fetched (id, filename, checksum) and the raw timesheet file is retrieved and saved to an external backup drive. The location filepath can be configured within the .NET project.
4) If the timesheet has been downloaded completely (verified by using the checksum), the booking on the BILCS server is updated to say that the timesheet has been successfully backed up. This timesheet will not be retrieved again.
5) Summary email(s) are sent to the configured email address (currently richarda@spiderscope.com) detailing how many timesheets were downloaded and if there were any errors.
