Loading...
 

UsersReplication

scripted users replication 

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

#!/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


Page last modified on Friday 20 September 2019 17:02:56 GMT-0000

Upcoming Events

1)  Thu 21 Nov 2019 14:00 GMT-0000
Roundtable Meeting 2019 11

Why Register?

Register at tiki.org and you'll be able to use the account at any *.tiki.org site, thanks to the InterTiki feature. A valid email address is required to receive site notifications and occasional newsletters. You can opt out of these items at any time.