This script has only been tested on SNS 3.7.1.
Automate the configuration backup of Stormshield Network Security (SNS) devices/appliances.
This PHP script can handle your SNS backups to your local/outsourced HTTP/HTTPS server.
SNS Configuration > System > Maintenance > Backup :
- Backup server :
sns-backup.domain.tld
SNS Configuration > System > Maintenance > Backup > Advanced configuration :
- Name of the backup file :
backupFile
- Server port :
http
(tcp/80) - Communication protocol :
HTTP
- Server certificate : Not used
- Access path :
/path/backup.php
- Method of sending :
POST
- User name : Not used
- Password : Not used
- POST - control name :
controlName
- Backup frequency :
Every day
- Password of the backup file : Not used
The general format of the URL called by SNS is :
[{methodOfSending}] {communicationProtocol}://{backupServer}:{serverPort}/{accessPath}
Using the previous configuration data :
[POST] https://sns-backup.domain.tld:80/path/backup.php
The output file will be named :
backup_{nameOfTheBackupFile}_{snsVersion}_{dateTime}.na.enc
backup_{nameOfTheBackupFile}_V.V.V_Y-m-d_His.na.enc
Using the previous configuration data :
backup_backupFile_3.7.1_2021-11-16_203922.na.enc
$source
is a list of IP addresses allowed to access the script (i.e. your SNS devices/appliances IP addresses) :
$source = [
'192.0.2.1',
'192.0.2.2'
];
$name
must be the same as in SNS SNS Configuration > System > Maintenance > Backup > Advanced configuration > POST - control name :
$name = 'controlName';