API Basica diversos tipus de backups, pensat per a EIO
Project description
Recopilation of backups. API-NPP
Read this in other languages: English, Español, Català.
Keep in mind part of the program is in catalan
Information
-
To execute this program you require python 3 o greater installed. Preferably v3.9
-
Requirements in requirements.txt
-
Requires a MySQL database with this strucutre: Database structure.
-
Database config in
config/config.yaml
-
Error logs in
errorLogs/*txt
-
Use the -h or --help option for more information of Usage
Database structure
Inside the database of your choice it's nedded the table credencials
whith the following structure:
The columns names are irrelevant only their positions are.
"name" Primary key, name of the device. Without spaces
"url" Login or API(in case of PandoraFMS) url of the device
"user" User with permission to see the backups
"password" The users password
"cookie/key/apipasswd" To get the cookie open Chrome, or similar, go to the url avobe and inspect element; Once there in the network tabwe do CONTROL+R cliquem al resultat que ens sortira i busquem on esta cookie. The key is the TOTP of the mspbackup. And the apipassword is the password of the Pandora API
If it's not created it will create it automatically.
Installation
-
Using pip:
pip install Backups_clientAPI-NPP
or
-
cloning:
gh repo clone NilPujolPorta/Backups_clientAPI-NPP
Also install portable chrome v101 in the Backups_clientAPI
Usage
Ways of executing the program
-
In the command line
Backups-clientAPI-NPP [opcions]
-
python -m Backups-clientAPI [opcions]
-
Execute the file:
__main__.py [opcions]
-
./backups-clientAPI-runner.py [opcions]
-
Importing the package and using in your project.
Options
usage: __main__.py [-h] [-q] [--portable-chrome-path RUTA] [-tr RUTA] [-g] [--json-file RUTA] [-d SEC] [-v]
An API to recollect backups information from various sources.
optional arguments:
-h, --help show this help message and exit
-q, --quiet Only shows error messages.
--portable-chrome-path RUTA
Path to portable chrome executable.
-tr RUTA, --tesseractpath RUTA
Route to tesseract.exe
--json-file RUTA The path(file not included) where you want to save the json file.
-d SEC, --date SEC The ammount of time (in seconds) back wich the program will look for copies. By default is 2592000(a month)
-v, --versio Show the version
For additional configuration options: config/config.yaml
In the near future:
- Add suport for other database servers
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for Backups_clientAPI-NPP-1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7556ecaa41e4b0dc6617ef010bfee25dae539b2a6a7dd21e7088818419ab0bed |
|
MD5 | 4e85385e1c5db6cdaa2070d59eaa7a42 |
|
BLAKE2b-256 | 6342216d9ffd826492109cc8e4ebf30b3d9818ef8d497dda0d3d4d2e64790cd7 |
Hashes for Backups_clientAPI_NPP-1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c5c239650efd908218c2466bb28c97857522a22910f73e9fcce1d1f4ceeb8679 |
|
MD5 | 4fca50a78fb3b4cd9a99ec2043081b48 |
|
BLAKE2b-256 | 333558803cdf7920b9c311d4733d94ca88d92b1454275cda8358ba6fcffc1ed6 |