Standard Operating Procedure (SOP) for CCTV Record Backup and SD Card Management

Purpose

This SOP outlines the procedure for backing up CCTV records from SD cards using a Raspberry Pi to the AWS S3 bucket and the management of SD cards for two CCTV cameras.

Scope

Applicable to the IT Operations team responsible for managing CCTV recordings at TSP office office at Bandung Indonesia.

Procedure

1. SD Card Replacement Schedule

  • Every two weeks, replace the SD cards in both CCTV cameras, referred to as Cam01 and Cam02.
  • Ensure to label the SD cards with the camera name and date of installation.

2. Formatting New SD Cards

  • Before installing new SD cards in the cameras, format them using the Bardi Web Portal
  • Make sure that you select the right Camera.
  • And click on the three dots next to the Camera name and it will take you to the settings
  • After that click on the Cloud Storage
  • Finally click on the Format:
  • Check for any errors during formatting and ensure they are ready for use.

3. Backup Process Using Raspberry Pi

  • Insert the removed SD card into the Raspberry Pi.
  • Initially, we should clone the project repository from the tsp GitLab. This can be done by executing the following command:
git clone git@git.tsp.dev:dakshitha_perera/cctv_bandung.git
  • Change the permissions of the CCTV_Upload_Automation.sh,SD_Detection_Script.sh and send_email.py
chmod 700 CCTV_Upload_Automation.sh
chmod 700 SD_Detection_Script.sh
chmod 700 send_email.py
  • Run the script CCTV_Upload_Automation.sh:
./CCTV_Upload_Automation.sh
  • Mount the SD card.
  • Verify available backup space.
  • Zip and upload CCTV records to the AWS S3 bucket tsp-bandung-cctv-records-2023.
  • Delete the local zip file post-upload.
  • Log the process in /root/CCTV_Automation_Backup/cctv_backup_log.txt.
  • Send status emails using send_email.py.
  • Perform these steps for the second SD card.

4. Monitoring and Error Handling

  • Monitor the log file at /root/CCTV_Automation_Backup/cctv_backup_log.txt for any errors or issues.
  • In case of errors, such as mounting failures, insufficient space, or upload issues, follow the troubleshooting steps outlined in the script’s log messages.
  • If the issue persists, escalate to the senior IT team member.

5. Email Notifications

  • The send_email.py script sends email notifications about the backup status to it_support@thesoftwarepractice.com.
  • Review these emails for any immediate actions or follow-ups.

6. Record Keeping

  • Maintain a log of SD card replacements and backups for future reference.
  • Store the log in a secure location accessible to the IT Operations team.

7. SD Card Storage and Maintenance

  • Ensure that the used SD cards are stored securely in a labeled locker at the Bundung office until they are needed for the next cycle.
  • Regularly check the health of the SD cards and replace them if they show signs of wear or corruption.

8. AWS S3 Bucket Details

  • Use the tsp-bandung-cctv AWS account for uploads.
  • The S3 bucket name is tsp-bandung-cctv-records-2023.