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
Hashes for homelab_node_red_backup-1.4.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d6fa902a6e606ac349f11aaac4d59d9fca20dd14b77be4749839f343a1d823ef |
|
MD5 | b009480e311c2fcb634e97924af093c6 |
|
BLAKE2b-256 | 2099dbd3922ffe35f11c1a86a57885c240cbdfe3897c4d64093cf1ab5f8f3b3f |
Hashes for homelab_node_red_backup-1.4.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 92e06822b1beb2272d6f8b86a78f2ceb63cf6941a21961acd2ca63d3708a6e27 |
|
MD5 | a6a1c4779b15349b58b516879d18c781 |
|
BLAKE2b-256 | 29ef73ce5790c3478092088a6456fc180f9da0a6d9588d4ee131d099f0005ade |