📜 ⬆️ ⬇️

cBackup - backup network equipment configurations

Better backup can only be backup with version control and integrity checking. There is a lot of software of various levels of chargeability for different operating systems for backing up files, databases and images, as well as for managing server and software configurations. But there are not so many solutions for working with configurations of network equipment.



We created the cBackup application (from configuration backup) to work with network equipment configurations. In addition to directly backing up configs, you can track changes between their versions, which helps to localize the source of the problem when recovering from crashes. cBackup is open source and distributed free of charge, including separately downloadable templates supporting various network devices.

For whom?


cBackup was developed by admins for admins who do not need a heavyweight like the NOC Project. We administer several thousand switches and routers in our work, therefore maintaining the network configuration in proper order is a vital necessity. Hence, quite tangible parallels in the basic principles of work: discovery, as in the monitoring systems of the network infrastructure; already somewhere seen terminology in most sections; schedule management, as in crontab, and so on.
')

What is already there?


The current version is available for download as a tar.gz archive, as well as rpm and deb packages. Documentation available. The system was originally designed for Linux, but you can also start it under Windows, although there is no official support yet. After installing the package or unpacking it on a prepared server, you will need to complete the installation on the system itself through the web installer. The documentation covers this process in as much detail as possible, therefore installation and operation will not be described as part of the material in the PR hub. If there will be requests, then I will tell you about the technical side of the work and the use cases in a separate material in the profile hub.

Briefly describe the architecture, the cBackup interface is a web application written in a Yii2 framework with a daemon written in Java 8 using Spring Boot. MySQL is used as a database, and Git is used for version control. The system processing 1200 switches and routers feels quite comfortable on a virtual machine with two cores and two gigabytes of RAM, processing tasks for collecting configurations, STP and geo maps in 30 streams. Hard disk space is also used sparingly - for the year of use, the data application folder takes up 350 MB, and the database - 35 MB.



cBackup is free and distributed under the Affero GPL v3 license. Also our plugins, updates and downloadable content with support for vendors and devices are free. At the moment, the system interface supports English and Russian. There are no hidden fees, functional limitations and microtransactions and are not planned. However, our team is open for cooperation on deployment, requests for official support for business with SLA and for corporate support, including individual developments.

Register of subnets and equipment, automatic search for new devices


cBackup can work both on a manually predefined list of nodes, and walking on specified subnets, detecting installed devices (discovery). Separately, you can exclude addresses from any processes and tasks. Hardware support is downloaded and installed from the official repository. If the server with backup is in an isolated network and does not have access to the Internet, you can upload files manually or add support for new equipment yourself.

By itself, the management of the registry of subnets and equipment may seem unnecessarily heaped up, but after working with different vendors, we made sure that everyone comes up with some kind of chips in their protocols and processes. And it's not even about STP, the implementation of which may be different, like day from night, but about the banal command line operation via SSH. Therefore, infrastructure management is highly detailed, providing the ability to create plug-ins and factories for individual models and / or vendors, redefining interaction with a device or model at any stage.

Backup Configurations


Directly the task of interacting with nodes assigned to the system service, which operates in multi-threaded mode. The service is an executable file in Java and does not use the system crontab, using only its functionality. The daemon communicates with the kernel of the system through the RESTful API and, in theory, it can be generally moved to a separate server, if necessary. Interaction with end devices is designed as a sequence of commands with the processing of received data, and can be carried out via Telnet, SSH and SNMP v1 / v2 protocols.

Version Control System


One of the main goals for us was to give the opportunity not only to read and restore the config from a backup copy as part of a disaster recovery, but also to find the problem in the case of the configuration file. Since a significant number of operators work with equipment, the search and localization of changes for us was an extremely important task. In general, quite a lot of functions are entrusted to Git in our system: version control configurations, system updates, downloads and updates for hardware support and vendors.

Plugins and APIs


We are convinced that each system should do its job. Therefore, if the name of the software has the word 'backup', then it should, first of all, deal with the backup itself. Everything else is strictly optional. cBackup implements plug-in connection functionality, but at the moment there are only two of them - positioning the node on the map based on the information in the OID system.sysLocation.0 and drawing STP trees. If there is a real need and request, we will be happy to add the required functionality. This also includes the API, which allows you to integrate cBackup with other services.

What will happen?


Initially, the project was written “for internal needs” and, in fact, was a reworking from scratch of a self-written utility for saving switch configurations. Already in the process of refactoring, the idea came that the project may be useful outside our networks. The system was overwhelmed with a lot of new chips with an eye on versatility, received multilingual and more serious documentation, and now it has come to the public.

There are plans for development, and a roadmap on the upcoming versions hangs on the board behind me. But since cBackup currently covers all our needs, I would like to listen to the wishes of the community and users if someone starts using this software. Wishes and questions can be left in the mail, on our forum, in the issue tracker on Github or in our chat room in Discord.

From the key features in the queue for the implementation we have: support for SNMP v3, support for IPv6, validation of configs according to specified rules and import of nodes from external databases or APIs. Supplementing the list of supported equipment will be carried out at the request of users "on the job," good, for this update of the installed system is not required. We will try to make this process smooth, in the hope that more of the tweaks than MikroTik will not come up with any vendor. The plans also include changes in the architecture of the daemon, in order to provide plugins for it.

Where are the links?


Source: https://habr.com/ru/post/344530/


All Articles