RDK Resources
[*RDK Preferred*]
Code Management Facility
RDK Forums
[RDK Conferences]
RDK Support
Archives
Papers & Presentations Archive
Children Display |
---|
Table of Contents |
---|
...
|
Backup and Restore is the feature developed in regard to WebUI.
...
...
< Describe the system design in broad terms . Consider benefits, costs and schedule and technical risks. Describe how the proposed solution aligns with the enterprise architecture. >
<Alternative designs considered and why one was chosen>
<Architecture Diagram>
<Describe the communication between the sub-systems. (Diagrams may be used to illustrate communications). >
< Identify input interfaces, function call protocol, and the nature of the data structures passed across the interface between the sub-modules>
< Identify output interfaces, function call protocol, and the nature of the data structures passed across the interface. >
<Provide a description of the data model>
< Describe the cases that are identified as problem but unable to report to it due to various factors. Describe the factors >
Backup and Restore functionalities are supported by a set of script files. Following are the mentioned script files:
→ ConfPhp
→ download_user_settings.php
→ upload_user_settings1.php
→ upload_user_settings2.php
→ backup_user_settings.php
→ backup_enc_key.php
→ ajax_at_saving_backup_key.php
These script files which are already present in the RDK build, will execute when the Backup and Restore buttons are clicked.
Scripts backup_user_settings.php, download_user_settings.php downloads the tar file containing database files.
The database files which contains the Current User settings are used for back up. These database files are encrypted using the secure key entered by the User, scripts executed are backup_enc_key.php and ajax_at_saving_backup_key.php.
A tar file is generated with these encrypted files together and stored in temporary folder /tmp/. The tar file from temporary folder is downloaded to the Local PC of User.
Scripts upload_user_settings1.php, upload_user_settings2.php perform the Restore and Status update functions.
The files which are uploaded in WebUI are extracted to get the encrypted database files. These database files are decrypted using the valid secure key entered by user.The secure key entered by user should be the same secure key which was entered earlier during encryption. If it is invalid, the decryption does not happen and restore fails.
The database files are saved to temporary folder /var/tmp/. The files are retrieved and replaced with the existing database files in RPi image.
Other Considerations (DAR)
It is required for the database files to be saved in an encrypted format to maintain the security of data, after backup.
During code development, two approaches were considered while designing the encryption/decryption
The latter approach has been implemented as it was found to be more preferable and acceptable as compared to the former. This is because the former approach causes risk of security as the password is accessible by user using database file or encoded file.
draw.io Diagram | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
The downloaded file, backup.tar is the default name given to the backup file. Once downloaded to Local PC, this file has to be replaced with new backup.tar file. If the old file is not deleted, it may cause misbehavior in Restore feature execution. The old file can be either deleted or renamed to avoid duplicate file creation. Please Refer User manual for further details.
During Restore, the file to be uploaded has to be named to backup.tar by default.
Example: backup_2711191230.tar for files generated on 27/11/19 12:30PM.
Example: Wifi_settings.tar < Describe how the current design is suitable for future enhancement without completely modifying existing design . >