Comment on @Hubzilla Support Forum Mine is running on a shared host. I have SSH and Git a
backup() { ssh -T $HOST << EOF tar -C $APPDIR_REMOTE -czf archive/$ARCHIVE.tar.gz mysqldump -h 127.0.0.1 $DBNAME > archive/$ARCHIVE.sql gzip -f archive/$ARCHIVE.sql find archive/ -type f -name "${PREFIX}*.gz" -mtime +$DAYS -deleteEOF scp $HOST:/archive/$ARCHIVE.* .}