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 backupbackup
: creates a backup- requires:
--file
- requires:
restore
: restores from a backup- 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-1.3.0.tar.gz
.
File metadata
- Download URL: homelab_node_red_backup-1.3.0.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b6d1b53892ccb1e2a67fab0d03c2b76bc91fc25d5b436667f616ec479eaea507 |
|
MD5 | 6a65c2dd7aaf9011c290dde8b6e903a3 |
|
BLAKE2b-256 | d63d9879105b766b7aa0157e710b494668f8c9d21d34cbc67ac593c803d84663 |
Provenance
File details
Details for the file homelab_node_red_backup-1.3.0-py3-none-any.whl
.
File metadata
- Download URL: homelab_node_red_backup-1.3.0-py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | db32823dcd858419064a72c5a19d96c47052b932ad0b3c689e4ee3d3bac66a46 |
|
MD5 | 5b936352e495a9e019e01192c0753a04 |
|
BLAKE2b-256 | 5029409e3399b6f1efe9fa0cfc7d8b93c6615ae6450d4fb6d38fa7f614547d0c |