Which of the following best explains why having a backup strategy prevents data loss?
Think about what happens if the original data is deleted or damaged.
Backups are copies of your data saved separately. If the original data is lost or damaged, you can restore it from the backup, preventing permanent data loss.
Which backup type helps minimize data loss by saving changes frequently?
Consider which backup type captures recent changes efficiently.
Incremental backups save only the changes since the last backup, allowing frequent backups without using too much space. This helps restore data up to a recent point, minimizing loss.
Given the following MySQL query to check backup status, what will be the output?
SELECT backup_type, COUNT(*) AS count FROM backups GROUP BY backup_type;
Think about what GROUP BY does in SQL.
The query groups backups by their type and counts how many backups exist for each type. So it returns counts for 'full' and 'incremental' backups separately.
Consider this MySQL command to restore a backup:
mysql -u user -p database_name < backup.sql
Why might this command fail to restore the backup?
Check file existence, database name, and user permissions.
The restore command can fail if the backup file is missing or corrupted, the database name is wrong, or the user lacks permission. All these cause errors during restore.
Which backup strategy best reduces database downtime during backups?
Consider backups that do not require stopping the database.
Hot backups allow the database to keep running while the backup is taken, minimizing downtime and preventing disruption to users.