Objective:
Define how data and the operating system will be restored from backups in the event of loss or corruption.
Procedure:
- Operating system recovery with Vagrant:
In case of operating system failure, it can be easily recovered by recreating the virtual machine with the Vagrantfile. This allows you to restore the exact configuration of the operating system and installed applications.- action:
Destroy the current machine:
vagrant destroy
Create a new machine with Vagrantfile settings:
vagrant up
Data recovery with rsync:
If data is lost, it can be easily restored from the backup created with rsync. To restore files from the backup directory to the original directory, simply run:
rsync -avz /home/user/backups/ /home/user/dades/
Restoration verification:
After the files are restored, it is important to verify that everything is in order. This can be done by checking the integrity of the files and running functional tests on the restored data.
Recovery tests:
To ensure that the recovery process is working correctly, it is recommended to perform periodic restore tests in a test environment. This will allow us to catch any potential errors before it is necessary to restore the data in production.