Junior — Middle
Do you have experience creating and restoring data backups?
sobes.tech AI
Answer from AI
The practice of creating and restoring data backups involves regularly copying important data to prevent loss. Automation using scripts or specialized tools (such as rsync, Bacula, or cloud services) is typically employed. Restoration is verified through test runs to ensure data can be returned to a working state.
An example of a simple script for backing up a directory on Linux:
#!/bin/bash
SOURCE_DIR="/var/www/html"
BACKUP_DIR="/backup/$(date +%F)"
mkdir -p "$BACKUP_DIR"
rsync -av --delete "$SOURCE_DIR/" "$BACKUP_DIR/"
It is important to plan the frequency of backups, store copies in different locations, and verify data integrity.