How to migrate Roundcube address books?

Follow

Comments

6 comments

  • Avatar
    Brian Craigie

    The command to connect to MySQL doesn't work.  Perhaps the command has been mangled.

    This command works:

    mysql psa -uadmin -p`cat /etc/psa/.psa.shadow` -e"select name from domains;" > domains.txt

     

     

  • Avatar
    Ivan Postnikov

    Hello @Brian!

    Thank you for bringing this to our attention.

    valid commands are:

    mysql psa -uadmin -p`cat /etc/psa/.psa.shadow` -e"select name from domains;" > domains.txt

    or

    MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -uadmin psa -sN -e"select name from domains;" > domains.txt

    The article will be modified shortly.

  • Avatar
    Turgut Kalfaoglu

    You are missing the backticks in your original command:

    do php export-roundcube-sql.php admin `cat /etc/psa/.psa.shadow`  .....

    otherwise excellent tutorial, thank you!

  • Avatar
    Turgut Kalfaoglu

    you may also wish to use the --force parameter on your last mysql command so it keeps inserting the next file when an error occurs.

  • Avatar
    Turgut Kalfaoglu

    Any ideas why these insertions return:

    ERROR 1242 (21000) at line 4393: Subquery returns more than 1 row

    error?

  • Avatar
    Alexander Tsmokalyuk

    @Turgut Thank you  for the feedback, the article was updated. As per the error, it may be related with roundcubemail database inconsistency and occurs for statements where the subquery must return at most one row but returns multiple rows. The following resource describes this: https://dev.mysql.com/doc/refman/8.0/en/subquery-errors.html 

Please sign in to leave a comment.

Have more questions? Submit a request