forksand-it-manual/source/resources/apps/mariadb-galera/forksand-mysql-backup

15 lines
309 B

#!/bin/bash
set -x
NOW=$( date +%Y%m%d%H%M )
mkdir -p /BACKUPS/$NOW
mysqldump \
--host=10.42.1.171 \
--user=nextcloud \
--all-databases \
--password=`grep dbpass /var/www/html/nextcloud/config/config.php |cut -f 4 -d "'"` |
pbzip2 > /BACKUPS/$NOW/mysql-`hostname`-$NOW.sql.bz2