Unable to restore the configurations with the automated firewall backup file.
1072
Created On 12/24/22 20:20 PM - Last Modified 03/24/25 21:23 PM
Symptom
- When the firewall is configured with the periodical backup of the config files, the export of the config files is happening without any issues.
- If we try to import that exported backup config file into the firewall it is not loading those configurations and no changes were observed in the configurations.
- When we open the XML backup config file, it consists of the below error.
- <response status="error" code="403">
<result>
<msg>Invalid Credential</msg> >>>>> Invalid credential
</result>
</response>
Environment
- Palo Alto Firewalls or Panorama
- Supported PAN-OS
- XML-API
Cause
- The credentials (API key/username/password) used for backup has been changed/updated.
- The API key is generated on the basis of the username and password given as input, so when the password gets changed the backup file does not contain any configurations due to invalid credentials.
Resolution
- When we used a particular username and password to generate the API key, the same key can be used for the periodical backup of the config files.
- But if the user's password is been changed periodically then need to generate a new API key at the time of password change and the backup of the config files can be performed with the new API key.
- For accessing the firewall after changing the credentials, using XML API, Re-generate the API key first. To generate, see the following:
https://<firewall-ip>/api/?type=keygen&user=<username>&password=<password> - Now import the backup config XML file into the firewall, and should load the configurations successfully.
Additional Information
How to take Backup of config files of the firewall periodically