rpi-update
rpi-update copied to clipboard
Option to restore backup
When there is a backup available (and no internet connection is available), rpi-update
should have an option to easily restore this backup. For example the option --restore-backup
could trigger this.
When a backup is being made, the local tree of files for /boot/
and for /lib/modules/
(before the backup is being made) should be stored somewhere. Probably in /boot.bak/.files
and /lib/modules.bak/.files
. Before a backup is being restored, the local paths stored in these files should exist under /boot.bak/
and under /lib/modules.bak/
.
This would ensure that restoring a backup will place back at least the files that were there. Restoring additional files should not be a problem, but restoring when files are missing should not be possible and an error should be reported on which files are missing.
After restoring a backup, the new backup should be the version from which the backup was triggered. When a backup has been restored, the .files
files from that backup should be deleted.
Implementing this feature would allow not so technical savvy users to perform a restore of a backup easily and safely, especially when no internet connection is available. One of the reasons no internet connection is available, is upgrading to a firmware version that breaks internet functionality.
Additionally, rpi-update --help
should explain all features:
- no arguments
- firmware revision argument in terms of a git hash
-
--restore-backup
argument -
--help
argument -
--version
argument
it wold be nice to be able to delete the backup files.
e.g. rpi-update delete-backup-files
rpi-update
has no man page
rpi-update --help
gives the following output
root@raspberrypi:~# rpi-update --version
*** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom
*** Performing self-update
*** Relaunching after update
*** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom
*** Invalid hash given
if you run rpi-update
backup files are created first and afterwards the user is asked if he wants to continue. if the user aborts the backup files are still there wasting disk space.
root@raspberrypi:~# rpi-update
*** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom
*** Performing self-update
*** Relaunching after update
*** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom
*** We're running for the first time
*** Backing up files (this will take a few minutes)
*** Remove old firmware backup
*** Backing up firmware
*** Backing up modules 4.19.57+
#############################################################
WARNING: 'rpi-update' updates to pre-releases of the linux
kernel tree and Videocore firmware.
'rpi-update' should only be used if there is a specific
reason to do so - for example, a request by a Raspberry Pi
engineer.
DO NOT use 'rpi-update' as part of a regular update process.
##############################################################
Would you like to proceed? (y/N)
ps: thanks for your work :)