Comment on @Hubzilla Support Forum Mine is running on a shared host. I have SSH and Git a
@𝓒𝓱𝓻𝓲𝓼 Saving the directory and associated SQL dump doesn't require an extra tool.
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 -delete
EOF
scp $HOST:/archive/$ARCHIVE.* .
}
But how to automat the creation oft the SQL dump ?
?? It's done by mysqldump from within the backup function. Automation can be done by using a cron job. Or do you refer to something else?