TinyAutomator makes use of docker volumes to store persistent data used by different services. It includes resources service H2 database, plugins files, templates/tasks storage, etc.
As you can see from the installation guide docker volumes are mounted to /data/standalone directory of the local filesystem. To perform a backup you just need to stop docker services, tarball /data directory and copy the result tar file to some external storage like USB disk/stick, external SSH server, or online cloud storage.
Here are the steps which you can do in simple shell script backup.sh. Replace the parameters for scp command to copy the tar file to some storage server on your environment, or use any other cloud storage provider command line utilities (like gsutil) to copy created tar file to cloud storage :
#!/bin/sh docker-compose -f tinyautomator-raspberrypi.yml stop DATE=`date +%Y%m%d_%H%M` sudo tar cPf data.$DATE.tar /data docker-compose -f tinyautomator-raspberrypi.yml up -d scp -i myidentityfile.key data.$DATE.tar firstname.lastname@example.org:/home/user
and then just execute backup.sh with sudo:
$ chmod +x backup.sh $ sudo ./backup.sh
And restoring is also simple, you just need to untar file on freshly installed TinyAutomator and set appropriate read permissions:
scp -i myidentityfile.key email@example.com:/home/user/data.tar data.tar sudo tar xf data.tar sudo chmod -R 777 /data
Restart the TinyAutomator and enjoy your previously created resources,templates,tasks:
docker-compose -f tinyautomator-raspberrypi.yml stop docker-compose -f tinyautomator-raspberrypi.yml start -d