Comment on @Hubzilla Support Forum Mine is running on a shared host. I have SSH and Git a

<- View Parent
abu@hub.alfredbuehler.ch ⁨1⁩ ⁨day⁩ ago
@𝓒𝓱𝓻𝓲𝓼 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.* .
}

original
Sort:hotnewtop