@HeikoAnkenbrand
So worked this some more over the weekend and have the resulting script attached (version 1.1?)
This works with all versions of R80 released so far.
In particular, I've tested on the following
R80.40 MDS and SMS
R80.30 MDS and SMS
R80.20 MDS
R80.10 SMS
Several features of the new version attached
Tests to see if SMS or MDS
Get's management IP (and if more than one interface on a SMS removes the additionals so that only one IP is in table, otherwise script will replicate gateways to be backed up). This is necessary for the usage in the mgmt_cli -d X.X.X.X portion below
PS:
I noticed when I ran the curl for version 1.0 some issues when it came across:
CPM_PID put the actual process value in the script instead of the path
The $FWDIR/bin/cprid_util grabbed the actual path (in the case I looked at /opt/Cshrd-R80.40/bin/cprid_util
REMOTE_FILE="$NOW-SMS-Migarte-Export" still needs to be Migrate
The $FWDIR/bin/ugrade_tools/migrate grabbed the actual path (in the case I looked at /opt/CPSuite-R80.40/fw1/bin/upgrade_tools/migrate
If the procces ID changes after a restart then the script may break. In a case where users don't have access to the script and want to copy it from one system to another, if the versions are different, it may break as well.
The path for the export file is showing \tmp\ebackup_migrate s/b /tmp/ebackup_migrate
I noticed that the offset 0 limit 500 was removed from the active command (it failed to get all gateways again on a system with a large number of gateways)
I'd recommend that the -s be deprecated, as backing up a SMS without running a cpstop/cpstart if a admin is logged in is not recommended. I think the intent is to run this as a cron job in most cases after hours, so I don't see a big impact. In R80.30/R80.40 the 'migrate_server' runs those commands by default.
I'm trying to figure out how to modify or add another 'mgmt_cli' command that will grab the other Management servers to backup the GAIA configs as well, and add it to the ebackup_topo file. This would be for Mgmt_HA and LogServers. Any help on that is appreciated.
Let me know what you think of these changes.
Paul G.