cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements

Firepower Device Manager (FDM) - Backup & Restore using REST API

303
Views
0
Helpful
0
Comments

Problem

Sometimes FDM UI is up but user is not able to login because of issue with some processes, in such scenarios if we don't have recent back of FDM and want to take backup then there is no way out. There is no CLI command available on FDM to take the backup. Same is applicable to restore the backup on FDM as well.

 

Screenshot 2020-11-04 at 11.47.14 PM.png

 

Solution

Anupam and I created a script by which we can take the backup of FDM using APIs  (Even though we're not able to login, as long as API responds, script does the job). Script can do the restore of FDM with existing backup as well.  Script is attached here in this document.

 

1) Preparation:

****************************************************************************************************

Step 1: Download the script on PC

Step 2: Make sure python3 is installed on PC and have reachability to FDM on 443

Step 3: Make sure proper permission is given to script to execute (This applies specifically if you're executing script from linux machine)

****************************************************************************************************

 

2) Take Backup of FDM

****************************************************************************************************

Flamingo$ python3 fdm-backup.py
###########################################################
# FDM BACKUP AND RESTORE PROGRAM #
###########################################################
Enter the device IP address: 10.106.59.241
Enter the username of the FTD: admin
Enter the password of the FTD:
###########################################################
Auth-Status code is 200
Successfully Authenticated
1. Initiate Backup
2. Restore Backup
Enter your choice (integer value) : 1
###########################################################
Backup Job ID : 7dd983ce-c215-11ea-92a4-cfd908aa67d4
Backup Running...........
Backup Task Succeded

****************************************************************************************************

 

3) Restore Backup on FDM

****************************************************************************************************

Flamingo$ python3 fdm-backup.py
###########################################################
# FDM BACKUP AND RESTORE PROGRAM #
###########################################################
Enter the device IP address: 10.197.236.209
Enter the username of the FTD: admin
Enter the password of the FTD:
###########################################################
Auth-Status code is 200
Successfully Authenticated
1. Initiate Backup
2. Restore Backup
Enter your choice (integer value) : 2
###########################################################
# Start Date Archive Name File Size (MB)
1 2020-07-09 18:31:31Z 20200709183131.NGFW_backup.Backup 160.778752
2 2020-07-09 17:12:19Z 20200709171219.NGFW_backup.Backup 160.906752
###########################################################
Select a backup to restore : 2
Are you sure ? (yes,no) : yes
Backup job Initiated with ID 42f5fb70-c215-11ea-af10-4939e9e2e7fa
Please wait until the restore is completed

****************************************************************************************************

 

Please use the script and let us know if there is any feedback.

 

Content for Community-Ad