Archive > 21.1 Legacy Series

How do I import a config.xml during install?

(1/2) > >>

IsaacFL:
I recently did a reinstall (VM to physical hardware) and I wanted to just import my existing config.xml into the new hardware install. I had to move my 4 port network card from the VM Host, so everything had to go down.

I saved my configuration to a USB, \conf\config.xml

During the boot, I used the opnsense-importer utility to pick my config.xml which worked but only into the "Live Environment".

I could not figure out a way to import during the install process?  I ended up having to do the vanilla install, getting an old laptop and configuring it with a static 192.168.1.1/24 (I don't use this private network) and using the web interface to restore the configuration.

I routinely did this with pfsense, if I messed up something it was quicker to just reinstall and import the backup in one step.  Two minutes vs this stretched into 15 minutes.

It is not obvious from the documentation how to do this?

packet loss:
I recall being able to import mine. I think I did a complete install but didn't really configure anything beyond getting past the point of the initial install. Then from the shell I ran the opnsense-importer to import my config.xml from a USB drive and then rebooted.

IsaacFL:
Looks like the step would be at the console, immediately after install:

8) Shell

# opnsense-importer
picked my USB from the list.

# Reboot 

Wondering if I should have rebooted by exit, then option 6) Reboot System.

This did seem to work. I did not de a full reinstall for this test.  I backed up my config to a FAT USB to file \conf\config.xml.

I deleted one of my NTP timer servers.

Went to the console and did the above. After reboot, my NTP server was back, so must have worked.

Option 13) Restore from a backup is not the route to go to get from USB.  Shell is.


packet loss:
I haven't had the time to test alternative methods. It's also probably been over a year that I've installed OPNsense, and believe there's been quite a few changes to the install process. I'm thinking below should also work:

From console menu
1. install
2. reboot
3. restore

I'm glad you got it to work. Saved me alot of time last time I did it. There's also a recent bug reported regarding importing an encrypted backup #4861. Mabye some potential issues maybe resolved during the code audit.

dcol:
I know this is an older topic but for those who are looking for the easiest method to install OPNsense with the same configuation, I did this. Chime in if I am wrong.

1. Backup configuration and place on FAT32 formatted USB drive under folder \conf and rename backup to config.xml.
2. Install OPNsense and when asked for configuration restore, choose the USB with \conf\config.xml

That's it.

Navigation

[0] Message Index

[#] Next page

Go to full version