This project provides tools to enhance using SD Cards on TrueNAS systems.
It can automatically perform a backup of any SD Card inserted into a known SD Card slot on your TrueNAS. The backups are store into a known location and named as follows.
<BACKUP_LOCATION>/<SD_CARD_LABEL>/sdcard_backup_<SD_CARD_LABEL>_<DATE_TIME>.img
Optionally it can control the AOOSTAR Monitoring Screen, present on the AOOSTER WTR MAX.
The tool aoostar-rs is included to show status updates on the AOOSTER WTR Max display.
Also, if you want to turn off the Monitoring Screen on Startup, see instructions below.
NOTE: This software might work on other server-based installations, but has not been tested. So use at your own risk.
From the TrueNAS Shell, perform the following...
- Download the docker-compose.yaml file
curl -o compose.yaml https://raw.githubusercontent.com/scruffy359/truenas-sd-tools/refs/heads/main/docker-compose.yaml
- Create a directory where you want backups to be stored.
mkdir -p <backup-directory>
For example:
mkdir -p /mnt/Data/backups-sd
- Edit the
compose.yamland change environment variables for your deployment.
| Variable | Description |
|---|---|
| DISPLAY_STATUS | If your hardware supports the AOOSTAR Status Display, set this to aoostar-rs. |
| SD_LOGICAL_DEV_NAME | The logical PCI device names which points to your SD Card device. |
| TZ | Installation timezone. |
-
Edit the
volumesand change<your-backup-directory>to the path you create earlier. -
Install via Docker Compose
sudo docker compose up -d
The docker image must be built to run on multiple platforms in order for asterctl and aster-sysinfo CLI tools to execute correctly on ARM64 and AMD64 systems.
The build script pulls the latest aoostar-rs code for building and inclusion in the docker image.
sh ./build/build.sh
You can manually test the image locally.
docker run -it --privileged --rm truenas-sd-tools
The Docker instances must be executed with --privileged in order for devices to be visible/accessible within the Container.
From the TrueNAS Shell, perform the following steps...
- Create a location for storing your SD Card backups.
sudo mkdir -p /mnt/Data/backups-sd
- Pull the image from the Docker Hub repository.
sudo docker pull scruffy359/truenas-sd-tools
sudo docker run -it --privileged --rm scruffy359/truenas-sd-tools ./aooster-rs/asterctl --off
sudo docker run -it --privileged --rm -v /dev/disk/by-path:/dev/disk/by-path:ro
-v <backup-location>:/mnt/backups scruffy359/truenas-sd-tools
-
Log in to the TrueNAS web interface.
-
Navigate to System > Advanced Settings > Init/Shutdown Scripts and click the ADD button.
-
Configure the following options:
- Description: Enter a brief description for the task. (e.g. Turn off Screen Display)
- Type: Select 'Command'.
- Command: type of "off" docker command from above.
- When: Choose 'Post Init'
- Enabled: Ensure this checkbox is selected to activate the task.
- Timeout: Optionally, set a timeout in seconds for how long the command or script can run before it is automatically stopped.
-
Click Save.