📖 Scenario: You work as a technician managing a SCADA (Supervisory Control and Data Acquisition) system that controls critical infrastructure. To ensure the system can recover quickly from failures, you need to create a disaster recovery plan that tracks key system components and their backup status.
🎯 Goal: Build a simple disaster recovery plan data structure that lists SCADA components and their backup status. Then, identify which components need backup updates and display them clearly.
📋 What You'll Learn
Create a dictionary named scada_components with exact component names and their backup status as boolean values.
Add a variable named backup_threshold set to False to represent components needing backup updates.
Use a dictionary comprehension named components_to_backup to filter components that have False backup status.
Print the components_to_backup dictionary to show components requiring backup.
💡 Why This Matters
🌍 Real World
SCADA systems control critical infrastructure like water, power, and manufacturing. Keeping track of backup status helps quickly recover from failures and avoid downtime.
💼 Career
Technicians and engineers use disaster recovery plans to maintain system reliability and safety. This project builds foundational skills in managing system status and recovery readiness.
Progress0 / 4 steps
1
Create SCADA components backup status dictionary
Create a dictionary called scada_components with these exact entries: 'RTU1': True, 'PLC2': False, 'HMI3': True, 'Sensor4': False, 'Actuator5': True.
SCADA systems
Hint
Use curly braces to create a dictionary with component names as keys and boolean backup status as values.
2
Add backup threshold variable
Add a variable called backup_threshold and set it to False to represent components needing backup updates.
SCADA systems
Hint
Just assign the boolean value False to the variable backup_threshold.
3
Filter components needing backup
Use a dictionary comprehension named components_to_backup to select items from scada_components where the backup status equals backup_threshold.
SCADA systems
Hint
Use {key: value for key, value in dict.items() if condition} syntax to filter the dictionary.
4
Display components needing backup
Write a print statement to display the components_to_backup dictionary.
SCADA systems
Hint
Use print(components_to_backup) to show the filtered dictionary.
Practice
(1/5)
1. What is the main purpose of disaster recovery planning in SCADA systems?
easy
A. To improve the system's daily performance
B. To add new features to the SCADA system
C. To prepare the system to recover quickly after an emergency
D. To reduce the cost of hardware components
Solution
Step 1: Understand disaster recovery planning
Disaster recovery planning focuses on preparing for emergencies and restoring system operations quickly.
Step 2: Identify the main goal in SCADA context
The goal is to recover the SCADA system fast after failures or disasters to avoid downtime.
Final Answer:
To prepare the system to recover quickly after an emergency -> Option C
Quick Check:
Disaster recovery = fast system recovery [OK]
Hint: Disaster recovery means quick system recovery after emergencies [OK]
Common Mistakes:
Confusing disaster recovery with performance improvement
Thinking it adds new features
Assuming it reduces hardware costs
2. Which of the following is the correct syntax to schedule a daily backup using a cron job on a Linux SCADA server?
easy
A. 0 24 * * * /usr/local/bin/scada_backup.sh
B. 0 0 * * * /usr/local/bin/scada_backup.sh
C. * * 0 0 * /usr/local/bin/scada_backup.sh
D. 0 0 0 * * /usr/local/bin/scada_backup.sh
Solution
Step 1: Understand cron syntax for daily tasks
The format is 'minute hour day month weekday'. For daily at midnight, use '0 0 * * *'.
Step 2: Match the correct cron expression
0 0 * * * /usr/local/bin/scada_backup.sh uses '0 0 * * *' which means daily at 00:00 hours, running the backup script.
Final Answer:
0 0 * * * /usr/local/bin/scada_backup.sh -> Option B
Quick Check:
Daily midnight cron = 0 0 * * * [OK]
Hint: Cron daily at midnight is always '0 0 * * *' [OK]
Common Mistakes:
Using invalid hour values like 24
Mixing up the order of cron fields
Using zero in wrong positions
3. Given this backup script snippet for SCADA data:
if [ -f /backup/scada_data.tar.gz ]; then
rm /backup/scada_data.tar.gz
fi
tar -czf /backup/scada_data.tar.gz /var/scada/data
What will be the output or effect after running this script?
medium
A. The old backup file is deleted and a new compressed backup is created
B. The script will fail because of syntax errors
C. The backup file will be duplicated without deletion
D. Nothing happens because the script does not run any commands
Solution
Step 1: Analyze the script logic
The script checks if the backup file exists, deletes it if yes, then creates a new compressed backup.
Step 2: Understand the commands' effect
Removing the old file avoids duplication, and tar creates a new compressed archive of SCADA data.
Final Answer:
The old backup file is deleted and a new compressed backup is created -> Option A
Quick Check:
Old backup removed + new backup created = The old backup file is deleted and a new compressed backup is created [OK]
Hint: Check if file exists, remove it, then create new backup [OK]
Common Mistakes:
Assuming the script duplicates backups
Thinking the script has syntax errors
Ignoring the file existence check
4. A SCADA disaster recovery plan script fails to restore data because the backup file path is incorrect. Which fix will solve this issue?
medium
A. Update the script to use the correct backup file path
B. Increase the server's CPU speed
C. Change the backup file format to .zip
D. Disable the firewall on the SCADA server
Solution
Step 1: Identify the cause of failure
The script fails because it looks for a backup file in the wrong location.
Step 2: Apply the correct fix
Changing the script to point to the correct backup file path will allow it to find and restore the data.
Final Answer:
Update the script to use the correct backup file path -> Option A
Quick Check:
Correct path fix = successful restore [OK]
Hint: Fix file path errors to restore backups correctly [OK]
Common Mistakes:
Trying unrelated hardware fixes
Changing file format without reason
Disabling firewall unnecessarily
5. You need to design a disaster recovery plan for a SCADA system that ensures minimal downtime and data loss. Which combination of strategies is best?
hard
A. Relying solely on hardware redundancy without backups
B. Manual backups once a month and no testing
C. Only offsite storage without backups or testing
D. Regular automated backups, offsite storage, and periodic recovery drills
Solution
Step 1: Identify key disaster recovery needs
Minimizing downtime and data loss requires frequent backups, safe storage, and testing the recovery process.
Step 2: Evaluate each strategy
Regular automated backups, offsite storage, and periodic recovery drills combines automated backups (fast recovery), offsite storage (protection from local disasters), and drills (ensures plan works).
Final Answer:
Regular automated backups, offsite storage, and periodic recovery drills -> Option D
Quick Check:
Backup + offsite + testing = best recovery plan [OK]
Hint: Combine backups, offsite storage, and testing for best recovery [OK]
Common Mistakes:
Skipping testing of recovery plans
Relying only on hardware redundancy
Doing backups too infrequently
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.