You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

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