Loading...
 

UsersReplication

scripted users replication

Script used to replicate users database from tikiwiki.org to doc.tiki.org

Copy to clipboard
#!/bin/sh DBHOST="localhost" DBNAME="tikiwiki" USERTABLE="users_users" USERGROUPTABLE="users_usergroups" DBUSER="***" DBPASS="***" MYSQLDUMP="/usr/bin/mysqldump" MDOPTIONS="-h$DBHOST -u$DBUSER -p$DBPASS" USERSOPTIONS="--add-drop-table" GROUPOPTIONS="-t -w groupName='Registered'" GROUPOPTIONSDEV="-t -w groupName='Developers'" WORKDIR="/home/mose/var/tikidumps" OLDIR=`pwd` cd $WORKDIR rm -f tikidump.sql.* 2&> /dev/null $MYSQLDUMP $MDOPTIONS $USERSOPTIONS $DBNAME $USERTABLE > tikidump.sql $MYSQLDUMP $MDOPTIONS $GROUPOPTIONS $DBNAME $USERGROUPTABLE >> tikidump.sql $MYSQLDUMP $MDOPTIONS $GROUPOPTIONSDEV $DBNAME $USERGROUPTABLE >> tikidump.sql bzip2 tikidump.sql scp -qp tikidump.sql.bz2 doc.tiki.org:~/ cd $OLDIR

Created by: Last Modification: Friday 20 September 2019 17:02:56 GMT-0000 by drsassafras
List Slides