[CWB] Export accounts from CQPweb
Hardie, Andrew
a.hardie at lancaster.ac.uk
Mon Oct 5 10:31:09 CEST 2020
Re 1: if your file is SQL insert statements, which from the extension I guess is the case, you just run them. If it’s a tabular file, then “load data local infile …”
Re 2: yes, many. Insert statements won’t overwrite. BUT they will fail in case of primary key violation. That will definitely happen if ANY users have signed up on your new server, because the primary key is an auto increment integer starting at 1. You really need ot do this before creating accounts on the new server. Note also, your dump file may contain drop/create table statements that would wipe all existing accounts (and import the old database structure to boot).
So, no guarantee it will work.
If you want to maintain old data in a new server, probably a less dangerous path would be to copy everything across (WITHOUT doing any pre installation; IE copying the whole database, indexes, web scripts, everything) then tinker with the settings till it works again, then upgrade the code via the normal process. Apart from anything else, that’s the only way to preserve user saved queries etc.
best
Andrew.
From: cwb-bounces at sslmit.unibo.it <cwb-bounces at sslmit.unibo.it> On Behalf Of Simon Meier-Vieracker
Sent: 05 October 2020 08:04
To: Open source development of the Corpus WorkBench <cwb at sslmit.unibo.it>
Subject: Re: [CWB] Export accounts from CQPweb
Hi Andrew,
so I succeeded in exporting the user_info table as user_info.sql from my old server.
Before importing the table to the new system, I want to make sure:
1) How can I do this?
2) Are there any risks? Will it just overwrite the old table? I should do a backup first, I guess?
Thanks in advance, Simon
Am 08.09.2020 um 22:02 schrieb Hardie, Andrew <a.hardie at lancaster.ac.uk<mailto:a.hardie at lancaster.ac.uk>>:
This approach will only work if EVERYTHING is being transferred, IE, all corpora and all other data, into the new installation at a point when it is completely blank.
This is because as of 3.3.1 the database structure relies a lot more on the use of integer foreign keys for cross references than it used to, and these may not be properly restored if things are moved piecemeal.
My suggestion to Simon would be to export/import just the user_info table.
best
Andrew.
-----Original Message-----
From: cwb-bounces at sslmit.unibo.it<mailto:cwb-bounces at sslmit.unibo.it> <cwb-bounces at sslmit.unibo.it<mailto:cwb-bounces at sslmit.unibo.it>> On Behalf Of Jörg Knappen
Sent: 08 September 2020 14:25
To: Open source development of the Corpus WorkBench <cwb at sslmit.unibo.it<mailto:cwb at sslmit.unibo.it>>
Subject: Re: [CWB] Export accounts from CQPweb
Am 2020-09-08 14:19, schrieb Simon Meier-Vieracker:
Hi,
we are setting up a new CQPweb server at my new university. Is there a
way to export all the user accounts from my old mysql database and
import them to the new one? Or will I have to ask the users to
register again?
You can dump the whole mysql database using the mysqldump utility and import the dump into your new mysql instance on the new cqpweb server. I have successfully migrated cqpweb installations this way. The dump contains more than just the user registrations, e.g., saved query histories and saved catqueries. You want to conserve these data, too.
--Jörg Knappen
Thanks and best regards
Simon
_______________________________________________
CWB mailing list
CWB at sslmit.unibo.it<mailto:CWB at sslmit.unibo.it>
https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fliste
.sslmit.unibo.it<https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fsslmit.unibo.it%2F&data=02%7C01%7Ca.hardie%40lancaster.ac.uk%7Cc920a3e70204480c75dd08d868fce86a%7C9c9bcd11977a4e9ca9a0bc734090164a%7C0%7C1%7C637374782738312369&sdata=c7DEj5PEd%2FUMK9K9FJRuEhE8c5HHLWs66EpW%2BvZF%2F1Y%3D&reserved=0>%2Fmailman%2Flistinfo%2Fcwb&data=02%7C01%7Ca.hardi
e%40lancaster.ac.uk<https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2F40lancaster.ac.uk%2F&data=02%7C01%7Ca.hardie%40lancaster.ac.uk%7Cc920a3e70204480c75dd08d868fce86a%7C9c9bcd11977a4e9ca9a0bc734090164a%7C0%7C1%7C637374782738312369&sdata=qV0EwVD%2BypdyBjDDpyTx0V0fIUncL0%2FMAjvZqkLI%2FoE%3D&reserved=0>%7C38ec820ff74c4a67c84408d85403d52b%7C9c9bcd11977a4
e9ca9a0bc734090164a%7C0%7C1%7C637351722741422359&sdata=usH1Cqafn%2
FccZVU3IUD0ddxSSsKSeZCuhljKJNmauMU%3D&reserved=0
_______________________________________________
CWB mailing list
CWB at sslmit.unibo.it<mailto:CWB at sslmit.unibo.it>
https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fliste.sslmit.unibo.it%2Fmailman%2Flistinfo%2Fcwb&data=02%7C01%7Ca.hardie%40lancaster.ac.uk%7C38ec820ff74c4a67c84408d85403d52b%7C9c9bcd11977a4e9ca9a0bc734090164a%7C0%7C1%7C637351722741422359&sdata=usH1Cqafn%2FccZVU3IUD0ddxSSsKSeZCuhljKJNmauMU%3D&reserved=0<https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fliste.sslmit.unibo.it%2Fmailman%2Flistinfo%2Fcwb&data=02%7C01%7Ca.hardie%40lancaster.ac.uk%7Cc920a3e70204480c75dd08d868fce86a%7C9c9bcd11977a4e9ca9a0bc734090164a%7C0%7C1%7C637374782738322320&sdata=dZpoZHqYy3h4XD2x44EklWQKLZWFM4K9LjPal3gAwz0%3D&reserved=0>
_______________________________________________
CWB mailing list
CWB at sslmit.unibo.it<mailto:CWB at sslmit.unibo.it>
http://liste.sslmit.unibo.it/mailman/listinfo/cwb<https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fliste.sslmit.unibo.it%2Fmailman%2Flistinfo%2Fcwb&data=02%7C01%7Ca.hardie%40lancaster.ac.uk%7Cc920a3e70204480c75dd08d868fce86a%7C9c9bcd11977a4e9ca9a0bc734090164a%7C0%7C1%7C637374782738322320&sdata=dZpoZHqYy3h4XD2x44EklWQKLZWFM4K9LjPal3gAwz0%3D&reserved=0>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://liste.sslmit.unibo.it/pipermail/cwb/attachments/20201005/a56072c5/attachment-0001.html>
More information about the CWB
mailing list