openmeetings-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "seba.wagner@gmail.com" <seba.wag...@gmail.com>
Subject Re: backup/import - found the problem
Date Sat, 30 Mar 2013 21:12:18 GMT
The consequence will be that all uploaded files, recordings and private
messages for that user will be also skipped.
And all other imported data has to be scanned if this userId is set
somewhere else as a foreign key to make sure that data is skipped too.
So you really think its better to loose some of the data of your backup?
I would not magically skip data of the backup. Cause the next complaint on
this user mailing list will then be:
"I have imported a backup but I lost some data by the import process."

I would rather rename the imported user login. For example with the pattern:
user.login += "_x" .Where x is the number of duplicates that exist with
that name.
So a user admin will become admin_1, if admin_1 also exists it will become
admin_2, admin_3, et cetera.
Some for the email as emails are unique.
But email and login are only unique if the externalUserId is null (or in
other words: A SOAP login / user created through SOAP login can be
duplicated a 1000 times. They are unique by their externalUserId. But they
can't login via the general UI because of that.).
So the rule would be:
if (user.externalUserId == null) {
  //check user.login => unique
  //check user.address.email => unique
  //this check has always to happen on the basis if already imported data
in the database,
  //as you can potentially create a duplicate by importing
  //two users with already duplicated credentials.
}

Sebastian


2013/3/31 Alexei Fedotov <alexei.fedotov@gmail.com>

> Maybe that particular user admin should be skipped during backup.
> 31.03.2013 0:37 пользователь "seba.wagner@gmail.com" <
> seba.wagner@gmail.com> написал:
>
> how do you suggest to resolve that?
>>
>>
>> 2013/3/31 Alexei Fedotov <alexei.fedotov@gmail.com>
>>
>>> Imagine a guy who have just set his admin password via install
>>> interface. Then he imports backup, restarts the page... and can no longer
>>> login.
>>> 31.03.2013 0:18 пользователь "seba.wagner@gmail.com" <
>>> seba.wagner@gmail.com> написал:
>>>
>>> That is not a bug from my point of view. How should that exactly be
>>>> resolved?
>>>> If you create a user and then import the backup where this user exists,
>>>> which one will "win" ?
>>>> There will be simply two users with the same name currently.
>>>> So either you make sure you do your installation with a user that does
>>>> not exist in the backup and delete it after the backup. Or you use the
>>>> command line to import without duplicates.
>>>>
>>>> @Robert: Try the command line to do the import.
>>>>
>>>> Sebastian
>>>>
>>>>
>>>> 2013/3/31 Alexei Fedotov <alexei.fedotov@gmail.com>
>>>>
>>>>> Robert, this is known issue, please file a bug
>>>>> 30.03.2013 18:53 пользователь "Robert Chalmers" <racuk12@gmail.com>
>>>>> написал:
>>>>>
>>>>> Sorry guys - in fact - it did import the data, but now I have two
>>>>>> admin users.
>>>>>> So I'll have to get rid of one I suppose. Somehow.
>>>>>>
>>>>>> But yes, it does appear to have imported the data ok.
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> <https://itunes.apple.com/us/app/pin-point-premium/id467970377?mt=8>*Pin
>>>>>> Point Xtra*
>>>>>> *Your Navigation and Geocaching Companion*
>>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Sebastian Wagner
>>>> https://twitter.com/#!/dead_lock
>>>> http://www.webbase-design.de
>>>> http://www.wagner-sebastian.com
>>>> seba.wagner@gmail.com
>>>>
>>>
>>
>>
>> --
>> Sebastian Wagner
>> https://twitter.com/#!/dead_lock
>> http://www.webbase-design.de
>> http://www.wagner-sebastian.com
>> seba.wagner@gmail.com
>>
>


-- 
Sebastian Wagner
https://twitter.com/#!/dead_lock
http://www.webbase-design.de
http://www.wagner-sebastian.com
seba.wagner@gmail.com

Mime
View raw message