Title here
Summary here
One should be careful renaming a wiki (database/domain) as it involves many steps and basically anything going wrong can make it impossible for users to login across the entire farm, or worse. Please pay attention to what the scripts output when doing a rename to make sure everything is working properly.
mwscript MirahezeMagic:RenameDatabase loginwiki --rename --old=<old_wiki_db> --new=<new_wiki_db> --user=<user_running_script>--rename to run in dry run mode.sudo -i mariadb -e "DROP DATABASE nameofwikidb;"Double check Swift:
. /etc/swift-env.shswift list --prefix miraheze-<old_wiki_db>
If anything shows in the above, for each of them:diff --color <(swift list miraheze-<new_wiki_db>-<zone>) <(swift list miraheze-<old_wiki_db>-<zone>)local-public
If files need to be moved:swift download miraheze-<old_wiki_db>-<zone> -D failed
cd failed
swift upload miraheze-<new_wiki_db>-<zone> *If only empty directories or everything looks fine there (files returned by that are now only present on old container, not on the new wiki container), you can remove the old containers with:
swift delete miraheze-<old_wiki_db>-<zone>suwd rm -rf /tmp/miraheze-<old_wiki_db>-<zone>Finally, run:
mwscript CreateWiki:SetContainersAccess <new_wiki_db>