Ivan's got a good idea. The validation regular expression for the destination field for the secure backup action is:
So certainly worth a try to get it somewhere other than temporary, if even to local, which is allowed.
Original Message:
Sent: Wed May 20, 2026 04:18 PM
From: Ivan Heninger
Subject: Python script to create a secure backup and download using XML management interface
The secure-backup CLI has the ability to push the backup file "off box" when done. I would expect you can call same function from XMI and/or RMI.
idg(config)# secure-backup cd4_gm_cert sftp://user:pass@host/datapower/backup1/ova_cd4_nonprod "" onSecure backup to 'sftp://user:pass@host/datapower/backup1/ova_cd4_nonprod' scheduled (may take a few minutes to complete).Secure backup is complete.
------------------------------
Ivan Heninger
------------------------------
Original Message:
Sent: Tue May 19, 2026 10:08 AM
From: Joseph Morgan
Subject: Python script to create a secure backup and download using XML management interface
We once ran on X1's. We're up to X3's now. I don't recall issues on the X1's, but now, who knows.
I'm rarely stumped... but stumped I am. The only suggestion I can make is trying it through cURL via either mgmt interface. If it doesn't work there, then you're likely dealing with a permissions issue.
------------------------------
Joseph Morgan
CEO - Independent
Original Message:
Sent: Tue May 19, 2026 09:54 AM
From: John Parker
Subject: Python script to create a secure backup and download using XML management interface
I've only tested on a physical Datapower, since I only run the secure backups on those. That Datapower is a X1 (844152X )
------------------------------
John Parker
Original Message:
Sent: Tue May 19, 2026 09:33 AM
From: Joseph Morgan
Subject: Python script to create a secure backup and download using XML management interface
Wow. Now it's really strange. I've tested on physical 10.6.0.9, VMware virtuals running 10.6.0.7 and 10.6.0.9, and dockers running 10.6.4.0, 10.6.5.0 and 11.0.0.0.
Is your form-factor something else? That is, it *could* be a file system permission issue?
------------------------------
Joseph Morgan
CEO - Independent
Original Message:
Sent: Tue May 19, 2026 09:05 AM
From: John Parker
Subject: Python script to create a secure backup and download using XML management interface
We are running IDG.10.6.0.9
------------------------------
John Parker
Original Message:
Sent: Mon May 18, 2026 03:20 PM
From: Joseph Morgan
Subject: Python script to create a secure backup and download using XML management interface
What FW are you on. Unless it is really old, I can at least light up a quick docker with that version and test to see if it works on that one.
------------------------------
Joseph Morgan
CEO - Independent
Original Message:
Sent: Mon May 18, 2026 02:54 PM
From: John Parker
Subject: Python script to create a secure backup and download using XML management interface
I used to be able to do this in WAMC, but the server does use the latest TLS, and non of the browsers will connect.
------------------------------
John Parker
Original Message:
Sent: Mon May 18, 2026 02:46 PM
From: Joseph Morgan
Subject: Python script to create a secure backup and download using XML management interface
I'm doing it with KumbaSoft's DPAA, which uses the XMI with the account credentials. I don't do anything additional than the account is privileged. It works with FW from 10.5.x through 11. FWIW, the V11 is docker only.
------------------------------
Joseph Morgan
CEO - Independent
Original Message:
Sent: Mon May 18, 2026 12:04 PM
From: John Parker
Subject: Python script to create a secure backup and download using XML management interface
Ok, I also have a privileged account just for backups, but not the admin account. Is there any other permissions that you give to it? What version of firmware are you running?
------------------------------
John Parker
Original Message:
Sent: Mon May 18, 2026 11:51 AM
From: Joseph Morgan
Subject: Python script to create a secure backup and download using XML management interface
I am using a privileged account, but not the "admin" account. So you may be onto something. What is the permission string for your user?
------------------------------
Joseph Morgan
CEO - Independent
Original Message:
Sent: Mon May 18, 2026 11:43 AM
From: John Parker
Subject: Python script to create a secure backup and download using XML management interface
Yes, but nothing seems to be hitting the logs.
What permissions do you give the credentials that connect to the Datapower? I'm wondering if that is an issue. I am also trying to do a full export, which I can create and download on some of my Datapowers, but not all of them, which is kind of weird
------------------------------
John Parker
Original Message:
Sent: Fri May 08, 2026 10:40 AM
From: Joseph Morgan
Subject: Python script to create a secure backup and download using XML management interface
I use Java rather than Python, but I cannot imagine it has anything to do with the language. I have no problems exporting anything from temporary.
Have you turned on internal logging and examined the log to see if there is any error or indication related to the export attempt?
------------------------------
Joseph Morgan
CEO - Independent
Original Message:
Sent: Fri May 08, 2026 08:01 AM
From: John Parker
Subject: Python script to create a secure backup and download using XML management interface
I can create the backup, I just can't retrieve the files from Temporary. I may try saving them in Local and see if I can pull from there
------------------------------
John Parker
Original Message:
Sent: Fri May 08, 2026 05:50 AM
From: Andreas Brand
Subject: Python script to create a secure backup and download using XML management interface
Yes, it is possible. I also run secure backup using Python, and it works perfectly.
My approach in the script is as follows:
1. Create a secure backup, wait for it to finish
2. Download the backup files
3. Delete the backup files (on the Datapower)
However, I use the Raidstore as the storage location. I've never tried using the temporary directory.
------------------------------
Andreas Brand