Skip to main content

Backup and Restore for Node-RED.

Project description

Homelab: Node-RED Backup & Restore

Known Vulnerabilities Buy Me A Coffee

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 token
  • telegram 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 code 0 if data exists, else 1)
  • backup: creates a backup
    • requires: --file
  • restore: restores from a backup
    • requires: --file
  • auto: performs a check and either creates a backup to or restores a backup from the given --file
    • requires: --file

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. :)

Buy Me A Coffee

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

homelab_node_red_backup-1.4.0.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

homelab_node_red_backup-1.4.0-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file homelab_node_red_backup-1.4.0.tar.gz.

File metadata

File hashes

Hashes for homelab_node_red_backup-1.4.0.tar.gz
Algorithm Hash digest
SHA256 fa21e7f7e7ad5ab2615df768fde69972a2e5a68addb01f2c1d034b7098fcd576
MD5 fb0c972084afb6e35968bf33d9e63c10
BLAKE2b-256 579e31b5a23b3d84f231276f68a21ce70b20c090043bff0e13f691b9838f3239

See more details on using hashes here.

Provenance

File details

Details for the file homelab_node_red_backup-1.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for homelab_node_red_backup-1.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 59214d54f755a6f15833539df949ef3e9bcdab4cc952b9d3170d72678dc5e5ba
MD5 e9f5595b0f9c1c2fc2cb1b7e80da5529
BLAKE2b-256 e3d64514a3bb7b14cc3b5519e594cbdca195af98e5bdf47e489781a7a121f050

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page