Mattflaschen has uploaded a new change for review. https://gerrit.wikimedia.org/r/273989
Change subject: WIP: Fix make-all-blobs-beta to work on Beta Cluster ...................................................................... WIP: Fix make-all-blobs-beta to work on Beta Cluster Before, it did not work anywhere due to removal of wikiadmin_pass Change-Id: I25f16d0a83e77766c12c978fbc539341e3c661aa --- D storage/make-all-blobs A storage/make-all-blobs-beta 2 files changed, 23 insertions(+), 23 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikimediaMaintenance refs/changes/89/273989/1 diff --git a/storage/make-all-blobs b/storage/make-all-blobs deleted file mode 100755 index 367ed68..0000000 --- a/storage/make-all-blobs +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash -if [ -z $1 ];then - echo "Usage: make-all-blobs <server> [<table name>]" - exit 1 -fi -server=$1 -if [ -z $2 ]; then - table=blobs -else - table=$2 -fi - -if hostname --domain | grep -q wmflabs ; then - FILE="$MEDIAWIKI_STAGING_DIR/dblists/all-labs.dblist" -else - FILE="$MEDIAWIKI_STAGING_DIR/dblists/all.dblist" -fi - -for db in `<$FILE`;do - echo "CREATE DATABASE IF NOT EXISTS $db" | mysql -u wikiadmin -p`wikiadmin_pass` -h $server && \ - sed "s/blobs\>/$table/" blobs.sql | mysql -u wikiadmin -p`wikiadmin_pass` -h $server $db -done - diff --git a/storage/make-all-blobs-beta b/storage/make-all-blobs-beta new file mode 100755 index 0000000..14e090e --- /dev/null +++ b/storage/make-all-blobs-beta @@ -0,0 +1,23 @@ +#!/bin/bash +if [ -z $1 ];then + echo "Usage: make-all-blobs-beta <server> [<table name>]" + echo "Creates a blobs table with the specified name in the main wiki database" + exit 1 +fi +server=$1 +if [ -z $2 ]; then + table=blobs +else + table=$2 +fi + +if hostname --domain | grep -q wmflabs ; then + FILE="$MEDIAWIKI_STAGING_DIR/dblists/all-labs.dblist" +else + echo 'make-all-blobs-beta only runs on the Beta Cluster' + exit 1 +fi + +for db in `<$FILE`;do + sed "s/blobs\>/$table/" /srv/mediawiki/php-master/maintenance/storage/blobs.sql | sql $db +done -- To view, visit https://gerrit.wikimedia.org/r/273989 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I25f16d0a83e77766c12c978fbc539341e3c661aa Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikimediaMaintenance Gerrit-Branch: master Gerrit-Owner: Mattflaschen <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
