Feature #12518
closedRestore RRD and extra data from configuration backups when restoring during installation
100%
Description
Currently bsdinstall script simply removes any extra data or RRD data from the config.xml:
https://github.com/pfsense/FreeBSD-src/blob/devel-12/usr.sbin/bsdinstall/scripts/copy_configxml_from_usb#L67:
# Remove rrddata/xmldata if it is present, see https://redmine.pfsense.org/issues/11050 REMOVE_DATA="rrddata captiveportaldata dhcpddata dhcpdv6data voucherdata sshdata" for remdata in $REMOVE_DATA; do sed -i '' -e "/<$remdata>/,/<\/$remdata>/ d" ${recovery_dir}/config.xml done
it's better to keep this data, but add /cf/conf/config/bsdinstall_config_restore
flag to run restore_backup()
on boot
Updated by Viktor Gurov about 3 years ago
Updated by Jim Pingle about 3 years ago
- Status changed from New to Pull Request Review
- Assignee set to Viktor Gurov
- Target version set to 2.6.0
- Plus Target Version set to 22.01
Updated by Viktor Gurov about 3 years ago
- Status changed from Pull Request Review to Feedback
- % Done changed from 0 to 100
Applied in changeset 7b6a63312ff25e513463f9a429295974b95b4af9.
Updated by Jim Pingle about 3 years ago
- Subject changed from Restore RRD and extra data on bsdinstall config.xml restore to Restore RRD and extra data from configuration backups when restoring during installation
Updating subject for release notes.
Updated by Viktor Gurov almost 3 years ago
bsdinstaller does not create the '/cf/conf/trigger_restore_config_after_bsdinstall' file for some reason (https://github.com/pfsense/FreeBSD-src/blob/devel-12/usr.sbin/bsdinstall/scripts/copy_configxml_from_usb#L66)
if this file is created manually ("touch /cf/conf/trigger_restore_config_after_bsdinstall"), it will successfully restore extra data
Updated by Viktor Gurov almost 3 years ago
Updated by Jim Pingle almost 3 years ago
- Status changed from Feedback to Pull Request Review
Updated by Jim Pingle almost 3 years ago
- Status changed from Pull Request Review to Feedback
Already merged.
Updated by Jim Pingle almost 3 years ago
- Status changed from Feedback to New
This can be activated unintentionally on upgrade the way it is now. It looks like the installer made /conf/installer_copied_config
when it restored a config in the past, but that file was never removed when the system finished booting after installation. Because it wasn't removed, some systems may still have that file present even though they haven't been (re)installed in months or more. As a consequence, on upgrade this new code triggers and they get a notification about the restore. It should end up being a NOOP but the notification may still confuse users.
pfSense is restoring the configuration /tmp/config_to_restore.xml @ 2022-01-05 09:31:06
This should probably also look for some other indication that it's the first boot post install, such as the presence of {$g['conf_path']}/trigger_initial_wizard
Updated by Viktor Gurov almost 3 years ago
Updated by Jim Pingle almost 3 years ago
- Status changed from New to Pull Request Review
Updated by Viktor Gurov almost 3 years ago
- Status changed from Pull Request Review to Feedback
Merged
Updated by Jim Pingle almost 3 years ago
- Status changed from Feedback to Closed