#!/bin/bash source /.env FILENAME="$NAME $(date +%Y-%m-%d\ %H-%M).tgz" # tar volumes tar -aczf /tmp/$FILENAME -C /volumes . # ship to host rsync -R -e "ssh -i /id" /tmp/$FILENAME $NAME@$HOST:/home/$NAME/$(date +%Y\/%m)/