This Bash script allows you to copy environment variables from a balena fleet or device to another.
- balena cli : https://github.com/balena-io/balena-cli
- jq : https://stedolan.github.io/jq/
./balena-copy.sh <source_fleet_name> <destination_fleet_name>
Where <source_fleet_name>
is the name of the fleet where the environment variables will be copied from, and <destination_fleet_name>
is the name of the fleet where the environment variables will be copied to.
./balena-copy-device.sh <source_device_uuid> <destination_device_uuid>
Where <source_device_uuid
is the source device uuid, and <destination_device_uuid
is the destination device uuid
Note
You must be logged in to the Balena CLI with an account that has access to both fleets in order to use this script.
Tip
--service='my-service'
can be used to copy specific variables from a single service or several.