Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve backup and restore procedure #352

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

7lima
Copy link

@7lima 7lima commented Apr 29, 2023

This is a revitalization of the pull requests #315, #317, and #320 which contains roughly the same outcome as those. Compared to them the separation into chunks/commits is different in a way that should make things clearer, especially with better consistency and coherence of these chunks.

The backup script stores all XCSoar settings and relevant OpenVario settings like:
- brightness of the display
- rotation
- touch screen calibration
- language settings
- dropbear settings
- SSH, variod and sensord status

Backups are stored on a USB stick at a place depending on the MAC address of eth0 which is unique for any device. So you can store more than one backup on the same stick.

We've added a reworked system info script, too. It gives an overview which packages and which versions are installed. It also shows IP addresses, kernel, host, system daemon status and other info. A bunch of new further system information was added also.

The backup and restore functions and menus have been made more user-friendly and should comprise a whole set of backup abilities now. Efficiency has been improved. Added a progress bar. Display error codes to the user transparently. Regarding the naming of functions and scripts consistency has been improved. This has been done by a rather complex renaming. Some old functionality has been dropped, new functionality has been added in the menus and backup scripts. See the individual commit comments for more details!

This is a joint work of @Blaubart and @7lima.

Moved functional code from ovmenu-ng.sh function show_info() into file system-info.sh.
Script will be reworked in the next step
The system info script gives an overview which packages and which versions are installed.
It also shows IP addresses, kernel, host, system daemon status and other info.

A bunch of new system information was added:
- KERNEL_VERSION
- MAC address of eth0 (also relevant for backups)
- HOSTNAME
- versions of:
  - I2C_TOOLS
  - E2FSPROGS
  - USB_MODESWITCH
- daemon status of:
  - SSH
  - variod
  - sensord

The output is no more done with a "dialog" message box but directly echoed to the console.

Yes, querying the version of the daemons by a "opkg list-installed" is not as portable as desired:
Openvario#320 (comment)
But this is an inherited flaw from earlier system-info versions.
It should be improved separately from this commit.
- renamed script and function names according to its purpose: download* to backup*
- whitespace formatting
- disabled unused script upload-all.sh
- fixed inconsistent menu item names
- added TODO comments
- Shell output redirection fixed
…lity eliminated:

Will no more be needed with the upcoming addition of new backup/restore functionality (next commit)
- Provident background system buffer sync to help later syncs finish quicker
- Use eth0 MAC ID in backup path
- Simplify recursive copy operation by use of smart rsync features
- More compatible to the new menu ovmenu-x from Max
- Display rsync error codes to the user
- Propagate rsync error codes to the invoking shell
- Visibility of yearned-for final message improved
- Message integrated that user should wait a moment
- Show virtual progress bar. better user guidance
- Bourne Shell compatibility restored
- Avoid trouble when copying symlinks
- Included into the backup the statuses of:
  - brightness of the display
  - rotation
  - touch screen calibration
  - language settings
  - dropbear settings
  - SSH, variod and sensord status
- 3 backup/restore functions added:
  - Backup         "Backup XCSoar and OV settings"
  - Restore        "Restore XCSoar and OV settings"
  - Restore_XCSoar "Restore only XCSoar settings"

This is on a branch to be proposed as a new PR in response to the PR Openvario#320 comments.
@7lima
Copy link
Author

7lima commented Apr 9, 2024

This is more than ready for a merge. Any comments?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant