GestioIP 3.5 Configuration Backup Module User-Guide
GestioIP 3.5 Configuration Backup Module User-Guide
v3.5
IP address management software
www.gestioip.net
Table of Contents
1 Introduction.......................................................................................................................................4
1.1 Features......................................................................................................................................4
2 Configuration.....................................................................................................................................4
2.1 Enable Device Configuration Management...............................................................................4
2.1.1 License key........................................................................................................................4
2.1.1.1 Introduce the license key............................................................................................5
2.2 Configure GestióIP Configuration Management.......................................................................6
2.2.1 Device User Groups...........................................................................................................7
2.2.1.1 Create, edit, delete Device User Groups....................................................................7
2.2.2 Configuration Backup Server.............................................................................................8
2.2.2.1 Create, edit, delete Configuration Backup Server......................................................8
2.2.2.1.1Backup Server behind NAT.................................................................................9
2.2.3 Job Groups.......................................................................................................................10
2.2.3.1 Create, edit, delete Job Groups................................................................................10
2.2.4 Show Job details...............................................................................................................11
2.2.5 Search through configurations.........................................................................................11
2.2.6 Diff configuration/command outputs (of the same or different devices).........................12
2.2.7 Show the Job execution logfiles.......................................................................................13
2.3 CM Dashboard.........................................................................................................................14
2.4 Configuration Management for devices..................................................................................15
2.4.1 Configure Configuration Management for devices..........................................................15
2.4.1.1 Enable Configuration Management for a device......................................................15
2.4.1.2 Assign Jobs to devices..............................................................................................16
2.4.1.3 Delete Jobs from devices..........................................................................................17
2.4.1.4 Disable Configuration Management for a device.....................................................17
2.4.1.5 Delete Configuration Management for a device......................................................17
2.4.2 Mass update......................................................................................................................17
2.4.2.1 Enable CM................................................................................................................18
2.4.2.2 Disable CM...............................................................................................................19
3 Working with Jobs...........................................................................................................................20
3.1 Assigned Jobs..........................................................................................................................21
3.1.1 Show last Job execution log.............................................................................................21
3.1.2 Show/download stored configurations/Job outputs.........................................................21
3.1.3 Diff stored configurations/Job outputs.............................................................................21
3.1.4 Search through stored device configurations/Job outputs................................................22
3.1.5 Execute an assigned Job...................................................................................................22
3.2 Restore configurations or upload files to devices....................................................................22
3.3 Execute unassigned device Jobs..............................................................................................23
3.3.1 List the content of the backup directory...........................................................................23
3.4 Run Jobs automatically/schedule Jobs.....................................................................................24
3.4.1 fetch_config.pl arguments................................................................................................24
3.4.2 logfiles fetch_config.pl....................................................................................................26
3.4.3 Configure cron jobs..........................................................................................................26
3.5 Bulk changes............................................................................................................................27
4 XML files/Device Type Groups......................................................................................................28
2
GestióIP 3.5 – Network Configuration Backup and Management Module
3
GestióIP 3.5 – Network Configuration Backup and Management Module
1 Introduction
GestióIP's Device Configuration Management Module allows to automatically backup and manage
configurations of network devices like switches, router, load balancer or firewalls. It furthermore
permits to execute commands on the devices and to optionally store the command's output. This
offers many possibilities. You can, for example, create a Job which executes every day a command
like “show arp” to create a MACaddress/porthistory for your switches or you can make bulk
changes like changing the password of multiple devices.
1.1 Features
The Device Configuration Management Module offers the following main features:
2 Configuration
The license key is associated with the hostname of the GestióIP server.
To show the hostname of the GestióIP server execute the command “hostname” from a terminal or
go to “Manage” → “GestióIP”. The hostname appears in front of the textbox “Licence Key”. The
4
GestióIP 3.5 – Network Configuration Backup and Management Module
Enabling Device Configuration Management creates the new top menu item “CM” as well as the
new host column “CM” for the “hostlistview”. The CM column indicates the last Job execution
status with a colored symbol (green dot: OK, red dot: error, gray dot: never executed, gray “x”:
disabled). By clicking over the symbol, one access to device's “manageJobpage”.
5
GestióIP 3.5 – Network Configuration Backup and Management Module
Figure 2: CM Menu
Before you can assign backup or other Jobs to devices, you need to create at lease one Device User
Group, one Configuration Backup Server and one Job Group. Furthermore there must exist an
adequate Device Type Group with Jobs for the specific device model (see 4).
6
GestióIP 3.5 – Network Configuration Backup and Management Module
Note: Device User Groups which are assigned to a device can not be deleted. Click the delete
7
GestióIP 3.5 – Network Configuration Backup and Management Module
In this example, the GestióIP server has a FTP and a TFTP server installed and has two network
interfaces which are connected to the production (10.2.50.8) and to the preproduction (10.50.9.27)
environment.
8
GestióIP 3.5 – Network Configuration Backup and Management Module
Note: Configuration Backup Server which are assigned to devices can not be deleted. Click the
deletebutton to list the devices which are using that server.
9
GestióIP 3.5 – Network Configuration Backup and Management Module
ID: Job Group ID. The ID is used to specify the Job Group for the automatic Job execution. It will
be created automatically.
name: descriptive name (mandatory).
description: a short description.
devices: clicking “show” lists the hosts which are using this Job Group.
10
GestióIP 3.5 – Network Configuration Backup and Management Module
Select the Device Type Group and the Job which should be displayed and click “send”.
11
GestióIP 3.5 – Network Configuration Backup and Management Module
The checkbox “search only through last logfiles” offers the possibility to search either through all
stored configurations or through only the last ones.
Note: To search through the configurations/Job outputs for a specific device go to the “manage
Jobspage” (“CM” → “Show CM hosts” → click over the colored CMsymbol).
12
GestióIP 3.5 – Network Configuration Backup and Management Module
Step II: Select the configurations which should be diffed and click “diff”.
Note: You also can diff the configurations/Job outputs for a specific device from the “manageJobs
page” (“CM” → “Show CM hosts” → click over the colored CMsymbol).
Note: You can also access to the last execution log for a specific Job from the “manageJobspage”.
13
GestióIP 3.5 – Network Configuration Backup and Management Module
2.3 CM Dashboard
The CM Dashboard gives an overview of the results of the execution of defined Jobs.
It offers the possibility to show the Job execution results for a specific date (Fig. 16) or for a time
range (Fig. 17).
Click over the IP addresses to access to the log file for a specific Job of this device.
Click over the symbol to access to the devices JobManagementPage.
14
GestióIP 3.5 – Network Configuration Backup and Management Module
The “time range view” gives an overview of the Jobs which were executed within a specific time
range.
The IP addresses appear in three different shades of colors.
Failed:
red – no successful execution within the time range
orange – more then one failed Job execution within the time range
dark blue – one failed Job execution within the time range
Changed:
light blue – configuration changes during all Job executions
darker blue – configuration changes during some Job executions
dark blue – configuration changes during one Job execution
Only the IP addresses which appear in dark blue offer links to the log files. To access to the log files
for IPs with multiple fails/changes, click over the graph for a specific date.
15
GestióIP 3.5 – Network Configuration Backup and Management Module
Hint: You can use host mass update feature to configure CM for multiple devices simultaneously.
16
GestióIP 3.5 – Network Configuration Backup and Management Module
To disable CM for a device uncheck the “enable Configuration Management” checkbox and click
“save”. The CM configuration and the Jobs will be deactivated but not deleted.
17
GestióIP 3.5 – Network Configuration Backup and Management Module
2.4.2.1 Enable CM
CMmassupdate will always overwrite the Device Type Group. Execute the CM mass update only
for devices of the same Device Type Group.
Select a Device Type Group. The Device Type Group determines which Jobs are available for the
device.
If you don't want to overwrite the the Device User Group, Connection Protocol, Device Backup
Server or the value of “save unsaved configuration changes...” check the appropriate checkboxes
“exclude form update” behind the fields.
Select the Jobs, insert optionally a description and select a Device Job Group.
18
GestióIP 3.5 – Network Configuration Backup and Management Module
2.4.2.2 Disable CM
To disable CM for multiple devices go to CM mass update form for the devices you want to edit
(see 2.4.2.1)
If you only want to delete the associated Jobs from the devices check the checkbox “Delete old Jobs
from devices” (you must always select a Device Type Group) and click “change”.
19
GestióIP 3.5 – Network Configuration Backup and Management Module
Assigned Jobs:
• Show Job's last execution log.
• Show stored device configurations/Job outputs. *
• Diff two stored device configurations/Job outputs. *
• Search strings through the stored device configurations/Job outputs. *
• Execute the Job.
* only Job Types “configuration backup” and “fetch command output”, not available for binary
configurations
Other:
• Upload a stored configuration/a file to the device.
• Run unassigned Jobs on the device (the Jobs must be defined for the device's Device Type
Group).
• List the directory/show the path of the directory where all configurations for this device are
stored.
20
GestióIP 3.5 – Network Configuration Backup and Management Module
The diff page shows two types off diffs. A “Unixlike” diff of the lines which differ and a
comparison chart of the complete files.
21
GestióIP 3.5 – Network Configuration Backup and Management Module
The checkbox “ignore comments” forces GestióIP to ignore changed comments. A line is
considered as comment, when it starts with "!", "#" or "//".
This lines will not be shown in the first diff box and will be shown, but not be highlighted, in the
second diff box.
22
GestióIP 3.5 – Network Configuration Backup and Management Module
• Select a adequate Job (the Job must be defined in the device's XML file) (see 4.2, Example
2).
• Select “Upload a stored configuration” to restore a configuration which was backuped by
the CMsystem or choose “Choose configuration or file to upload” to restore/upload a local
file from your workstation to the device.
• Choose a log mode.
• Click “upload”.
23
GestióIP 3.5 – Network Configuration Backup and Management Module
Execute the Job by clicking “run job now”. Running a Job may take, depending on the job, up to
45s. The result page will be shown when the Job has finished. It offers links to access to the stored
configuration/Joboutput and informs about errors which might have occurred.
Hint: Access to the outputs of unassigned Jobs via the link “Configuration backup directory” on the
bottom of the page.
24
GestióIP 3.5 – Network Configuration Backup and Management Module
To run Jobs automatically configure cron jobs for the script /urs/share/gestioip/bin/fetch_config.pl
(see 3.4.3).
Before running the script fetch_config.pl you must first configure the following parameters in
ip_update_gestioip.conf:
sid_gestioip=gestioip
user_gestioip=gestioip
pass_gestioip=XXXXXX
bbdd_host_gestioip=localhost
bbdd_port_gestioip=3306
mail_destinatarios=user@domain.org (optional)
client=client's name
c, csv_hosts=list
Coma separated list of IPs to process. If you only specify the c option, all Jobs associated to this
devices will be executed
d, debug=LEVEL
Debug level 13 (e.g. d 2).
g, group_id=job_group_id
ID of the Job Group for which the commands should be executed. Consult the Job Group ID from
Job Group list view (“CM” → “Job Groups”) or from the “manageJobsform”. In Fig. 33, the Job
Group ID is 1 (1).
h, help
25
GestióIP 3.5 – Network Configuration Backup and Management Module
Print help.
i, id=job_id
ID of the Job that should be executed. To execute a specific Job for a specific device. You find the
Job ID by hovering over the Job name from the “manageJobspage”. In Fig. 33, the Job has the ID
23.
jobname=job_short_name
Execute a Job by it's shortname (shortname example: copyRunTftp2)(see Fig. 33). Without
csv_host option, the Job will be executed for all devices which have a Job with this name
associated (independent of the Device Job Group).
l, log_file_name=file_name
To specify the log file name.
m, mail
Send the Job execution log via email to the addresses specified in the configuration file
“ip_update_gestioip.conf (parameter "mail_destinatarios").
name_client=clientname
Name of the client for which the script should be executed. If there are no clients configured, the
clientname is “DEFAULT”
r, run_unassociated_job
Run a Job by its name, independently if it is a defined job. Requires options jobname and
csv_hosts.
u, upload_config_file=config_name
Configuration file to upload to the device (only for “upload” Jobs). Requires options jobname and
csv_hosts.
v, verbose
Run the script in “verbose” mode.
Figure 33: Find the Job ID, Job short name and Job Group ID
Examples:
Execute all Jobs of Device Job Group 1 and send the logfile via mail to the mail_destinatarios:
fetch_config.pl --group_id 1 -m
26
GestióIP 3.5 – Network Configuration Backup and Management Module
Execute a specific Job for a specific device by the Job ID in “verbose” mode:
fetch_config.pl --id 33 -v
Run all associated Jobs with the name “copyRunTftp” (on all devices which have this Job
associated):
fetch_config.pl --name copyRunTftp
Run a Job on a device which is not associated with the device (but defined for device's Device Type
Group):
fetch_config.pl --csv_hosts 192.168.32.8 --jobname copyRunTftp --run_unassociated_job
Run all Jobs which are associated with the specified devices:
fetch_config.pl --csv_hosts 192.168.32.8,192.168.55.4,10.3.20.9
This cronjob will delete every day at 3:35h all files from the log directory which are older than 30
days.
Example:
Configuration of a cron job which runs all Jobs of the Device Job Group with ID “1” and sends the
Job execution report via mail every day at 05:45h am.
Note: the execution of fetch_config.pl for one Job takes normally about 1015s per Job. Count with
27
GestióIP 3.5 – Network Configuration Backup and Management Module
around 20 minutes for 100 Jobs or around 3,5 hours for 1000 Jobs. To speed up the execution you
can define multiple Job Groups and run an instances of fetch_config for each Job Group in parallel.
Example:
If you want to run backup Jobs for 3000 devices create three different Job Groups (e.g. backup1
(ID: 6), backup2 (ID: 7) and backup3 (ID: 8)), assign 1000 Jobs to each Job Group and create a
cron job for each Job Group.
Example: Change the SNMP RO community string of multiple devices running Cisco IOS:
<changeSnmpRoCommunity>
<comment>Change SNMP RO community string</comment>
<jobType>task</jobType>
<command>conf t</command>
<return>(config)#</return>
<command>no snmp-server community public RO</command>
<return>(config)#</return>
<command>snmp-server community XXXX RO</command>
<return>(config)#</return>
<command>exit</command>
28
GestióIP 3.5 – Network Configuration Backup and Management Module
<return>[[ENABLE_PROMPT]]</return>
</changeSnmpRoCommunity>
GestióIP comes with a several predefined XML files. If there is no XML file for your device model
available you can create your own XML files (see 4.3).
The XML files are located in /usr/share/gestioip/var/devices/.
Main container
<deviceGroupValues>
Device Type Group Name - this value will be displayed in the Device Type Group select box
of the Web interface
Mandatory
<deviceGroupName>Cisco IOS</deviceGroupName>
Device Group ID - Internal ID of the Device Group - must be identical with XML file's
serial number e.g. 17_MyOS.xml -> XML file's serial number = Device Type Group ID = 17
Device Type Group ID must be unique for every Device Type Group
Mandatory
29
GestióIP 3.5 – Network Configuration Backup and Management Module
<deviceGroupID>1</deviceGroupID>
Login Prompt - prompt which is displayed after login but which does not have
sufficient privileges to execute the commands. Leave this parameter blank if the
commands can be executed directly after logging-in without changing to
“enable”-mode (leave it blank if no command like “enable” is required).
Optional
<loginPrompt>></loginPrompt>
Enable Prompt – privileged prompt of level from which the commands can be executed.
Mandatory
<enablePrompt>#|(enable)</enablePrompt>
In the case that after a successful login appear a message which requires a confirmation
instead of the login or enable prompt, configure an expression which matches this message
here. The message will be confirmed by the fetch_config.pl script with an return
Optional
<loginConfirmationExpr>Terminal type?</loginConfirmationExpr>
Username expression - expression which matches logins 'username: ' string. The value of
[[GENERIC_USERNAME_EXPR]] should match for most devices and needs normally not to be
changed
Optional
<usernameExpr>[[GENERIC_USERNAME_EXPR]]</usernameExpr>
Password expression - expression which matches logins 'password: ' string . The value
[[GENERIC_PASSWORD_EXPR]] should match for most devices and need normally not be changed
Optional
<passwordExpr>[[GENERIC_PASSWORD_EXPR]]</passwordExpr>
30
GestióIP 3.5 – Network Configuration Backup and Management Module
Pager expression - Expression which indicates that there will come more command output
Optional
<pagerExpr>--More--</pagerExpr>
Unsaved changes question - Expression that matches the question if the unsaved
configuration changes should be saved before logging out
Optional
<unsavedChangesMessage>The system has unsaved changes|Would you like to save them
now|Do you wish to save your configuration changes</unsavedChangesMessage>
Definition of the Jobs for the devices of this Device Type Group
<jobs>
Job comment - this value will be displayed in the "Job" select box of the Web interface
Mandatory
<comment>Backup running config via TFTP</comment>
Job Type – This attributes determines how the Job will be internally processed.
There are four Job Types available:
copy_file – Use this value if the Job should copy a configuration/a file from the device
to the server. Example: backup the configuration of a device via FTP or TFTP.
fetch_command_output – Use this value if the Job should execute a command on the device
and store the command's output. Example: fetch and store the output of the command “show
arp”
task – Use this value if the Job should execute a command on the device without storing
the command output. Example: bulk-change to change the password for multiple devices
copy_local – to copy a file which is already saved on the Backup Server locally to the
backup directory. To integrate configuration files which can not be fetched by GestióIP
within the Configuration Management Module. copy_local Jobs do not connect to the devices
nor execute commands on the devices. copy_local Jobs do only accept the attributes
<comment>, <jobType>, <localSourceFile> and <localSourceCommand>. See 25_juniper_ive.xml
and 35_pfsense.xml for examples.
copy_local allows also to executes local scripts:
Example:
#
31
GestióIP 3.5 – Network Configuration Backup and Management Module
<localSourceCommand>/usr/share/gestioip/bin/create_pfsense_backup.sh</localSourceCommand>
Would execute the command create_pfsense_backup.sh . The script downloads the
configuration and copies it to a by parameter specified location . fetch_config.pl
executes the script with the following arguments: device_ip backup_file_name user_name
login_pass
NOTE: Upload Jobs (jobs which copy configurations from the backup server to the device,
for example to restore a backuped configuration) MUST have the jobType “task”
Mandatory
<jobType>copy_file</jobType>
Saved configuration may only differ with actual configuration in an "unimportant" string
like "saved_cfg_timestamp ...."
This option allows to configure a string which match lines which should not be compared
when determining if the configuration has changed.
Optional
<diffConfigIgnore>saved_cfg_timestamp</diffConfigIgnore>
Command timeout - will replace the default command execution timeout of 92s
<commandTimeout>120</commandTimeout>
Backup file Extension - if you want to save the file with a specific extension (eg.
tar.gz)on the Backup Server. Depending on the Job Type, the file will be automatically
stored with the extension ".conf" (type "copy_file") or ".txt" (type
"fetch_command_output"), independently of the extension of the original config file. Use
this option to force the backupfile to be stored on the server with another extension
than .conf or .txt.
Optional
<configExtension>tar.gz</configExtension>
The Date format parameter allows to specify the format of the date which should replace
the [[DATE]] variable.
Supported date specifiers:
%d - Day of the month, zero-padded (01-31)
%H - Hour in 24h format (00-23)
%I - Hour in 12h format (01-12)
%m - Month as a decimal number (01-12)
%M - Minute (00-59)
%y - Year, last two digits (00-99)
%Y - Year, four digits (2014)
Example: with <dateFormat> set to "Y%m%d", ipso-backup_[[DATE]].tar.gz will be translated
to ipso-backup_20140425.tar.gz.
32
GestióIP 3.5 – Network Configuration Backup and Management Module
Optional
<dateFormat>%Y%m%d</dateFormat>
Name of the configuration file on the device. Normally the destination file will be
specified with the [[CONFIG_NAME]] variable (e.g. “copy configs/device_cm.cfg tftp://
[[SERVER_IP]]/[[CONFIG_NAME]]”). In the case that the device does not permit to specify
the destination file name you must indicate the name of the configuration file which will
be copied to the device with the [[DEST_CONFIG_NAME]] variable. (e.g. “set backup remote
manual [[DEST_CONFIG_NAME]] ftp-passwd [[SERVER_PASSWORD]]”).
[[DEST_CONFIG_NAME]] variable will be replaced by the value of the <destConfigName>-
attribute.
Optional
<destConfigName>ipso-backup_[[DATE]].tgz</destConfigName>
You can use the following variables within the <command> and <return> attributes:
33
GestióIP 3.5 – Network Configuration Backup and Management Module
return – expression which matches the expected return from the executed command
<return>Address or name of remote host</return>
Example: Copy the running configuration of a Cisco IOS device to a TFTP server
<command>copy running-config tftp:</command>
<return>Address or name of remote host</return>
<command>[[SERVER_IP]]</command>
<return>Destination filename</return>
<command>[[CONFIG_NAME]]</command>
<return>!!\r*\n*.*bytes copied.*</return>
If you want to match for one of this characters you need to escape them.
Examples:
!! !!\r*\n*.*bytes copied.*
34
GestióIP 3.5 – Network Configuration Backup and Management Module
Example:
<enablePrompt>#|(enable)</enablePrompt>
or
Switch-A#
To best method to determine the commands and returns is to execute the commands which should
be executed by the Job manually and create the commands and returns on the basis of the output of
the commands.
$ telnet 192.168.30.35
Trying 192.168.30.35...
Connected to 192.168.30.35.
Escape character is '^]'.
Username:admin
Password:********
Enterasys SecureStack C2
Command Line Interface
35
GestióIP 3.5 – Network Configuration Backup and Management Module
Matrix(rw)->delete configs/device_cm.cfg
Matrix(rw)->show config outfile configs/device_cm.cfg
Matrix(rw)->copy configs/device_cm.cfg tftp://192.168.42.58/conf_bck_test.cfg
File transfer operation completed successfully.
Matrix(rw)->delete configs/device_cm.cfg
Matrix(rw)->exit
Connection closed by foreign host
In this example, the first command is executed to make sure that the file “device_cm.cfg” does not
already exist: Matrix(rw)->delete configs/device_cm.cfg – As this command will produce an
(not critical) error in the case that the file doesn't exist, we use the variable [[IGNORE_ERRORS]]
within this command to avoid that the execution of the command will be stopped after an error.
Because the return of the command is the privileged mode prompt (Matrix(rw)->), we use the
variable [[ENABLE_PROMPT]] as return value. The privileged mode prompt value is defined by the
<enablePrompt>-attribute in the “global” section of the XML file.
As the Job is a “backup Job”, <jobType> must be set to “copy_file” (see 4.1).
36
GestióIP 3.5 – Network Configuration Backup and Management Module
<copyRunTftp>
<comment>Backup running config via TFTP</comment>
<jobType>copy_file</jobType>
<command>delete configs/device_cm.cfg[[IGNORE_ERRORS]]</command>
<return>[[ENABLE_PROMPT]]</return>
<command>show config outfile configs/device_cm.cfg</command>
<return>[[ENABLE_PROMPT]]</return>
<command>copy configs/device_cm.cfg tftp://[[SERVER_IP]]/
[[CONFIG_NAME]]</command>
<return>File transfer operation completed successfully</return>
<command>delete configs/device_cm.cfg</command>
<return>[[ENABLE_PROMPT]]</return>
</copyRunTftp>
Execute the commands from which the Job should be created manually:
37
GestióIP 3.5 – Network Configuration Backup and Management Module
Hint: After editing a XML file run always the script “check_xml_files.pl” which you find in the
same directory as the XML files to check the XML file's syntax (see 4.4).
If you create new XML files use always serial numbers > 1000. This makes sure that new XML
files which are included in the updates will not conflict with the serial numbers of self created XML
files.
Adapt the Device Type Group's global variables like <enablePrompt> and create the required Jobs
(see 4.2).
38
GestióIP 3.5 – Network Configuration Backup and Management Module
Note: The check_xml_files.pl script only checks the syntax of the XML file and not the syntax of
the commands which should be executed on the device.
4.4.1 Support
The project provides support for defining new Jobs and for the creation of new XML files.
If you have trouble creating XML files or define new Jobs send a mail to contact@gestioip.net.
The mail with the support request MUST include the following information:
• The device vendor, model and OS/firmware version.
• The copy of the complete output of the session (from login to logout) with the successful
execution of the commands of which the new Job should be created from (see session
example in 4.2).
If you already have created the Job, execute it from the “ManageJobspage” in verbose mode and
include also
• The XMLfile with the new Job which you have created.
• The two execution log files of the last run of the Job in verbose mode (….fetch_config.log
and ....fetch_config.log_stdout)(see 3.4.2). To obtain the log files, execute the Job in verbose
mode from the “manageJobspage” (see 3.3) or execute the Job from commadline (see 3.4).
39
GestióIP 3.5 – Network Configuration Backup and Management Module
If you have created new XML files or if you have created new Jobs please send the XML files to
contact@gestioip.net so that they can be included within the next update of GestióIP.
Thanks a lot!!
5 Troubleshooting
Save the file and restart the Apache webserver (sudo apachectl restart)
5.3.1 Background
The Configuration Backup Server connects via the connection protocol to the device and executes
the commands of the Job on the device (in the case of a backup Job). That means that
configurations are uploaded from the device to the server (and not downloaded by the server).
Make sure that the firewalls permit the connections between the devices and the server (see 6.2)
If errors occur during the automatic execution of a Job, the Job status button will change to a red
color.
To gather information why a Job was not correctly executed check the Job execution log file (see
3.1.1). If the log file doesn't offer sufficient information run the Job manually with “verbose” log
mode from the “manageJobpage” (see 3.1.5). Click the link “Show log” to access to the Job's log
file.
40
GestióIP 3.5 – Network Configuration Backup and Management Module
Hint: You also can also run fetch_config.pl manually from the command line (see 3.4).
If a Job which was executed manually from the “manageJobspage” runs in a timeout (resultpage
does not load), this is probably a problem with the Job definition in th XML file. To debug this
problem consult the logfiles (/usr/share/gestioip/var/log) and run check_xml_files.pl (see 4.4).
41
GestióIP 3.5 – Network Configuration Backup and Management Module
6.1 Installation of the FTP, TFTP and SSH (SCP) server software
The installation of the server software can be made with the distribution specific packet manager.
After the installation the owner and the permissions of the server root directory must be set.
6.1.1 Debian/Ubuntu
Working with Ubuntu 14.04.
42
GestióIP 3.5 – Network Configuration Backup and Management Module
Change the owner and the permissions of the server root directory
sudo chown gestioip-bck:www-data /srv/ftp/
sudo chmod 770 /srv/ftp/
Create the configuration file /etc/xinetd.d/tftp with the following content (sudo vi /etc/xinetd.d/tftp):
service tftp
{
protocol = udp
43
GestióIP 3.5 – Network Configuration Backup and Management Module
port = 69
socket_type = dgram
wait = yes
user = nobody
server = /usr/sbin/in.tftpd
server_args = /var/lib/tftpboot -s
disable = no
}
44
GestióIP 3.5 – Network Configuration Backup and Management Module
6.1.2 OpenSuse
Enable xinetd:
sudo chkconfig xinetd on
45
GestióIP 3.5 – Network Configuration Backup and Management Module
Change ownership and set permissions for the server root directory:
sudo chgrp -R www /srv/tftpboot
sudo chmod 775 /srv/tftpboot
Enable xinetd:
sudo chkconfig xinetd on
46
GestióIP 3.5 – Network Configuration Backup and Management Module
6.1.3 Fedora/Redhat/CentOS
47
GestióIP 3.5 – Network Configuration Backup and Management Module
Enable the FTP server on boot and start the FTP server:
Fedora
sudo systemctl enable vsftpd.service
sudo systemctl start vsftpd.service
Redhat/Centos
sudo service vsftpd restart
sudo chkconfig vsftpd on
Change ownership and set permissions for the server root directory:
sudo chgrp -R apache /var/lib/tftpboot
sudo chmod -R 775 /var/lib/tftpboot
48
GestióIP 3.5 – Network Configuration Backup and Management Module
Redhat/Centos
sudo service xinetd start
sudo chkconfig xinetd on
49
GestióIP 3.5 – Network Configuration Backup and Management Module
6.2 Firewall
The firewall must permit that the server can logon to the device (connection protocol) as well as it
must permit, that the device can copy it's configuration/the commandoutputs to the server (backup
protocol). Make sure that the following connections are allowed by the firewalls.
server → device:connection protocol
device → server:backup protocol
Examples:
If the server connects with SSH to the device, the server must be able to reach the device on port 22
(TCP):
server → device:22
If the server connects with TELNET to the device, the server must be able to reach the device on
port 23 (TCP):
server → device:23
If the device copies it's configuration via FTP to the server, the device must be able to reach the
server on port 21 (TCP)
device → server:21
If the device copies it's configuration via TFTP to the server, the device must be able to reach the
server on port 69 (UDP)
device → server:69 (UDP)
50
GestióIP 3.5 – Network Configuration Backup and Management Module
51