Backup and Restore for Node-RED.
Project description
Homelab: Node-RED Backup & Restore
This repository contains Python scripts leveraging the Node-RED Admin API endpoints to create and restore backups.
Attention: the Node-RED installation must either be unsecured or secured by OAuth!
Installation
The package is published in (Test)PyPi and can be installed via:
pip install homelab-node-red-backup
Configuration
The following arguments are available:
--endpoint
/-e
: the Node-RED endpoint--file
/-f
: the JSON file--jwt-token
/-jwt
: the JWT token to authenticate with
Credentials
Credentials are detected, retrieved, and merged to the output JSON file. The following credential types are recognized:
servers
: e.g. a Home Assistant server with an access tokentelegram bot
: Telegram bot with a token
Usage
The following commands are available, and all commands require the arguments --endpoint
, and, optionally, --jwt-token
set.
check
: checks if data exists for a backup (return code0
if data exists, else1
)backup
: creates a backup- requires:
--file
- requires:
restore
: restores from a backup- requires:
--file
- requires:
auto
: performs acheck
and either creates a backup to or restores a backup from the given--file
- requires:
--file
- requires:
Examples
# checking if data exists
homelab-node-red-backup check -e http://localhost:1880 -jwt <TOKEN>
# creating a backup
homelab-node-red-backup backup -e http://localhost:1880 -jwt <TOKEN> -f backup.json
# restoring from the backup
homelab-node-red-backup restore -e http://localhost:1880 -jwt <TOKEN> -f backup.json
Supporting
If you enjoy the application and want to support my efforts, please feel free to buy me a coffe. :)
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
File details
Details for the file homelab_node_red_backup-2.0.0.tar.gz
.
File metadata
- Download URL: homelab_node_red_backup-2.0.0.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba515dc1be911437c765c0820268bf1bcc20e4f8826d0493684d236a4a83c9f3 |
|
MD5 | f7aff31dc26781665edc7c37f69a4870 |
|
BLAKE2b-256 | 92d2aee5f881eb62a575a77a2b8c1e0c5cadd1ca496f0a726f5bee7be2932acb |
File details
Details for the file homelab_node_red_backup-2.0.0-py3-none-any.whl
.
File metadata
- Download URL: homelab_node_red_backup-2.0.0-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bee3fb46c5905e80ff0e277a95dbc387e448a14c3d2b865b1dc4284fe17c3009 |
|
MD5 | 5575c89471423a4722f4b1ef82a942ff |
|
BLAKE2b-256 | 6678407b8886187136233dae0de7139fed088b09377eace675f98d1eaa3222fb |