site/other/dbbu.sh

17 lines
336 B
Bash
Raw Normal View History

2024-08-06 16:01:04 +00:00
#!/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