better info and backup
This commit is contained in:
parent
31bf6ba56d
commit
72c7d14df8
@ -6,6 +6,10 @@ DIR=$1
|
|||||||
[ $# -gt 1 ] && echo "Too many arguments" && exit
|
[ $# -gt 1 ] && echo "Too many arguments" && exit
|
||||||
[ ! -d $DIR ] && echo "Directory ${DIR} does not exist" && exit
|
[ ! -d $DIR ] && echo "Directory ${DIR} does not exist" && exit
|
||||||
|
|
||||||
|
echo -ne " 🔎 Verify file"
|
||||||
|
bzip2 -tv $TAR
|
||||||
|
[ $? -ne 0 ] && "Cannot verify $TAR" && exit
|
||||||
|
|
||||||
./db -e ${DIR}
|
./db -e ${DIR}
|
||||||
tar -cjpf ${DIR}.tar.bz2 ${DIR} ${DIR}.*
|
tar -cjpf ${DIR}.tar.bz2 ${DIR} ${DIR}.*
|
||||||
ls -l ${DIR}.tar.bz2 --color=auto
|
ls -l ${DIR}.tar.bz2 --color=auto
|
||||||
|
|||||||
@ -10,12 +10,16 @@ BB="\e[1;34m"
|
|||||||
BW="\e[1;97m"
|
BW="\e[1;97m"
|
||||||
E="\e[00m"
|
E="\e[00m"
|
||||||
|
|
||||||
|
|
||||||
DBUSER="root"
|
DBUSER="root"
|
||||||
DBPASS="1234"
|
DBPASS="1234"
|
||||||
|
|
||||||
SRC=$1
|
SRC=$1
|
||||||
DST=$2
|
DST=$2
|
||||||
|
|
||||||
|
[ ! -d $SRC ] && echo "Directory ${DIR} does not exist" && exit
|
||||||
|
[ -d $DST ] && echo "Directory ${DIR} already exist" && exit
|
||||||
|
|
||||||
function log() {
|
function log() {
|
||||||
[ $1 == 0 ] && echo -e " ${G}[ OK ]${E}"; return
|
[ $1 == 0 ] && echo -e " ${G}[ OK ]${E}"; return
|
||||||
echo -e " ${R}[FAIL]${E}"
|
echo -e " ${R}[FAIL]${E}"
|
||||||
|
|||||||
@ -56,11 +56,16 @@ vendor/drush/drush/drush route | grep "/api/" | awk {'print $2'} | sed "s/'//g"
|
|||||||
# echo
|
# echo
|
||||||
# fi
|
# fi
|
||||||
|
|
||||||
|
# SELECT count(nid) FROM node WHERE type='article'
|
||||||
|
|
||||||
COUNT=$(mysql -uroot -p1234 ${NAME} -Nse "SELECT name from ${NAME}.config WHERE name LIKE 'node.type%'" | sed 's/node.type.//g' | sort | uniq | wc -l)
|
COUNT=$(mysql -uroot -p1234 ${NAME} -Nse "SELECT name from ${NAME}.config WHERE name LIKE 'node.type%'" | sed 's/node.type.//g' | sort | uniq | wc -l)
|
||||||
echo
|
echo
|
||||||
echo -e "🍓 Content types: ${COUNT}"
|
echo -e "🍓 Content types: ${COUNT}"
|
||||||
echo
|
echo
|
||||||
mysql -uroot -p1234 ${NAME} -Nse "SELECT name from ${NAME}.config WHERE name LIKE 'node.type%'" | sed 's/node.type.//g' | sort | uniq
|
for TYPE in `mysql -uroot -p1234 ${NAME} -Nse "SELECT name from ${NAME}.config WHERE name LIKE 'node.type%'" | sed 's/node.type.//g' | sort | uniq`; do
|
||||||
|
TYPECOUNT=$(mysql -uroot -p1234 ${NAME} -Nse "SELECT count(nid) FROM node WHERE type='${TYPE}'")
|
||||||
|
printf '%8d %s \n' ${TYPECOUNT} ${TYPE}
|
||||||
|
done
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo -e "🎃 Available users"
|
echo -e "🎃 Available users"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user