Importing / Restoring from a Backup
-
Hi,
Just a small question…
Is Restoring a complete backup or importing / restoring part of a Backup, Destructive?Or does it add / replace existing content merging where necessary and if so does the backup have supremacy?
I was thinking a rather neat way of adding a load of aliases, rules, etc would be to use the backup xml format as it would be quicker than adding a screen at a time in places?
Thanks and kind regards,
jB 8)
-
In my own experience, restoring a backup overwrites the config on the target machine. Although if you wanted to, you could export your config, edit the XML manually to add the rules/aliases you want and re-import the edited file.
-
Restoring a complete backup overwrites the target (as expected).
If you need to try and merge in portions of previous backup with the current state of your system, try to select the particular section (DHCP, Users, etc.) you need and restore only that piece.
Do you have a particular example in mind?
-
^ This. You can make backups of just the aliases and just the firewall rules by using the dropdown menu under Diagnostics - Backup/Restore. Restore can be just as selective.
-
Hi,
Thanks for the replies.
As I mentioned in my original post, I was more interested in using the restore as a means of bulk adding such things as aliases, rules etc.
Additionally does the format / scope of a Backup change with versions?
If so should there not be a [Version] stanza in the backup that apart from saying what version of pfSense was used to create the backup, but useful information such as date and time and user could be included aswell.I think the best thing I can do is make a Backup, amend the aliases section by adding, deleting, amending data then reading it back in to actually see what happens to that section.
I will report back, got to take a courage pill first.
Thanks again,
jB 8)
-
One other piece to this puzzle that may be helpful is "Config History" section of the Backup and Restore menu.
While it won't document what you did in your bulk change file (it couldn't know what you intended) it does show you when you loaded changes and lets you back them out cleanly.
Very helpful when things go worng ;)
-
"Config History" section … While it won't document what you did in your bulk change file ...
Sure it does.
Choose two config files and hit the "diff" button. Displays the difference(s) between the two selected files.