Hello. I’m looking for a way to create a crontab entry to restore the last (or any) backup made by dietpi-backup.
One simple use case for this would be when installing ufw without allowing traffic through the ssh port, thus getting locked out of ssh.
Setting an auto-restore a few minutes after doing something that could potentially lock me out would be great, especially if I don’t have phisycal access to the device. Thanks.
would it be really needed to restore a whole backup? Why not simply stopping the service / app you have started before?
Stoping a service does make more sense. However, if it’s possible to restore a full backup via crontab I would still like to know how. I don’t want to end up in a situation where I mess something up that’s either too time consuming or beyond my knowledge level to fix.
a restore could be automatically done using following command
/boot/dietpi/dietpi-backup -1
You should be able to simply add it to crontab.
Thanks a lot!