17 lines
336 B
Bash
17 lines
336 B
Bash
|
#!/bin/bash
|
||
|
# copy do db mount, use as helper
|
||
|
|
||
|
if [[ -z $1 ]] ; then
|
||
|
echo "dbbu.sh <gitea|flask> <rootpass>"
|
||
|
exit 0
|
||
|
fi
|
||
|
|
||
|
if [[ $1 == "gitea" ]] ; then
|
||
|
mariadb-dump -uroot -p$2 gitea > gitea_bu_$(date +%s).sql
|
||
|
fi
|
||
|
|
||
|
if [[ $1 == "flask" ]] ; then
|
||
|
mariadb-dump -uroot -p$2 flask > flask_bu_$(date +%s).sql
|
||
|
fi
|
||
|
|