Download the PHP package imafaz/netback without Composer
On this page you can find all versions of the php package imafaz/netback. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download imafaz/netback
More information about imafaz/netback
Files in imafaz/netback
Package netback
Short Description lightweight library for backup and restore vpn servers
License MIT
Homepage https://github.com/imafaz/NetBack
Informations about the package netback
NetBack
NetBack is a PHP library designed for backing up and restoring data from network devices and applications. It provides an easy-to-use interface for managing backups across various platforms, including IBSng, Mikrotik, and xui.
- Features
- Requirements
- Installation
- Usage
- Example
- Available Methods
- Todo
- License
Features
- Backup and restore functionality for network devices.
- Support for multiple device types: IBSng, Mikrotik, and xui.
- Logging capabilities to track backup operations.
Requirements
- PHP 7.4 or higher
- Composer
- phpseclib3 library
- EasyLog library
Installation
You can install NetBack using Composer. Run the following command in your terminal:
Usage
To use the NetBack library, you need to create instances of the classes corresponding to the devices you want to back up. Below are examples of how to use each class.
Examples
Example for IBSng
Example for Mikrotik
Example for xui
Available Methods
IBSng
__construct
Description:
Initializes the IBSng object with connection parameters.
Signature:
Attributes:
Attribute | Description | Type | Required | Default |
---|---|---|---|---|
$name | Name of the IBSng device | string | Yes | - |
$ip | IP address of the device | string | Yes | - |
$username | Username for authentication | string | Yes | - |
$password | Password for authentication | string | Yes | - |
$port | Port for SSH connection | int | Yes | 22 |
backup
Description:
Performs a backup of the IBSng database.
Signature:
Attributes:
Attribute | Description | Type | Required | Default |
---|---|---|---|---|
$localPath | Path to save the backup file | string | Yes | - |
Mikrotik
__construct
Description:
Initializes the Mikrotik object with connection parameters.
Signature:
Attributes:
Attribute | Description | Type | Required | Default |
---|---|---|---|---|
$name | Name of the Mikrotik device | string | Yes | - |
$ip | IP address of the device | string | Yes | - |
$username | Username for authentication | string | Yes | - |
$password | Password for authentication | string | Yes | - |
$port | Port for SSH connection | int | Yes | 22 |
backup
Description:
Creates a backup of the Mikrotik device.
Signature:
Attributes:
Attribute | Description | Type | Required | Default |
---|---|---|---|---|
$backupName | Name of the backup file | string | Yes | - |
$localPath | Path to save the backup file | string | Yes | - |
xui
__construct
Description:
Initializes the xui object with connection parameters.
Signature:
Attributes:
Attribute | Description | Type | Required | Default |
---|---|---|---|---|
$name | Name of the xui device | string | Yes | - |
$ip | IP address of the device | string | Yes | - |
$username | Username for authentication | string | Yes | - |
$password | Password for authentication | string | Yes | - |
$port | Port for SSH connection | int | Yes | 22 |
backup
Description:
Downloads the xui database file.
Signature:
Attributes:
Attribute | Description | Type | Required | Default |
---|---|---|---|---|
$localPath | Path to save the database file | string | Yes | - |
Todo
- add restore method
- add other devices support
License
This project is licensed under the MIT License. See the LICENSE file for details.